Skip to content

Fix stale incremental diagnostics after UMD declaration changes - #64966

Open
Dunqing wants to merge 1 commit into
microsoft:mainfrom
Dunqing:fix/umd-global-export-invalidation
Open

Dunqing wants to merge 1 commit into
microsoft:mainfrom
Dunqing:fix/umd-global-export-invalidation

Conversation

@Dunqing

@Dunqing Dunqing commented Oct 26, 2026 •

Copy link
Copy Markdown

Related issue: #64967.

UMD declarations with export as namespace are incorrectly classified as not affecting global scope, allowing incremental builds to reuse stale diagnostics for unchanged consumers.

Check GlobalExports after binding so the existing global invalidation logic handles namespace, type, and file changes. Add CLI and watch regression histories that compare incremental results with fresh builds.

The independent CLI reproduction passes all 11 stages with the fix (four mismatches without it). The new framework tests and baselines remain pending because test dependencies are unavailable offline. Full test, lint, and repository format checks have not been run.

AI assistance: The implementation and tests were authored with AI assistance.

Treat bound UMD global exports as affecting global scope so incremental
builds invalidate unchanged consumers after namespace or type changes.

Add shared CLI and watch regression histories using the existing test
framework. Baselines remain to be generated: offline framework execution
is blocked by uncached test dependencies.
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 26, 2026
@Dunqing Dunqing changed the title Invalidate global consumers when UMD exports change Fix stale incremental diagnostics after UMD declaration changes Oct 26, 2026
@Dunqing
Dunqing marked this pull request as ready for review October 26, 2026 06:23
@typescript-automation

Copy link
Copy Markdown
Contributor

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.


import "testing"

func TestTscUMD(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be in an existing tsc test. We have places for these that are not new files.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants