java.lang.Exception: Stack trace

Today I hit the following compiler problem (Scala 3.3.0)
The compile phase is stuck, without outputs.
It is a multi-project build, and we want to publish it cross-version, (2.13, 3.3)
It works on 2.13, It does not on 3.3.0

  1. Running environment. Linux
    I did try the suggestion, to increase the Java stack size (-Xss ). No luck.
    The project is open source and the issue is reproducible.
    But before reproducing the issue I want to minimize the issue, and I can share the repo later.

This is the stack trace that I obtained using the compiler flag: “-Ydebug-error”,

Could you recommend to me some compiler flags, which stop the compiler at the first error, and do not be stuck in an infinite loop?

Thanks for your support

Sorry for the verbose stack trace.

java.lang.Exception: Stack trace
        at java.base/java.lang.Thread.dumpStack(Thread.java:1383)
        at dotty.tools.dotc.report$.error(report.scala:70)
        at dotty.tools.dotc.typer.Typer.issueErrors$1$$anonfun$1(Typer.scala:3656)
        at scala.runtime.function.JProcedure3.apply(JProcedure3.java:15)
        at scala.runtime.function.JProcedure3.apply(JProcedure3.java:10)
        at scala.collection.LazyZip3.foreach(LazyZipOps.scala:248)
        at dotty.tools.dotc.typer.Typer.issueErrors$1(Typer.scala:3658)
        at dotty.tools.dotc.typer.Typer.addImplicitArgs$1(Typer.scala:3680)
        at dotty.tools.dotc.typer.Typer.adaptNoArgsImplicitMethod$1(Typer.scala:3697)
        at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3886)
        at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4120)
        at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3435)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Implicits.tryConversion$1(Implicits.scala:1098)
        at dotty.tools.dotc.typer.Implicits.tryConversionForSelection$1(Implicits.scala:1107)
        at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1127)
        at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:806)
        at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:115)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1201)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1300)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1470)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1498)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1531)
        at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:1022)
        at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:806)
        at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:115)
        at dotty.tools.dotc.typer.Implicits.inferView(Implicits.scala:844)
        at dotty.tools.dotc.typer.Implicits.inferView$(Implicits.scala:806)
        at dotty.tools.dotc.typer.Typer.inferView(Typer.scala:115)
        at dotty.tools.dotc.typer.Implicits.viewExists(Implicits.scala:819)
        at dotty.tools.dotc.typer.Implicits.viewExists$(Implicits.scala:806)
        at dotty.tools.dotc.typer.Typer.viewExists(Typer.scala:115)
        at dotty.tools.dotc.typer.ProtoTypes$Compatibility.necessarilyCompatible(ProtoTypes.scala:47)
        at dotty.tools.dotc.typer.ProtoTypes$Compatibility.necessarilyCompatible$(ProtoTypes.scala:26)
        at dotty.tools.dotc.typer.Typer.necessarilyCompatible(Typer.scala:115)
        at dotty.tools.dotc.typer.ProtoTypes$Compatibility.constrainResult(ProtoTypes.scala:97)
        at dotty.tools.dotc.typer.ProtoTypes$Compatibility.constrainResult$(ProtoTypes.scala:26)
        at dotty.tools.dotc.typer.Typer.constrainResult(Typer.scala:115)
        at dotty.tools.dotc.typer.ProtoTypes$Compatibility.constrainResult(ProtoTypes.scala:117)
        at dotty.tools.dotc.typer.ProtoTypes$Compatibility.constrainResult$(ProtoTypes.scala:26)
        at dotty.tools.dotc.typer.Typer.constrainResult(Typer.scala:115)
        at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3884)
        at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4120)
        at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3435)
        at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3446)
        at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4107)
        at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3435)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.Typer.typeSelectOnTerm$1(Typer.scala:686)
        at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:724)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2897)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2990)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:934)
        at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1094)
        at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:352)
        at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:115)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2928)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2991)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$3$$anonfun$1(ProtoTypes.scala:447)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:416)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$3(ProtoTypes.scala:447)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$adapted$1(ProtoTypes.scala:447)
        at dotty.tools.dotc.core.Decorators$.loop$3(Decorators.scala:181)
        at dotty.tools.dotc.core.Decorators$.mapWithIndexConserve(Decorators.scala:188)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArgs(ProtoTypes.scala:447)
        at dotty.tools.dotc.typer.Applications.resolveOverloaded1(Applications.scala:2042)
        at dotty.tools.dotc.typer.Applications.resolve$1(Applications.scala:1872)
        at dotty.tools.dotc.typer.Applications.resolveOverloaded(Applications.scala:1913)
        at dotty.tools.dotc.typer.Applications.resolveOverloaded$(Applications.scala:352)
        at dotty.tools.dotc.typer.Typer.resolveOverloaded(Typer.scala:115)
        at dotty.tools.dotc.typer.Typer.adaptOverloaded$1(Typer.scala:3477)
        at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4097)
        at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3435)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:934)
        at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1094)
        at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:352)
        at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:115)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2928)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2991)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.Typer.typeSelectOnTerm$1(Typer.scala:686)
        at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:724)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2897)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2990)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.Typer.typeSelectOnTerm$1(Typer.scala:686)
        at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:724)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2897)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2990)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$7(ProtoTypes.scala:493)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:416)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:494)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:890)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:890)
        at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:582)
        at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:646)
        at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:485)
        at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:772)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:889)
        at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1119)
        at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:352)
        at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:115)
        at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:962)
        at dotty.tools.dotc.typer.Applications.realApply$1$$anonfun$2(Applications.scala:1045)
        at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:3198)
        at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:1056)
        at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1094)
        at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:352)
        at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:115)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2928)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2991)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.Typer.typeSelectOnTerm$1(Typer.scala:686)
        at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:724)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2897)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2990)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:934)
        at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1094)
        at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:352)
        at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:115)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2928)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2991)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.Typer.$anonfun$49(Typer.scala:2382)
        at dotty.tools.dotc.inlines.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:249)
        at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2382)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2904)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2990)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3084)
        at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3130)
        at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:2562)
        at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:2916)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2920)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2990)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3084)
        at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3130)
        at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2692)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2961)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2991)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:44)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$adapted$1(TyperPhase.scala:54)
        at scala.Function0.apply$mcV$sp(Function0.scala:42)
        at dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:437)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:54)
        at dotty.tools.dotc.typer.TyperPhase.runOn$$anonfun$3(TyperPhase.scala:88)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.collection.immutable.List.foreach(List.scala:333)
        at dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:88)
        at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:247)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1321)
        at dotty.tools.dotc.Run.runPhases$1(Run.scala:263)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:271)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:280)
        at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:280)
        at dotty.tools.dotc.Run.compileSources(Run.scala:195)
        at dotty.tools.dotc.Run.compile(Run.scala:179)
        at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
        at dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:88)
        at dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
        at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
        at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:193)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:248)
        at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:183)
        at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163)
        at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
        at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163)
        at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:211)
        at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:534)
        at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:534)
        at sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:180)
        at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:178)
        at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:464)
        at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
        at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
        at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
        at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263)
        at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:419)
        at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:506)
        at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:406)
        at sbt.internal.inc.Incremental$.apply(Incremental.scala:172)
        at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:534)
        at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:488)
        at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
        at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:425)
        at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
        at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2369)
        at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2319)
        at sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:31)
        at sbt.internal.io.Retry$.apply(Retry.scala:47)
        at sbt.internal.io.Retry$.apply(Retry.scala:29)
        at sbt.internal.io.Retry$.apply(Retry.scala:24)
        at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
        at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2317)
        at scala.Function1.$anonfun$compose$1(Function1.scala:49)
        at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
        at sbt.std.Transform$$anon$4.work(Transform.scala:69)
        at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
        at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
        at sbt.Execute.work(Execute.scala:292)
        at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
        at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

I’d suggest opening a ticket to get guidance on minimization.

I see the error is constructing missingArgMessage which does some implicit search to find what “not found” message to append (I assume).

That code has a comment referencing an old looper crash, so perhaps that fix needs a tweak.

Does that mean you don’t see any error message? (As opposed to, it’s stuck emitting the same error repeatedly.)

Sometimes reducing the stack helps because it forces an error earlier. Possibly an actual crash will force it to tell you what it was typechecking (as Scala 2 tries to do).

But I’d suggest opening a ticket for actual expert guidance, since it’s obviously a bug, and you are likely to receive motivated assistance.

@som-snytt Thanks for your support and quick response.

Finally, I found the issue. I do believe it is a bug, but I do need to double-check this list, maybe if it was reported. https://github.com/lampepfl/dotty/issues

Summary:
“eta-expanded replacement into a function”, stack the compile phase without console output on Scala 3.
The warning was shown on the previous compilation, Scala 2, but if you have other warnings :(, I didn’t pay attention to this.

Apologies for the false alarm, thanks again for your response. I still think that it is a bug, the compiler should throw an error, stop, but not be stuck

[warn] Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method FOOBOO,
[warn] or remove the empty argument list from its definition (Java-defined methods are exempt).
[warn] In Scala 3, an unapplied method like this will be eta-expanded into a function.
[warn]                 FOOBOO + "')"
[warn]                                   ^
[warn] one warning found
[1]  + 46182 suspended  sbt / compileIncremental 700s
1 Like

General advice: Use -Werror. In Scala “Warnings” usually point to real issues.

It’s not like in some other languages where a substantial amount of warnings are false positives. In Scala you really need to double and triple check whether it is a false positive. Most of the time it is not. So take warnings serious, make them errors, and suppress them only on a case by case basis—after thorough consideration (best with some explanatory comment why the compiler emitted a false warning).

3 Likes

Can confirm, Scala warnings are crafted with TLC. But only if TLC is legalized in your state.

It’s great that the Scala 2 warning was proleptic. Thanks for the shout-out to -Werror, and also let’s add -Xsource:3 on Scala 2 if that works for you.

1 Like