ReviewOS

home-lang/home

fix(ts): document option dialects and retain removed-option source positions

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

Updated evidence: TS 6/7 dialect difference

The #845 95-case same-input matrix includes CommonJS with moduleResolution node10 and ignoreDeprecations 6.0. TS 6.0.3 accepts that configuration and proceeds to semantic default-import checks. Direct native TS 7.0.2 rejects it with TS5108 at tsconfig.json(12,25). Home source 929d46a also rejects it with TS5108, but currently emits a global message without that config-file position.

The initial finding was relative to TS 6 alone. The new direct-native oracle changes the next action: do not make a permissive option change that contradicts TS 7, and do not claim these 19 config-rejected cases are shared semantic admissions. Preserve the entire 95-case matrix and document the version-dependent outcomes. Full raw native command/output: /Users/chris/.cache/home-ts-845.xzutkH/native-config.log; TS6/Home records, fixture bytes and hashes in parent.json and owner.json beside it.

Remaining work

  • Establish/document the frontend's intended TS option dialect and compatibility contract using authoritative source/tests. If both dialects are supported, use explicit logical version selection rather than inferring it from benchmark names or suppressing removed-option errors.
  • Match config diagnostic source positions/messages under the chosen dialect; native TS7 currently anchors TS5108 to the removed option value, while Home drops the location.
  • Retain positive current-option controls, deprecated/removed option negatives and ignoreDeprecations cases. Keep TS6-only accepted configurations separate from fair multi-compiler timing admissions.
  • Publish issue-linked conventional commits, complete config/CLI gates and documentation when implemented. This issue remains open, not a blocker for meaningful work on shared admissible module/default semantics under #845/#846.

Related #416, #845. No config source fix or benchmark claim yet.

8 days ago

Resolved on main by b6e34fc (fix(ts): retain removed-option config locations (#847)).

Implementation:

  • Declares native TypeScript 7 as Home’s compiler-option dialect; ignoreDeprecations does not select TS6 behavior.
  • Retains JSONC key/value positions and carries the correct anchor into config validation.
  • Renders positioned config diagnostics through the normal tsc-compatible formatter. TS5108 value-form diagnostics use the value anchor; valueless removed options use the key anchor, matching upstream createDiagnosticForOption(onKey: !value, ...).
  • Documents that TS6-only configurations stay separate from shared multi-compiler admissions.

Verified serially under the unchanged 3,840 MB ceiling:

  • tsconfig_jsonc: 19/19; peak 205 MB.
  • tsconfig: 133/133; peak 232 MB.
  • tsc_main: 34/34; peak 2,158 MB.
  • ts_cli: 74/74; peak 1,888 MB.
  • ts_driver: 199/199; peak 1,945 MB.
  • test-tsc-streams: 5/5 build steps.
  • standalone home-tsc build: peak 1,996 MB.
  • real CLI oracle exits 2 with the exact header: tsconfig.json(12,25): error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration.
  • docs build: 105 pages; peak 201 MB.
  • Zig formatting, Pickier, and diff checks pass.

The positive nodenext control and ignoreDeprecations: "6.0" control remain accepted. No benchmark timing or TS6 semantic-admission claim is made. Commit author/committer is glennmichael123 gtorregosa@gmail.com, with no coauthor.

8 days ago

Integrated b6e34fc into the #845/#846 owner/default fix and verified the entire 95-case native TS7 oracle matrix: all code/count/position/message and success/error exits match, including all 19 CommonJS/node10 config rejections. The TS6-versus-native dialect difference remains explicit, not normalized away. Source 206cdf1 and docs/evidence cde7cd3 are on origin/main as Chris without coauthors. Report/archive retains original global-location failures and final exact native locations: https://github.com/home-lang/home/blob/main/docs/docs/TS_PERFORMANCE.md#default-module-owner-correctness-and-cost-checkpoint-2026-10-08-utc

Sign in to comment on this issue.