Open ricardoitv opened 10 months ago
Someone at my company was experimenting with the code and they found that if we extract WebIdentityTokenFileCredentialsProvider.builder
into a variable, then everything works again.
So this works:
import software.amazon.awssdk.auth.credentials.WebIdentityTokenFileCredentialsProvider
import java.nio.file.Paths
object Main extends App {
val builder = WebIdentityTokenFileCredentialsProvider.builder
builder
.roleArn("dummy")
.roleSessionName("Dummy")
.webIdentityTokenFile(Paths.get("."))
.build
}
Compiler version
3.3.0
but I've also tried with3.2.0
,3.1.0
and3.0.0
. I couldn't reproduce it with Scala2.13.11
.Minimized code
SBT dependency:
Repo with all the code: https://github.com/ricardoitv/cyclic-reference-involving-object/tree/without-sbt-native-packager
Output
Expectation
The error is reproducible by running
sbt doc
but I've bumped into it when runningsbt stage
(sbt-native-packager
version1.9.16
).It looks similar to this issue: https://github.com/lampepfl/dotty/issues/15288