-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 crashes with cyclic reference error when analyzing code that uses an AWS builder class #15288
Comments
A self-contained example: QueryRequest.java interface CopyableBuilder<B extends CopyableBuilder<B, T>, T extends ToCopyableBuilder<B, T>> {}
interface ToCopyableBuilder<B extends CopyableBuilder<B, T>, T extends ToCopyableBuilder<B, T>> {}
public class QueryRequest implements ToCopyableBuilder<QueryRequest.Builder, QueryRequest> {
public static Builder builder() { throw new UnsupportedOperationException(); }
public interface Builder extends CopyableBuilder<Builder, QueryRequest> {
void build();
}
} Test.scala object Test:
def makeQuery = QueryRequest.builder().build()
Output:
|
Related: #14059 |
Likely also related, an older comment from scala-users Discord: https://discord.com/channels/632150470000902164/632150470000902166/914808520392712234
|
The error happens when trying to read the inner classes attribute in classfile parser
|
Is there any workaround for this issue? I am also experiencing it in monix-connect while running |
if you're cross-compiling, you could turn off scaladoc generation for scala 3 only: Compile / doc / sources := { if (scalaVersion.value.startsWith("3.") Nil else (Compile / doc / sources).value } |
Thank you @smarter, that would make it. |
I have the same issue with this file: Scala 3.2.0 In my
Thank you @smarter for the workaround and @armanbilge for pointing me in the right direction ❤️ For me the code compiles and runs correctly, but when I do
When using v1 of the aws sdk with similar code (https://github.com/mabasic/izradaweba/blob/master/src/main/scala/eu/izradaweba/mail/aws/v1/Ses.scala), I don't have this issue. Maybe the issue is in the aws sdk v2? |
…lookup Previously, the call to `info` on the module val could lead to a cycle since the module val might be in the process of being completed. This commit fixes this by only using the module class which is all we need to lookup members. Fixes scala#15288. Fixes scala#14059. Co-Authored-By: Tom Grigg <tomegrigg@gmail.com>
…lookup (#16882) Previously, the call to `info` on the module val could lead to a cycle since the module val might be in the process of being completed. This commit fixes this by only using the module class which is all we need to lookup members. Fixes #15288. Fixes #14059. Co-Authored-By: Tom Grigg <tomegrigg@gmail.com>
This sbt command was failing with an `InvocationTargetException`: ``` +aws-s3-sdk-v2 / Compile / doc ``` ...the 'doc' command is invoked during release, so we need it to work! This is a known issue: scala/scala3#15288 See also scanamo/scanamo#1643, which looks like it fixed the issue by downgrading to Scala 3.2.0. Weirdly, this fix did not seem to work for me when I tried it here.
Compiler version
3.1.2
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: