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 '-m, --module' options from Javac #3541

Open
kriegaex opened this issue Jan 9, 2025 · 2 comments
Open

Support '-m, --module' options from Javac #3541

kriegaex opened this issue Jan 9, 2025 · 2 comments
Labels
enhancement New feature or request javac ecj not compatible with javac

Comments

@kriegaex
Copy link
Contributor

kriegaex commented Jan 9, 2025

This is a clone of https://bugs.eclipse.org/bugs/show_bug.cgi?id=578320, because the issue was never imported and had no reactions on Bugzilla either for three years.

ECJ does not support the -m, --module options from Javac. In connection with --module-source-path, this would enable users to compile a (set of) module(s) without explicitly specifying all source files, because they would be found automatically.

Javac has this option:

--module <module>(,<module>)*, -m <module>(,<module>)*
      Compile only the specified module(s), check timestamps

It works like this (added line breaks for readability):

javac
  --release 11
  -d bin
  --module-path "c:\Program Files\Java\AspectJ\lib\aspectjrt.jar"
  --module-source-path "modules/*/src"
  --module org.acme.first,org.acme.second

I actually bumped into this because of the AspectJ compiler. You probably remember that AJC is a (regularly refreshed) ECJ fork, hence affected indirectly, see eclipse-aspectj/aspectj#119. Therefore, implementing this in order to be compatible with Javac would not only enable ECJ users to do the same things as Javac users from the console or from Maven, but also benefit the AspectJ project as a side effect.

See eclipse-aspectj/aspectj#118 (comment) and the linked ZIP archive, if you need an example project with two modules to play with.

@jukzi jukzi added enhancement New feature or request javac ecj not compatible with javac labels Jan 9, 2025
@jukzi
Copy link
Contributor

jukzi commented Jan 9, 2025

had no reactions

When it's not a priority for any jdt commiter you should consider to suggest a PR

@kriegaex
Copy link
Contributor Author

Thanks for never getting tired to tell me what I am supposed to do. Also thanks for explaining to me that no reaction can only mean low priority and not maybe oversight, i.e. I am supposed to magically know that someone has actually read and prioritised the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javac ecj not compatible with javac
Projects
None yet
Development

No branches or pull requests

2 participants