This is a work in progress draft of a possible proposal for an enhancement of the NetBeans Module System.
Goals
- let NetBeans modules depend on specific JDK modules (rather than the current dependency on whole platform, and use of OpenIDE-Module-Package-Dependencies)
- should work at runtime on JDK 9
- ideally should also work on JDK 8
- ideally should work at compile time as well
Possible non-goals
- update the build system to work on JDK 9
- dependency on user JPMS module (only dependencies on JDK modules)
Advantages
- more precise/sharper module dependencies
- a cleaner replacement for current hacks like requires.nb.javac/OpenIDE-Module-Hide-Classpath-Packages
Approach
If a module would have a dependency on the "java.base" module (spec. version >= 8), then it could and would have to explicitly list any JDK module it depends on as a dependency. Only types from the explicitly listed modules would be visible. Modules that would not have the dependency on the "java.base" module would get the current/old handling.
Open Issues
TBD
State
A crude prototype exists.