Repository navigation
feat(check): prototype newer TypeScript narrowing and recursion semantics - #160
Closed
vincentkoc wants to merge 2 commits into
Closed
vincentkoc wants to merge 2 commits into
vincentkoc wants to merge 2 commits into
Conversation
Experimentally port microsoft/typescript-go#4781 (c5ed97d875) with mutable-copy and non-uniform union regression coverage. This does not change the declared TypeScript 7.0.2 baseline or qualify a complete baseline upgrade.
Experimentally port microsoft/typescript-go#4913 (ea58062260), including its explicit indeterminate relation-depth contract while retaining complexity and physical stack safeguards. Add clean nested-Omit overlap, incompatible payload, recursive-alias termination, and cyclic-relation regressions; update the three existing depth expectations to the native 7.1 behavior. Declared 7.0.2 baseline remains unchanged pending full upgrade qualification.
|
Hi! I'm the It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is an experimental baseline-upgrade/backport candidate, not a TypeScript 7.0.2 parity repair. Bun explicitly targets 7.0.2 today; the two reported diagnostics also occur in the official native 7.0.2 compiler and disappear with newer native semantics. The declared version and dependency pins are unchanged. This draft is unqualified and must not be treated as a complete baseline upgrade or release candidate.
Ports two owning checker changes, without changing application source:
c5ed97d875: equality/switch narrowing of uniform primitive unions returns regular literal types. Mutable object copies retain a narrowed status. Shared union membership checks all intersected unions, and enum mixtures/unique symbols preserve their existing comparison rules.ea58062260: indexed accesses and homomorphic mapped types normalize to the target's recursion identity. The native 100-level relation limit becomes indeterminate instead of a false incompatibility; complexity exhaustion and Bun's physical stack guard remain. The existing 64-step circular mapped-alias bound is preserved. Obsolete TS2321 relation state is removed.Adds four regressions for mutable narrowing, a clean nested-Omit generic assertion, recursive mapped-alias termination, and compatible cyclic relations. Negative cases preserve invalid payload, discriminant, enum, symbol and shallow recursive rejection. Three existing depth tests now expect the newer native behavior, including the release-only 130-comparison case.
Source is frozen at Bun
11b450ca9. The comparison base carries only the fork's existing maintained native workflow and test runner; the PR diff contains the two semantic commits. Production delta: +59 lines; tests: +169 lines.How did you verify your code works?
git diff --checkpassed.9baa579f26d2733c7ba6ec869407768a4e718568. The fulltest/cli/check/check.test.tsran on both: Linux 631 pass / 4 skip / 0 fail; Darwin 632 pass / 3 skip / 0 fail. Both ran 635 tests and 366 snapshots. The release builds cover all new positive/negative cases, updated depth expectations, and all 130 repeated deep comparisons. All 14 Linux and 10 Darwin selected test files passed. Rust compilation verifies the mutable recursion-identity receiver changes.aed6c05cc43d898daf4c82bf6cb64222e78bde7c, using the verified Linux candidate. A paired run of the immutable upstream11b450ca9b575b03f95bde209ff4f037fa14b374executable on the same source and arguments reproduces TS2345 atsrc/commands/backup-record.ts:39:48and TS2352 atsrc/config/sessions/session-transcript-worker-readers.ts:55:18in core, plus the same TS2352 in UI. The candidate produces zero diagnostics in both graphs. Both compilers retain the deliberate TS2322 negative control. The original failing application modules have no source changes.57ce530c4b0b9fb9d2d23eed23dc1bc00905331348a1f60f52d5adec4e96f19a) and 18,620 UI (17f57df1c9d599da6e0198c010f46817d2bc5a31f2517f8f7b36ac6efbe93fbc). This prevents a clean result from silently dropping graph scope; it does not claim that standard-library contents are identical.093f73c3562739650582e06e807407c9a3dbef6852a8efd445a436e41f7e9697; paired baseline:8c9d31e9e763706d5b01573ed5f28b5ce1feff70614b69882455891f4f073bad. No application changes, default/pin changes, or performance qualification are part of this experiment.Before this can become a mergeable baseline change, it still needs coherent declared-version/lib/oracle alignment and the remaining baseline compatibility audit. No performance or release qualification is claimed.