Bug 578320 - Support '-m, --module' options from Javac
Summary: Support '-m, --module' options from Javac
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-21 19:35 EST by Alexander Kriegisch CLA
Modified: 2024-01-12 00:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kriegisch CLA 2022-01-21 19:35:46 EST
ECJ does not support the '-m, --module' options from Javac, see [1] and comments below [2]. 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. For example:

javac
  --release 11
  -d bin
  --module-path "lib/aspectjrt.jar"
  --module-source-path "modules/*/src"
  --module org.acme.first,org.acme.second

As you can see in the linked resources, I actually bumped into this because of the AspectJ compiler. You probably remember that AJC is a (regularly refreshed) ECJ fork. 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.

[1] https://github.com/eclipse/org.aspectj/issues/118#issuecomment-1018221942
[2] https://stackoverflow.com/a/70778762/1082681
Comment 1 Alexander Kriegisch CLA 2022-01-21 19:43:00 EST
Editing issue messages or comments seems to be impossible in Bugzilla - one of the many reasons it annoys me so. Anyway, instead of linking to the comment in AspectJ issue #118, I created a separate tracker bug for us now:

https://github.com/eclipse/org.aspectj/issues/119
Comment 2 Alexander Kriegisch CLA 2022-01-21 19:45:09 EST
BTW, adding a GitHub issue link under "see also", falsely classifies it as a GH pull request, which is why I removed the link again so as to avoid irritation.
Comment 3 Alexander Kriegisch CLA 2022-01-21 23:57:03 EST
See [3] and the linked ZIP archive, if you need an example project with two modules to play with.

[3] https://github.com/eclipse/org.aspectj/issues/118#issuecomment-1019051812
Comment 4 Eclipse Genie CLA 2024-01-12 00:22:11 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.