ReviewOS

home-lang/home

fix(ts): report TS5112 for positional files beside a config

#486
Closed chris opened this 8 days ago ·
8 days ago

Found while validating #483 (tracker #416). From the repository directory, which contains tsconfig.json, pass explicit source-file paths with --noEmit --noLib --strict --skipLibCheck and no --ignoreConfig.

TS 6.0.3 and native TS 7.0.2 both exit with TS5112: tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error. Home instead proceeds with checking the files (accepts the valid input and reports TS2322 for the invalid one).

The shared positional-path controls use --ignoreConfig for all three compilers to express their intended explicit-file mode, and then agree on valid/invalid outcomes. This issue tracks the missing diagnostic when that flag is absent; it is separate from config-relative file resolution.

Add CLI regressions covering a config present/absent, explicit --ignoreConfig, and normal -p operation. Local reproduction evidence: bench/vs_tsgo/results/global-audit.TExK7j/config.log and config-final.log.

8 days ago

Fresh oracle validation for #639 exposed a separate failure in the documented escape-hatch path: current home-tsc exits 139 with empty output when --ignoreConfig is passed, even for a two-line valid file. --skipLibCheck independently has the same failure. The exact post-#634 parent reproduces it, so it is not a #639 regression.

Tracked with minimal reproduction, artifact hashes, and acceptance criteria in #645. This issue should remain scoped to deciding and reporting TS5112 when the flag is absent; #645 owns making the explicit-file options complete safely.

8 days ago

#645 is fixed on main in d318b0c28, with audit documentation in 5cbf35e3b.

--ignoreConfig now preserves the following positional source, honors explicit true/false, and completes the pinned explicit-file oracle without the former exit 139. This issue remains open and narrowly owns the complementary behavior when the flag is absent: reporting TS5112 if positional files are used beside a discoverable config.

8 days ago

Fixed on main in c97199673.

Exact source-matched verification:

  • Nearby tsconfig.json plus positional entry.ts: Home now emits byte-identical TS5112 and exits 1, matching TypeScript 6.0.3 and native TypeScript 7.0.2. The frozen parent exited 0.
  • --ignoreConfig entry.ts: all controls and Home exit 0.
  • Positional entry.ts with no discoverable config: all exit 0.
  • -p tsconfig.json entry.ts: TS5042 retains precedence.
  • Normal -p tsconfig.json: all exit 0.
  • zig build test -Dfilter=ts_cli --summary failures: pass, guarded peak 272 MB.
  • ReleaseSafe home-tsc build: pass, guarded peak 2,820 MB.
  • zig fmt --check, scoped Pickier, and git diff --check: pass.

The implementation performs upstream-style config discovery without loading the config, preserves help/version/init precedence, and documents the untimed correctness oracle in the README and TypeScript performance notes. No test weakening or special-case benchmark behavior was added.

Sign in to comment on this issue.