Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jbang.home folder seems to be ignored #39

Open
jeffmaury opened this issue Nov 13, 2022 · 3 comments
Open

jbang.home folder seems to be ignored #39

jeffmaury opened this issue Nov 13, 2022 · 3 comments

Comments

@jeffmaury
Copy link

Although I have defined jbang.home in workspace settings, the command Synchronize JBang and seems to ignore the path:

image

@fbricon
Copy link
Collaborator

fbricon commented Nov 14, 2022

It's a known limitation ;-)

jbang.home: Specifies the folder path to the JBang directory (not the executable), eg. ~/.sdkman/candidates/jbang/current. On Windows, backslashes must be escaped, eg C:\ProgramData\chocolatey\lib\jbang. Used by the JBang: Create a new script wizard and the Run JBang code lens. Useful in case jbang is not automatically picked up from the $PATH, for some reason.

Now for the reason why it's not used by the backend: JBang support acts as a JDT.LS extension, it's not a self-contained LS in itself. Hence, only preferences starting with java. are sent to JDT.LS, and can be used by the JBang-eclipse backend.
So either we rename jbang.home to java.jbang.home, which is a bit awkward, from a UX standpoint, or we send the jbang.home value via a custom command to the backend, but that won't work until after project import.

@jeffmaury
Copy link
Author

It's a known limitation ;-)

jbang.home: Specifies the folder path to the JBang directory (not the executable), eg. ~/.sdkman/candidates/jbang/current. On Windows, backslashes must be escaped, eg C:\ProgramData\chocolatey\lib\jbang. Used by the JBang: Create a new script wizard and the Run JBang code lens. Useful in case jbang is not automatically picked up from the $PATH, for some reason.

Now for the reason why it's not used by the backend: JBang support acts as a JDT.LS extension, it's not a self-contained LS in itself. Hence, only preferences starting with java. are sent to JDT.LS, and can be used by the JBang-eclipse backend. So either we rename jbang.home to java.jbang.home, which is a bit awkward, from a UX standpoint, or we send the jbang.home value via a custom command to the backend, but that won't work until after project import.

Which would be fine in this case as Synchronize JBang is related to a project. But I don't know if there are other commands performed by JDT.LS that are not project related and that requires jbang.home

@fbricon
Copy link
Collaborator

fbricon commented Nov 14, 2022

project import (and the JBang builder subsequently) runs jbang info tools, so it would need to get the proper setting 1st.

@fbricon fbricon changed the title jbang.home folder seems to be ignore jbang.home folder seems to be ignored Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants