-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support Zinc pipelining #19743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This includes support for a single pass pipelined build, compatible with sbt's `ThisBuild/usePipelining`, - adds `-Ypickle-java` and `-Ypickle-write` flags, expected by Zinc when pipelining is enabled in sbt. - when `-Ypickle-write <directory|jar>` is set, then write tasty from pickler to that output, (building upon #19074 support for Java signatures in TASTy files). - call `apiPhaseCompleted` and `dependencyPhaseCompleted` callbacks, which will activate early downstream compilation - calls `generatedNonLocalClass` callbacks early, which enables Zinc to run the incremental algorithm before starting downstream compilation (including checking for macro definitions). generally this can be reviewed commit-by-commit, as they each do an isolated feature. As well as many tests in the `sbt-test/pipelining` directory, this has also been tested locally on `akka/akka-http`, `apache/incubator-pekko`, `lichess-org/lila`, `scalacenter/scaladex`, `typelevel/fs2`, `typelevel/http4s`, `typelevel/cats`, `slick/slick`. This PR sets the ground work for an optional 2-pass compile (reusing the `OUTLINEattr`), which should use a faster frontend (skipping rhs when possible) before producing tasty signatures fixes #19743
Hi! Can we expect this to be backported to LTS some day? |
We were considering it, however, the effort to enable pipelining spans over multiple PRs, some of these might be problematic to backport. Right now it seems unlikely it would be backported. We're considering having a new LTS series somewhere in Q4 2025 thus it might be even more likely to be backported. |
It would need a redesign because it specifically uses a new TASTy feature to implement (Attributes section), meaning its problematic to consume from an older compiler in the same LTS. perhaps like with |
support
ThisBuild/usePipelining := true
in sbt for Scala 3 projects.Requirements
-Ypickle-java
and-Ypickle-write
flags, expected by Zinc when pipelining is enabled in sbt.-Ypickle-write <destination>
arguments requires that TASTy files are written early to that destination (ASAP afterpickler
)apiPhaseCompleted
anddependencyPhaseCompleted
Zinc callbacks must be called as soon as TASTy is fully written, which will activate early downstream compilation.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 changeThe text was updated successfully, but these errors were encountered: