Avoid CCE when scalac internally uses compileLate#2453
Merged
Conversation
310405a to
e7f3670
Compare
Member
|
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() |
Member
There was a problem hiding this comment.
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
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.
Member
Author
|
@eed3si9n Just updated the extraction phase, too, and fixed the compile error. |
Member
|
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
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.
For example, when the
--sourcepathoption is providedand the refchecks phase compiles an annotation found
on a referenced symbol from the sourcepath.
compileLateassumes 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.runiterator 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.