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

Scaladoc regression, when using java defined annotations #18231

Closed
WojciechMazur opened this issue Jul 17, 2023 · 2 comments · Fixed by #21929
Closed

Scaladoc regression, when using java defined annotations #18231

WojciechMazur opened this issue Jul 17, 2023 · 2 comments · Fixed by #21929
Assignees
Labels
area:doctool area:tasty-inspector issues relating to the TASTy inspector itype:bug regression This worked in a previous version but doesn't anymore stat:fixed in next The issue was fixed in Next and only still applies to LTS.
Milestone

Comments

@WojciechMazur
Copy link
Contributor

WojciechMazur commented Jul 17, 2023

Based on OpenCB failure in akka/akka-http https://github.com/VirtusLab/community-build3/actions/runs/5557868276/jobs/10152257798

Compiler version

3.3.2-RC
Works in 3.3.1-RC4

Bisect results:
Last good release: 3.3.2-RC1-bin-20230615-916d4e7-NIGHTLY
First bad release: 3.3.2-RC1-bin-20230619-a68568c-NIGHTLY

The commit-based bisect fails due to an errors when publishing compiler

Minimized code

Fails only when compiling with scaladoc, compiles correctly in standard compilation

//> using option -release:8

object Foo {
    @Deprecated
    def foo(): Unit = ???
}

Output

-- Error: main.scala:4:4 -------------------------------------------------------
4 |    @Deprecated
  |    ^^^^^^^^^^^
  |wrong number of arguments at <no phase> for (since: String, forRemoval: Boolean): Deprecated: (Deprecated#<init> : (since: String, forRemoval: Boolean): Deprecated), expected: 2, found: 0
1 error found

Expectation

Should compile

@WojciechMazur WojciechMazur added itype:bug area:doctool regression This worked in a previous version but doesn't anymore labels Jul 17, 2023
@Florian3k
Copy link
Contributor

This works fine using java 8 (scala-cli doc i18231.scala --jvm 8)
but fails with newer (scala-cli doc i18231.scala --jvm 11)

Deprecated annotation contains 2 new fields since java 9 (since and forRemoval, see java docs)

Source for this error (wrong number of arguments at ...) is in the compiler, not scaladoc, so it's coming from the TastyInspector most likely.
I suspect there is some problem with classpath that TastyInspector is using, but I don't know much about TASTy and TastyInspector.
In the range of commits from bisect the only one that looks suspicious to me is 3b20d78

@Florian3k
Copy link
Contributor

Underlying issue is most likely this: #19951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:doctool area:tasty-inspector issues relating to the TASTy inspector itype:bug regression This worked in a previous version but doesn't anymore stat:fixed in next The issue was fixed in Next and only still applies to LTS.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants