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.
Fixes a few bugs with incremental compilation. The first tripped an assert in some cases (although didn't actually affect ReleaseFast compilers in practice AFAICT), while the second was a much more significant bug. The bug in question was that while collecting error bundles, we corrupted the state of
Zcu.failed_analysis
on the false assumption that we would never use it again. That meant that when future incremental updates tried to remove elements from the map (because the correspondingAnalUnit
was undergoing re-analysis), the error wasn't found by the lookup, causing it to persist forever.@andrewrk, this bug absolutely explains why we have consistently been having issues with incremental compilation when trying to use
-Dno-bin -fincremental --watch
for e.g. big compiler changesets. Because ofstd.ArrayHashMapUnmanaged(...).linear_scan_max
, this bug did not manifest on small test cases (i.e. every case intest/incremental/
!), but did manifest very nastily once you exceeded 8 compile errors. After this is merged, I'd encourage you to give incremental another go!