Skip to content

Keep optimized Lambda output compatible with playground API v8 - #8930

Merged
fhammerschmidt merged 2 commits into
masterfrom
fix/playground-api-v8
Oct 20, 2026
Merged

fhammerschmidt merged 2 commits into
masterfrom
fix/playground-api-v8

Conversation

@fhammerschmidt

@fhammerschmidt fhammerschmidt commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Adding the optional lambda_optimized field to compileWithDebug in #8636 did not change the existing compiler API. Advertising v9 nevertheless makes existing clients with explicit API allowlists reject the bundle.

Restore api_version = "8" while retaining optimized Lambda output and the before/after/diff views. Keep capability detection based on field presence, and remove the v9 requirement from the UI guidance, contributor documentation, and original changelog entry.

The bundle test now requires API v8 and optimized output together, while preserving its checks for regular compilation.

Validation:

  • Native and browser compiler builds, compiler suites, and browser compiler bundle tests pass.
  • All 37 developer playground tests pass under Node 22 with locked rescript-signals 3.1.1.
  • Production Vite build, OCaml/ReScript/JavaScript format checks, and changelog validation pass.

This makes rescript-lang/rescript-lang.org#1457 unnecessary.

Why:
    lambda_optimized is an optional compileWithDebug field. Existing compiler
    calls remain compatible, so advertising API v9 needlessly makes clients
    with an explicit version allowlist reject the bundle.

Restore API v8 and keep optimized Lambda output intact. Consumers detect the
field's presence. Remove the v9 requirement from the availability notice,
contributor guide, and original changelog entry.

Review: The bundle test requires API v8 and optimized output together, and
continues to verify that regular compilation does not capture that output.
The older-bundle UI test rejects the obsolete API-v9 guidance.

Validation: Native and browser compiler builds, the compiler suites,
playground bundle tests, all 37 developer playground tests under Node 22
with locked rescript-signals 3.1.1, the production Vite build, and format
checks pass.

Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
@fhammerschmidt
fhammerschmidt marked this pull request as ready for review October 20, 2026 13:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T13:32:51.662953Z ac42462 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Remove the added API-v9 text assertion and the optional debug-output comment
as requested in review. The API-v8 bundle regression remains in place.

Validation: make compiler and all 26 Lambda diff tests pass.

Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
@github-actions

Copy link
Copy Markdown

@fhammerschmidt
fhammerschmidt enabled auto-merge (squash) October 20, 2026 13:42
@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8930

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@8930

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8930

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8930

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8930

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8930

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8930

commit: c459325

@github-actions

Copy link
Copy Markdown

@fhammerschmidt
fhammerschmidt merged commit 2f84e00 into master Oct 20, 2026
28 checks passed
@fhammerschmidt
fhammerschmidt deleted the fix/playground-api-v8 branch October 20, 2026 13:54
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.

2 participants