Developer experience with JBang Templates and Editing #1144
Unanswered
linux-china
asked this question in
Ideas
Replies: 1 comment
-
see #1042, it tries to solve it. We are going to avoid creating maven/Gradle as much as possible as it is not necessary EXCEPT for editing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I talked with some junior developers and asked them to try JBang. Yes, the first step is easy and just
jbang init HelloWorld.java
. After HelloWorld.java generated, they don't know how to edit this java file because their projects are all managed by Maven/Gradle. They asked me why not create maven/gradle for them to open in IDE and edit code quickly. You know that most Java developers(me too) can not code Java without IDE support(dependencies, code completion, framework integration etc), and now the IDE is IntelliJ IDEA.I asked them to try IDEA's LightEdit mode to open the file, and command is
idea -e HelloWorld.java
. With the LightEdit mode, lots of features not available, such as code completion for imports, completion for class's methods etc, almost like editor with syntax high light. A good news is that Github Copilot is available with LightEdit mode, but some bugs.I asked them to try
jbang edit --open=idea HelloWorld.java
to open in IDEA, and they asked me why using a temporary directory, current directory possible? They also complain temporary projects in JetBrains toolbox are messy.I not sure that jbang should generate maven/gradle for script or not, such as
jbang init --gradle HelloWorld.java
. Maven/Gradle project still are very useful for developers, and developers can edit the code quickly and other developers can run the code byjbang https://example.com/jackie/HelloWorld.java
easily without Java project required, and it very useful to share example in members.Now Gradle is better than Maven to JBang, and Gradle has SourceSet support and each SourceSet can have its own dependencies, and SourceSet is very light in Gradle. Of course, IntelliJ IDEA has support for Gradle SourceSet.
No idea how to resolve these requirements smoothly, just write down for discussion.
Beta Was this translation helpful? Give feedback.
All reactions