Skip to content

Scaladoc external references jdk11 #10675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ashawley opened this issue Dec 30, 2017 · 6 comments
Closed

Scaladoc external references jdk11 #10675

ashawley opened this issue Dec 30, 2017 · 6 comments

Comments

@ashawley
Copy link
Member

It's no longer possible for scaladoc to reference the Java class library from Java 9, now, which was discovered here ThoughtWorksInc/sbt-api-mappings#8 by the Akka team. The Akka docs have a few Java refs in their api docs, e.g. https://doc.akka.io/api/akka/current/akka/japi/Util$.html

Presumably, the Java-9 rt.jar hack would work from scala/scala-dev#139, but in the long-term scaladoc will need module-path support and a way to point to modules like java.base...

scala> java.lang.ModuleLayer.boot.configuration.modules.stream.filter(
         m => m.reference.descriptor.name == "java.base"
       ).forEach(
          m => println(m.reference)
       )
[module java.base, location=jrt:/java.base]
@sjrd
Copy link
Member

sjrd commented Dec 30, 2017

Here is a workaround that we've been using in the Scala.js build for a while: https://github.com/scala-js/scala-js/blob/aede3c83fc6ab9132f475b98a662d0aaaa77dfb8/project/Build.scala#L233-L237

@ashawley
Copy link
Member Author

ashawley commented Jan 9, 2018

Ok, good to know. Thank you. I gave your hack a go in ThoughtWorksInc/sbt-api-mappings#14.

@ashawley
Copy link
Member Author

ashawley commented Jan 31, 2018

Looks like the hack works for 2.12, but not 2.11.12 for some reason. Is that your experience as well?

@sjrd
Copy link
Member

sjrd commented Jan 31, 2018

Well we have scala-js/scala-js#3152, but otherwise it seemed like it was working fine (for other projects in our build, beside library). I'm not sure that I actually carefully checked the output, though. I am only certain that it builds.

@ashawley
Copy link
Member Author

Ok, I tried looking through the Jenkins builds for scalajs, but I don't think Java 9 is in the matrix. I'll try the library project locally on Java 9....

Yeah, doesn't look like the hack works on 2.11

https://travis-ci.org/ashawley/scaladoc-test/jobs/335874903

@SethTisue SethTisue changed the title Scaladoc external references jdk9 Scaladoc external references jdk11 Feb 25, 2019
@ashawley
Copy link
Member Author

ashawley commented Feb 4, 2020

This probably won't be fixed, but works in 2.12.

It doesn't work again in 2.13, but this can be superseded by #11839.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants