Experimental support for outline type checking#8077
Merged
retronym merged 7 commits intoscala:2.12.xfrom May 26, 2019
Merged
Conversation
3cfb31c to
e4a2db1
Compare
- Allow user specified reporter
- funnel javac errors through it
- funnel PipelineMain's logging through it, too.
- Use a separate FileManager for each javac invocation to avoid an
apparent race condition.
- Expose config knobs programatically rather than only through
system properties.
In this new mode, the RHS of definitions is only typechecked if the definition lacks an explicit type ascription, or or it may contain a super call that is compiled to a trait super accessor. Refer to the new test case for a motivating example.
e4a2db1 to
79ace8a
Compare
Member
Author
|
I'm testing this out now on some real world projects. Will mark as WIP while I do that. |
826cd8c to
a669e91
Compare
It's subsumed by Jason's improvements to name resolution in scala#7671. The leak yielded spurious errors in mixed Scala/Java compilation (akka-http). (cherry picked from commit 8529be7)
Member
Author
|
Here's how I've exported suitable I'm still analysing the results. One functional problem so far:
|
adriaanm
reviewed
May 24, 2019
Contributor
|
Very nice! I would like to see a short motivation for each test case, but LGTM otherwise. |
ce06564 to
08e697d
Compare
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new mode for
PipelineMainthat can shorten the critical path of a build and extract more parallelism from the post-typer compiler phases (at the cost of instantiating multiple instances ofGlobal).First, we compile all sources with
-Youtline -Ystop-after:pickler. The first option disables typechecking of the RHS of definitions that have ascribed types.The RHS is not skipped when it contains a
supercall that might need a super accessor. (hat tip to @smarter for finding this corner case in dotty). Are there more like it that we haven't identified?The pickles are then exported and made available to downstream compilation, as is also the case with the
strategy=Pipeline. The sources for the current projects are then compiled in parallel in chunks, also using the exported pickles on the classpath.Testing this out
guardian-frontend. In the past I've experimented with the full multi-module build, but in this case I want to focus on thecommonproject that is the bottleneck the build.Pipeline + Outline
Pipeline
Traditional
Summary
Caveats
-Ymacro-classpathsetting is needed with the macro implementation.Future work: