Skip to content

Treat missing dep name hashes as stale#2637

Merged
plajjan merged 1 commit into
mainfrom
fix-missing-dep-hash
Feb 13, 2026
Merged

Treat missing dep name hashes as stale#2637
plajjan merged 1 commit into
mainfrom
fix-missing-dep-hash

Conversation

@plajjan

@plajjan plajjan commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

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.

Fixes #2621, I think

Fixes #2635.

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.
@plajjan plajjan merged commit 761f148 into main Feb 13, 2026
38 of 39 checks passed
@plajjan plajjan deleted the fix-missing-dep-hash branch February 13, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hash info missing for Investigate removing name in --watch mode

1 participant