scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

Support Zinc pipelining

Open bishabosha opened this issue 1 year ago • 0 comments

support ThisBuild/usePipelining := true in sbt for Scala 3 projects.

Requirements

  • add -Ypickle-java and -Ypickle-write flags, expected by Zinc when pipelining is enabled in sbt.
  • presence of -Ypickle-write <destination> arguments requires that TASTy files are written early to that destination (ASAP after pickler)
  • apiPhaseCompleted and dependencyPhaseCompleted Zinc callbacks must be called as soon as TASTy is fully written, which will activate early downstream compilation.
  • call generatedNonLocalClass callback before TASTy writing, which is necessary for Zinc to run the incremental algorithm early.
  • -Ypickle-java flag is a directive to include TASTy for Java sources in the -Ypickle-write destination (not in the final compiler outputs)

Compatibility

All functionality is observable only under -Y flags, so this isn't a breaking change

bishabosha avatar Feb 20 '24 14:02 bishabosha