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

support Modules #62

Open
maxandersen opened this issue Mar 16, 2023 · 7 comments
Open

support Modules #62

maxandersen opened this issue Mar 16, 2023 · 7 comments

Comments

@maxandersen
Copy link

when //MODULE is present vscode java should put dependencies on module classpath not the classpath so the compiler does not complain about missing modules :)

@fbricon
Copy link
Collaborator

fbricon commented Mar 16, 2023

Can you please provide some sample script?

Also please note that we don't parse the Jbang directives to set the class path, we depend on what jbang info tools provides. So it would be best if it returned the list of modules

@maxandersen
Copy link
Author

We return the module name and the dependency locations. You don't need module names do you?

@fbricon
Copy link
Collaborator

fbricon commented Mar 17, 2023

do all dependencies need to be added to the modulepath instead of the classpath? or can you mix-n match? (I don't remember, I never use that abomination)

@maxandersen
Copy link
Author

Yes. Just add to module path instead of classpath.

You can in theory add on classpath but it isn't a thing.

If we ever did that we would have an explicit classpath in the tools info output.

One additional caveat is that jbang generates a module info if user don't provide one. Not sure if we can deal with that in the IDE. Ill try make an example an share to see. It relies on stuff only in main atm.

@fbricon
Copy link
Collaborator

fbricon commented Mar 20, 2023

As soon as we enable module support in Eclipse, we'll need to point to that module-info.java. Is there a way to run jbang (preferebly via jbang info tools) so it calls https://github.com/jbangdev/jbang/blob/1e13a0b0dec31361c5d99eaddb96f92820788972/src/main/java/dev/jbang/util/ModuleUtil.java#LL70C2-L112C3? We need to either return the module-info.java location or be able to tell JBang where to generate it

@maxandersen
Copy link
Author

pretty sure we can for sure include it in tools output - but its not necessarily a stable location.

can eclipse pickup an arbitrary .java anywhere?

@quintesse ^^

@fbricon
Copy link
Collaborator

fbricon commented Mar 24, 2023

@maxandersen eclipse could link to any location, but it'd be better if it pointed to the same file on each jbang invocation.

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