Skip to content

Refresh no-input diagnostics when wildcard files change - #64717

Open
Jake Bailey (jakebailey) wants to merge 2 commits into
microsoft:mainfrom
jakebailey:wildcard-input-diagnostics
Open

Jake Bailey (jakebailey) wants to merge 2 commits into
microsoft:mainfrom
jakebailey:wildcard-input-diagnostics

Conversation

@jakebailey

@jakebailey Jake Bailey (jakebailey) commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

This is one of the few "expected diffs", and can be fixed.

See second commit for the actual change.

Changing the set of wildcard-matched sources can leave the no-inputs
error missing or stale. Cover both directions in ordinary and build
watch mode before correcting the cached config diagnostics.
Watch sessions must report the same config errors as a fresh parse when
sources appear or disappear. Recompute the no-inputs error on filename
reload without mutating the earlier config snapshot or other errors.
Copilot AI balanced review requested due to automatic review settings October 10, 2026 03:17
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Empty config files still lose TS18003 after wildcard file reloads because their raw value fails the map assertion.

1 open finding
What changed in this PR

Refreshes TS18003 diagnostics when wildcard-matched files are added or removed during watch mode.

Changes:

  • Recomputes no-input diagnostics when reloading file names.
  • Adds unit and watch-mode coverage.
  • Updates watch baselines.
File Description
tsc/​internal/​tsoptions/​tsconfigparsing.go Extracts no-input diagnostic creation.
tsc/​internal/​tsoptions/​parsedcommandline.go Refreshes TS18003 during file reloads.
tsc/​internal/​tsoptions/​parsedcommandline_test.go Tests diagnostic transitions.
tsc/​internal/​execute/​tsctests/​tscwatch_test.go Adds watch scenarios.
tsc/​testdata/​baselines/​reference/​tscWatch/​commandLineWatch/​watch-updates-no-inputs-diagnostics-build-false-initiallyEmpty-true.js Baselines initially empty watch behavior.
tsc/​testdata/​baselines/​reference/​tscWatch/​commandLineWatch/​watch-updates-no-inputs-diagnostics-build-false-initiallyEmpty-false.js Baselines initially populated watch behavior.
tsc/​testdata/​baselines/​reference/​tscWatch/​commandLineWatch/​watch-detects-nested-subdirectory-removed-and-recreated.js Records restored TS18003 parity.
tsc/​testdata/​baselines/​reference/​tsbuildWatch/​commandLineWatch/​watch-updates-no-inputs-diagnostics-build-true-initiallyEmpty-true.js Baselines empty build-watch behavior.
tsc/​testdata/​baselines/​reference/​tsbuildWatch/​commandLineWatch/​watch-updates-no-inputs-diagnostics-build-true-initiallyEmpty-false.js Baselines populated build-watch behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +516 to +518
if raw, ok := p.Raw.(*collections.OrderedMap[string, any]); ok && shouldReportNoInputFiles(fileNames, canJsonReportNoInputFiles(raw), nil) {
errors = append(errors, getErrorForNoInputFiles(p.getConfigFileSpecs(), p.ConfigFileName()))
}

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

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

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

2 participants