-
Notifications
You must be signed in to change notification settings - Fork 3.1k
PC invalidates previous work on new run #10867
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
base: 2.13.x
Are you sure you want to change the base?
Conversation
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.
Looks good / safe to me, I don't fully follow (what are the "parser callbacks"?)
@@ -301,6 +301,7 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "") | |||
def isOutOfDate: Boolean = outOfDate | |||
|
|||
def demandNewCompilerRun() = { | |||
if (!lastWasReload) allSources.foreach(getUnit(_).foreach(reset(_))) |
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.
would it be equivalent to add a boolean param to demandNewCompilerRun
and set it true at the callsite in reload
?
There is |
BTW I was curious (or annoyed) about the test; it's not my intention to muck with (or break) the PC. I assumed incorrectly that it would be a mechanism problem that required no special knowledge of PC semantics and operations. |
The "up-to-date" check is not sufficient when fetching doc comments, since a unit may have been typechecked, with doc wrapper trees removed. A test instability was due to whether the scheduler was checked by a callback or the runner thread. One sample file had no parser callbacks at all.
27a4ae7
to
11a33e4
Compare
The "up-to-date" check is not sufficient when fetching doc comments, since a unit may have been typechecked, with doc wrapper trees removed.
A test instability was due to whether the scheduler was checked by a callback or the runner thread.
One sample file had no parser callbacks at all.
Probably the change at
demandNewCompilerRun
can be refined, as it matters just for doc comments.askParse
is tweaked to submit one file at a time, since otherwise the parser callback on the first job will look for work and start the next parse. (In this test, the chain stopped there because the second file was trivial and invoked no callback.)Fixes scala/scala-dev#840