JDK9: Support module-info.java
See original GitHub issueTicket originates from discussion with Scala team how to handle the module-info.java
of Jigsaw in Scala builds.
Scala will not get it’s own special syntax for these files, as @retronym correctly observed that the syntax is more of its “own thing”. Looks kind of like protobuf rather than any of scala/java, so seems we’ll use the same syntax.
- This means that mixed language projects will put the file into
src/main/java
, so sbt should be able to pick this up (not 100% sure yet what this implies, perhaps just a simple “compile it”) - For just Scala projects though, it would be a pain to have to put and recreate package structure in parallel to the one in
src/main/scala
only to put the single module-info file there, it would also be a bit harder to find for people browsing the code. Therefore I’d propose to be able to notice that there’s amodule-info.java
file even if it lives undersrc/main/scala
and treat it in that special way - (compile with javac I guess?)
This is lose thought for now, feel free to sanity check my assumptions and challenge ideas 😃
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Understanding Java 9 Modules - Oracle
In this article, I introduce the Java 9 Platform Module System (JPMS), the most important new software engineering technology in Java since its...
Read more >Java Module System (JDK 9)
Each module has a module descriptor called module-info.java , which is to be compiled ... Reference: JDK 9 Modules - Creating Services and...
Read more >A Guide to Java 9 Modularity - Baeldung
Learn the essentials of building and using modules in Java 9. Start down the path of modularizing your code today.
Read more >Java 9 Modules Cheat Sheet | JRebel & XRebel by Perforce
In our Java 9 Modules Cheat Sheet, we go over the most useful declarations, mechanisms, attributes, and flags for the Java Platform Module ......
Read more >SPI + JDK 9 + module-info.java - Stack Overflow
You can change to using:- provides eu.com.example.text.spi.TextAPI with eu.com.example.implb.text.TextB; // you provide a service through ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A long time ago, I put together some alpha-quality support for SBT+JPMS in https://github.com/retronym/sbt-jpms. Could be time to take another swing at this problem.
has anybody tried
compileOrder := CompileOrder.JavaThenScala
as a way of keeping scalac from blowing up trying to process the.java
source?