Skip to content

JDK9: Support module-info.java #3368

@ktoso

Description

@ktoso

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/jdk_xjdk 9, 10, 11, 17 etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions