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
Avoid CCE when scalac internally uses compileLate #2453
Merged
Merged
Conversation
This file contains 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
retronym
force-pushed
the
topic/sourcepath
branch
from
February 10, 2016 13:15
310405a
to
e7f3670
Compare
retronym
changed the title
Avoid CCE when scalac internally uses compileLate
Avoid CCE when scalac internally uses compileLate. Fixes #2452
Feb 10, 2016
retronym
changed the title
Avoid CCE when scalac internally uses compileLate. Fixes #2452
Avoid CCE when scalac internally uses compileLate
Feb 10, 2016
Would it make sense to change https://github.com/sbt/sbt/blob/0.13/compile/interface/src/main/scala/xsbt/Analyzer.scala while we're at it? |
{ | ||
val start = System.currentTimeMillis | ||
currentRun.units.foreach(processUnit) | ||
super.run() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compiler-project / run2.8
failed:
[error] /tmp/sbt_2e562db/xsbt/API.scala:31: error: ApiPhase.super.run of type Unit does not take parameters
[error] super.run()
[error] ^
[error] one error found
retronym
force-pushed
the
topic/sourcepath
branch
from
February 10, 2016 22:25
e7f3670
to
2e5567b
Compare
For example, when the `--sourcepath` option is provided and the refchecks phase compiles an annotation found on a referenced symbol from the sourcepath. `compileLate` assumes that all non-sentinel compiler phases can be down cast to `GlobalPhase`. This commit changes the two phases in SBT to extend this instead of `Phase`. This has the knock on benefit of simplifying the phases by letting the `GlobalPhase.run` iterator over the list of compilation units and feed them to us one by one. I checked that the test case failed before making each change.
@eed3si9n Just updated the extraction phase, too, and fixed the compile error. |
LGTM |
eed3si9n
added a commit
that referenced
this pull request
Feb 11, 2016
Avoid CCE when scalac internally uses compileLate
7 tasks
This was referenced Feb 11, 2016
This was referenced Feb 27, 2016
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.
For example, when the
--sourcepath
option is providedand the refchecks phase compiles an annotation found
on a referenced symbol from the sourcepath.
compileLate
assumes that all non-sentinel compilerphases can be down cast to
GlobalPhase
.This commit changes the two phases in SBT to extend
this instead of
Phase
. This has the knock on benefitof simplifying the phases by letting the
GlobalPhase.run
iterator over the list of compilation units and feed them
to us one by one.
I checked that the test case failed before making each
change.