-
Notifications
You must be signed in to change notification settings - Fork 80
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
Adding tests for cross-module constant equality after hot restart in DDC #2349
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.
Very cool, thanks @Markzipan for porting this over!
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.
LGTM, thanks!
Oh I see. This is intended to be a regression test to catch if we break expected behavior when clearing constant caches. It should be passing now and with any future fixes, that makes sense now. So we should add a new test that fails now because of the behavior that we observed in a flutter app where the stale const from before the hot restart remained live in the UI. |
I added additional cases, I'm having trouble reproducing the flutter case. IIRC we have 2 cases we need to ultimately test:
Edit: following up here - the issue was that my SDK was checked out at a version prior to turning on the new type system by default. |
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.
Thanks @Markzipan - I added a note below which I think could be the reason why you have not been able to repro the "flutter issue". Let me know if that addresses the mismatch.
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.
Thanks for addressing all the requests, LGTM (just a minor comment nit below)
These tests pass today but fail if certain constant-holding containers are cleared after a hot restart in DDC (see this bug.
Additional changes:
makeEditToDartLibFile
, a helper function which lets us edit non-main-module files.