-
Notifications
You must be signed in to change notification settings - Fork 127
Description
AnalysisCallback is as of now not thread-safe. In @dragos's words:
Since we run several workers at the same time, and each worker has its own Global and analysis extraction logic, they perform updates concurrently. We used to override the compileIncrementalTask and fork some parts of Sbt to get to call our own implementation, but I think there should be a cleaner way, especially since xscbti.AnalysisCallback is an interface so it would be nice to be able to provide a different implementation.
This feature enables future parallel Scala compilers (like Hydra) to use the incremental compiler out of the box.
The place where the implementation should be provided is https://github.com/sbt/zinc/blob/1.x/internal/zinc-core/src/main/scala/sbt/internal/inc/Compile.scala, probably in an independent file.
The tests can be added in the zincCore project.