Skip to content
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

DottyDoc doesn't take into account '-release' to set the bootclasspath #13061

Closed
raboof opened this issue Jul 13, 2021 · 0 comments · Fixed by #13233
Closed

DottyDoc doesn't take into account '-release' to set the bootclasspath #13061

raboof opened this issue Jul 13, 2021 · 0 comments · Fixed by #13233

Comments

@raboof
Copy link
Contributor

raboof commented Jul 13, 2021

(the issue title is a bit of a guess, to be refined when it is clearer what is going on)

Compiler version

3.0.1-RC1 and the latest nightly (3.0.2-RC1-bin-20210712-47c949b-NIGHTLY)

Minimized code

Using java.lang.Deprecated, which has no parameters in Java 8 but has 2 (optional) parameters from Java 10 onwards:

@Deprecated
trait Foo
scalaVersion := "3.0.2-RC1-bin-20210712-47c949b-NIGHTLY"

Compile / scalacOptions ++= Seq("-release", "8")

Output

sbt compile is fine, but sbt doc:

$ sbt doc
[info] welcome to sbt 1.5.5 (N/A Java 16)
[info] loading settings for project global-plugins from deptree.sbt,gpg.sbt ...
[info] loading global plugins from /home/aengelen/.sbt/1.0/plugins
[info] loading project definition from /home/aengelen/dev/scala3-deprecated/project
[info] loading settings for project scala3-deprecated from build.sbt ...
[info] set current project to scala3-deprecated (in build file:/home/aengelen/dev/scala3-deprecated/)
[info] Main Scala API documentation to /home/aengelen/dev/scala3-deprecated/target/scala-3.0.2-RC1-bin-20210712-47c949b-NIGHTLY/api...
[info] Skipping unused scalacOptions: -release
[error] -- Error: Main.scala:1:0 -------------------------------------------------------
[error] 1 |@Deprecated
[error]   |^^^^^^^^^^^
[error]   |wrong number of arguments at <no phase> for (since: String, forRemoval: Boolean): Deprecated: (Deprecated#<init> : (since: String, forRemoval: Boolean): Deprecated), expected: 2, found: 0
[error] one error found
[error] (Compile / doc) DottyDoc Compilation Failed
[error] Total time: 3 s, completed Jul 13, 2021, 1:12:02 PM

Handling the bootclasspath was recently improved in 7d0e477 by @pikinier20 in #11582, but even with that change the problem remains.

@raboof raboof changed the title DottyDoc doesn't appear to take into account bootclasspath DottyDoc doesn't take into account '-release' to set the bootclasspath Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants