Skip to content

Scala 3.5.x stopped reporting generated classes via the Zinc incremental callback by default #21179

Closed
@vasilmkd

Description

@vasilmkd

Compiler version

Scala 3.5.0-RC1 and above

I'm running Scala 3.5.0-RCX versions in the IntelliJ IDEA incremental compilation tests and I've noticed a change in behaviour. In IDEA, we have two modes of compilation, one using the Zinc incremental compiler, and one using the IDEA bytecode based incremental compiler.

Compiling using Zinc is not affected, because Zinc requires full analysis to run (xsbti.AnalysisCallback#enabled returns true).

When the alternative IDEA incremental compiler is used, we invoke scalac via sbt.internal.inc.AnalyzingCompiler. This is where I observe the change in behaviour.

All Scala versions prior to Scala 3.5.0 used to execute the xsbti.AnalysisCallback#generatedNonLocalClass and accompanying methods to report the production of .class files.

Judging by the previous behaviour, and the Scala 2 compiler source code, this method should be run regardless of the output of xsbti.AnalysisCallback#enabled. This can be seen here.

Somewhere around the changes made to the Scala 3 compiler when support for usePipelining was developed, this changed for Scala 3.5.0.

generatedNonLocalClass is now called only if xsbti.AnalysisCallback#enabled is true.

I will update this ticket as I discover more about the problem.

Tagging @bishabosha as someone who should have some context on the problem.

Thanks in advance.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions