Handle stale transitive deps after import rename#2727
Merged
Conversation
Add a test showing incorrect cache invalidation for renamed imports: main.act subclasses base.Base, base.act switches its provider import from oldpkg.ttt to newpkg.ttt, and the rebuild runs without cleaning out/. The cached .ty for main could still reference oldpkg.ttt and fail with a missing type interface error even after base had been rebuilt.
d617859 to
1063961
Compare
Contributor
|
LGTM. We treated many errors as hard errors initially because it made it easier for me to write this stuff, so like "invalid cache" is an error but it is of course recoverable. I just missed updating from "throw hard error" to "just forget the cache and rebuild" in a bunch of places. I should audit - might be a few more. Anyway, this is the right fix for these, so merging. |
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.
Add a test showing incorrect cache invalidation for renamed imports: main.act subclasses base.Base, base.act switches its provider import from oldpkg.ttt to newpkg.ttt, and the rebuild runs without cleaning out/. The cached .ty for main could still reference oldpkg.ttt and fail with a missing type interface error even after base had been rebuilt.
@plajjan the branch also includes a fix that avoids the same problem in sorespo, but I am not 100% how well it fits in with the rest of the ideas in the compiler ... Please check, and if do you come up with a different approach, test by compiling sorespo main (
c693ea740a04e212db4cdf8187f6b55bf3732fb9) and stratoweave (11315b242078662715145cedf788742cd6c73183) without clearing the local cache.