jbangdev / jbang-vscode

JBang extension for Visual Studio Code
MIT License
12 stars 2 forks source link

Make JBang / Java "just work" is vscode based editors #139

Open maxandersen opened 2 weeks ago

maxandersen commented 2 weeks ago

at the moment when you install jbang (and also vscode-java) in vscode on HomeAssistant that runs visual code assistant you bump into two issues:

1) vscode-java wants users to install its own jdk

2) running jbang fails because jbang is not available

...so; could we:

A) make it so jbang extension will offer to install jbang if not found?

B) have vscode-java pick up the JDK installed by jbang when A have occurred? (or some other way to get vscode-java working on OS's with no default jdk bundled without too much fuzz :)

maxandersen commented 2 weeks ago

related https://github.com/redhat-developer/vscode-java/issues/3799

fbricon commented 2 weeks ago

The jbang extension depends on the vscode-java one, so if the latter can't start, then the former won't either., so it won't be able to install jbang. Hello chicken/egg problem.

Now if vscode-java starts (with whatever JDK was detected), and jbang installs a new JDK, then it should be picked up automatically

So we could very well make jbang-vscode install JBang if it's missing, but we can't do anything if both jbang and a sufficient jdk are missing in the 1st place. Or we could if we removed the vscode-java dependency to JBang, but then you'd run into other issues, like vscode-java not being automatically installed when installing vscode-jbang