Treat missing dep name hashes as stale#2637
Merged
Merged
Conversation
When a cached .ty references dependency names that no longer exist, incremental builds were failing early with an internal-facing "Hash info missing" diagnostic. This change treats missing dep name/hash entries as stale-cache signals during TyTask dependency validation. Instead of hard-failing, we mark the module stale, force front passes, and re-typecheck from source. Behavior after this change: - Missing dep name hashes no longer emit internal hash-missing diagnostics. - Incremental recompilation proceeds through normal front-pass logic. - If source still uses removed symbols, users get a proper source-level error. - If source has already been updated, build can recover without wiping out/. Also adds an incremental regression test that covers this path and asserts we refresh front passes rather than surfacing the internal hash-missing error.
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.
When a cached .ty references dependency names that no longer exist, incremental builds were failing early with an internal-facing "Hash info missing" diagnostic.
This change treats missing dep name/hash entries as stale-cache signals during TyTask dependency validation. Instead of hard-failing, we mark the module stale, force front passes, and re-typecheck from source.
Behavior after this change:
Also adds an incremental regression test that covers this path and asserts we refresh front passes rather than surfacing the internal hash-missing error.
Fixes #2621, I think
Fixes #2635.