question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JDK9: Support module-info.java

See original GitHub issue

Ticket 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 a module-info.java file even if it lives under src/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:open
  • Created 6 years ago
  • Reactions:8
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
retronymcommented, Apr 26, 2021

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.

1reaction
SethTisuecommented, Apr 26, 2021

has anybody tried compileOrder := CompileOrder.JavaThenScala as a way of keeping scalac from blowing up trying to process the .java source?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found