Skip to content

Add invalidation stress test. #4010

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

Merged
merged 2 commits into from
May 14, 2025

Conversation

davidmorgan
Copy link
Contributor

@davidmorgan davidmorgan commented May 14, 2025

For #3811.

Add invalidation stress test, add smaller test cases for and fix two bugs that it found. It also would have caught #3999.

PhasedAssetDeps bug: this is related to but distinct from #3999, the loaded asset deps data was reporting its phase as the first phase with incomplete data, causing data at later phases to be not readable. In fact, it can have incomplete data for arbitrary phases, if the load was scheduled for load at a later phase but no later phase picked up the work because there was no more resolution done. Fix by just treating the data as complete for this case: it won't be used, because the loaded data is only used to reconstruct the import graphs exactly as they were in the previous build.

LibraryCycleGraphLoader bug: the comment states that _idsToLoad is either empty or unchanged; this is not quite true: a recursive call can add work at a later phase; it's possible for a recursive call to add work at the current phase, breaking that invariant. This is unlikely to actually happen in practice, so just fall back to a slower remove.

Copy link

github-actions bot commented May 14, 2025

PR Health

Add test cases for, and fix, two bugs it caught.
@davidmorgan davidmorgan force-pushed the invalidation-stress-test branch from 1fda8cf to 3b85007 Compare May 14, 2025 12:43
@davidmorgan davidmorgan marked this pull request as ready for review May 14, 2025 13:03
@davidmorgan davidmorgan requested a review from jensjoha May 14, 2025 13:03
@davidmorgan davidmorgan merged commit effc827 into dart-lang:master May 14, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants