Repository navigation
test(compiler): Guard function-reference indexing against rescans - #1577
Open
MathurAditya724 wants to merge 4 commits into
Open
MathurAditya724 wants to merge 4 commits into
MathurAditya724 wants to merge 4 commits into
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Contributor
|
@MathurAditya724 is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
MathurAditya724
marked this pull request as ready for review
October 21, 2026 00:12
Merge main while retaining its lazy function-reference index. Keep the regression tests and measure only analysis traversals in the scan-count assertion. Refs vercel-labs#1797 Co-Authored-By: GPT-6 <noreply@openai.com>
Retain the upstream reference-index implementation and its focused regression tests. Co-Authored-By: GPT-6 <noreply@openai.com>
Keep production sources identical to main while retaining reference-index regression coverage. Co-Authored-By: GPT-6 <noreply@openai.com>
This branch has not been deployed
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.
Adds regression coverage for function-reference indexing in early-read
varanalysis, found while compiling the complete Sentry CLI dependency bundle with scriptc. The background and original analysis timings are in #1797.Main now provides the optimization in 70aed0f13. This branch preserves that lazy name-index implementation exactly. The remaining diff is the regression test file: production compiler code matches main at
daac2a4a1.The tests verify that whole-file analysis traversals stay constant between 12- and 48-link function chains, and that shadowed names, duplicate declarations, shorthand references, and immutable source-file snapshots retain their binding behavior. The scan test measures the analysis directly, excludes the fixture's name-collection traversal, and requires a positive count so it cannot pass without observing the analysis.
After a frozen-lockfile install with CI's Node 24.22.0 and pnpm 11.1.3, the merged head passes all seven focused hoisting tests, 35 code-quality/CI-policy contracts, workspace build, lint, formatting, and generated AST drift checks locally. This PR's current diff adds tests; the historical timing improvement belongs to the implementation now on main. Full Sentry CLI parity and runtime benchmarks remain outstanding.
Hosted CI run is awaiting maintainer approval for this fork; no Actions test jobs have run. Vercel preview deployment also requires authorization.
Refs #1797.