Skip to content

fix(compiler): Admit setter JSDoc without optional syntax - #3359

Open
MathurAditya724 wants to merge 3 commits into
vercel-labs:mainfrom
MathurAditya724:codex/fix-jsdoc-setter-admission-followup
Open

MathurAditya724 wants to merge 3 commits into
vercel-labs:mainfrom
MathurAditya724:codex/fix-jsdoc-setter-admission-followup

Conversation

@MathurAditya724

@MathurAditya724 MathurAditya724 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Accept optional parameter JSDoc on JavaScript setters whose executable parameter is mandatory. Generated bindings can document undefined without scriptc treating the comment as an optional setter parameter. Real optional/default/rest syntax, caller type checks, and reflective argument-count restrictions retain their existing diagnostics.

A preflight-owned index collects attached JSDoc spans once per SourceFile and uses binary containment lookup. SourceFile identity keeps original and rewritten JSX snapshots separate when they share a filename. Regression coverage includes checked JavaScript, syntax negatives, native setter behavior, JSX offsets, and traversal growth for many setters.

Independent stock artifact and quiet timing runs against the main snapshot used by this branch passed. They cover 5,380 identical IR/LLVM/native executable comparisons, three additional identical compiler/emitter LLVM comparisons, 126 unchanged baseline refusals, and the new setter fixture. All 59 benchmark artifact hashes also match across the separate runs. The compiler's own source passes its heap, output-growth, dynamic-tier and compile-cost budgets.

Compilation measurements use Node 24.22.1 on Darwin arm64 and the stock 300-pair protocol. The 95% intervals remain below the 2% growth threshold; the self row has only one pair and no meaningful confidence interval.

Workload Change 95% interval
59 benchmarks, five pairs each +0.06% +0.005% to +0.21%
Compiler self-build, one pair -0.02% Single sample
Two emitter fixtures, two pairs each -0.18% -0.44% to +0.08%

Fixes #3355.

Recognize optional parameter documentation on mandatory JavaScript setters.
Index attached JSDoc spans once per SourceFile and use binary containment lookup.
Keep executable syntax checks, caller types, and reflective argument-count fences.

Refs vercel-labs#3355

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown
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 and others added 2 commits November 8, 2026 00:18
Refresh the PR merge revision after the upstream build repair in vercel-labs#3360.

Refs vercel-labs#3355

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
Refresh the PR merge revision after upstream matrix pin repairs in vercel-labs#3219 and vercel-labs#3388.

Refs vercel-labs#3355

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
@MathurAditya724
MathurAditya724 marked this pull request as ready for review November 8, 2026 04:25

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optional JSDoc rejects mandatory JavaScript setter parameters

1 participant