Skip to content

feat(esm): retire --deno-esm; Bun-ESM is the only JS-host ESM target - #759

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/56-bun-aspirational
Sep 21, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
feat/56-bun-aspirational

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Summary

Bun-ESM is the only JS-host ESM target. --deno-esm / -o *.deno.js is a hard error (E0826) pointing at --bun-esm / .bun.js. The flag is kept so existing scripts fail loudly instead of becoming an unknown option.

codegen_deno now emits the Bun host (codegen_denocodegen_bun). The historical tests/codegen-deno/ corpus compiles with --bun-esm to .bun.js.

Aspirational idaptik StartupError fixtures compile with real syntax (use Console::{log}, use Dom::{…}, tuple-list attrs, #{ bg: … } records) — not ReScript import Dom / {IO} / {style: bg} without #.

Host FFI on this path does not require / IO rows (Canvas-style erasure at emit). affinescript-vite remains a scaffold, not in this tree. Remaining Pixi.res (~313 decls) is a follow-up, not this PR.

Does not implement #486 (native-preview2 / default component; needs ocaml + wasm-tools and must keep typedwasm.ownership byte-equal).

Closes #56

Notes

  • No local ocaml/dune/bun in the authoring environment; CI has the toolchain (Bun via scripts/install-bun.sh).
  • Docs updated: capability matrix, bun-esm migration, ECOSYSTEM, EFFECTS, CHANGELOG. No production-ready claim (DOC-09).

Follow-up on this PR

  • CI: tree-sitter CLI is now the GitHub release binary (scripts/install-tree-sitter-cli.sh); workflow-linter accepts SPDX in the first 5 lines (actions-lock prepend).
  • affinescript-vite/ scaffold landed (compile .affine via --bun-esm).
  • Remaining Pixi.res inventory: Port remaining Pixi.res declarations beyond the #56 original bar #760 (not this PR).

--deno-esm / -o *.deno.js is a hard error (E0826) pointing at --bun-esm.
codegen_deno now emits the Bun host. The historical codegen-deno corpus
compiles to .bun.js. Aspirational StartupError fixtures use real syntax
(use Console/Dom, tuple-list attrs, #{…} records).

Refs #56
@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 57f6a7c4-5715-417f-9cf2-c24566d1257b

📥 Commits

Reviewing files that changed from the base of the PR and between 97dc674 and 256007e.

📒 Files selected for processing (51)
  • .github/workflows/ci.yml
  • .gitignore
  • CHANGELOG.adoc
  • bin/main.ml
  • docs/CAPABILITY-MATRIX.adoc
  • docs/ECOSYSTEM.adoc
  • docs/EFFECTS-IMPLEMENTATION.adoc
  • docs/STDLIB-EXTERN-AUDIT.adoc
  • docs/bindings-roadmap.adoc
  • docs/guides/bun-esm-migration.adoc
  • lib/codegen_deno.ml
  • stdlib/Console.affine
  • stdlib/Deno.affine
  • stdlib/Dom.affine
  • tests/codegen-deno/aggregate_smoke.harness.mjs
  • tests/codegen-deno/bytes_binary_io.harness.mjs
  • tests/codegen-deno/canvas_smoke.harness.mjs
  • tests/codegen-deno/class_basic.harness.mjs
  • tests/codegen-deno/control_flow.harness.mjs
  • tests/codegen-deno/deno_scripting.harness.mjs
  • tests/codegen-deno/deno_scripting_part2.harness.mjs
  • tests/codegen-deno/deno_string_fmt.harness.mjs
  • tests/codegen-deno/dom_startup_error.affine
  • tests/codegen-deno/dom_startup_error.harness.mjs
  • tests/codegen-deno/dom_window_smoke.harness.mjs
  • tests/codegen-deno/encoding_smoke.harness.mjs
  • tests/codegen-deno/http_fetch.harness.mjs
  • tests/codegen-deno/int_div.harness.mjs
  • tests/codegen-deno/ipc_smoke.harness.mjs
  • tests/codegen-deno/loop_break_continue.harness.mjs
  • tests/codegen-deno/match_enum.harness.mjs
  • tests/codegen-deno/motion_smoke.harness.mjs
  • tests/codegen-deno/non_ascii.harness.mjs
  • tests/codegen-deno/pixi_smoke.harness.mjs
  • tests/codegen-deno/pixisound_smoke.harness.mjs
  • tests/codegen-deno/pixiui_smoke.harness.mjs
  • tests/codegen-deno/random_smoke.harness.mjs
  • tests/codegen-deno/ref_fields.harness.mjs
  • tests/codegen-deno/sqlite_introspect_bulk.harness.mjs
  • tests/codegen-deno/sqlite_prepared.harness.mjs
  • tests/codegen-deno/sqlite_smoke.harness.mjs
  • tests/codegen-deno/string_lex_cmp.harness.mjs
  • tests/codegen-deno/string_prims.harness.mjs
  • tests/codegen-deno/transaction_smoke.harness.mjs
  • tests/codegen-deno/wasm_call.harness.mjs
  • tests/codegen-deno/wasm_exports_demo.harness.mjs
  • tests/codegen-deno/wasm_wasi_instance.harness.mjs
  • tests/codegen/dom_pilot_startup_error.affine
  • tests/codegen/test_dom_pilot_startup_error.mjs
  • tools/run_codegen_bun_tests.sh
  • tools/run_codegen_deno_tests.sh
 ____________________________________________________________________________________________________________________
< Always design for concurrency. Allow for concurrency, and you'll design cleaner interfaces with fewer assumptions. >
 --------------------------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • 🔴 Error committing to branch - (🔄 Check to retry)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 2b58bbd into main Sep 21, 2026
14 of 21 checks passed
@hyperpolymath
hyperpolymath deleted the feat/56-bun-aspirational branch September 21, 2026 10:44
hyperpolymath added a commit that referenced this pull request Sep 21, 2026
…o parse (#761)

## Why

#759 merged with red CI:
- `npm install -g --ignore-scripts tree-sitter-cli@0.25.0` leaves the
`tree-sitter` binary missing (ENOENT) — build, coverage,
migration-assistant.
- Workflow linter requires SPDX on line 1; actions-lock prepends a
managed-by comment.
- `lib/codegen_deno.ml` still had a #757 smash: unterminated `(* #459`
comment (`wrapping Iram)`) and a duplicate `receiver_struct` (`withtion
= function`). Lint: Comment not terminated.

## This PR
- `scripts/install-tree-sitter-cli.sh` installs the v0.25.0 GitHub
release binary.
- Workflow linter accepts SPDX in the first 5 lines.
- Restore ExprBreak/Continue/Lambda arms; drop the duplicate
receiver_struct.
- `affinescript-vite/` compile-pass scaffold (`--bun-esm`).

Does not implement #486.
@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Couldn't create the docstrings branch.

Warning

I couldn't create the pull request branch. This branch's GitHub Actions workflow files (.github/workflows/) have diverged from main, and GitHub blocks CodeRabbit from creating a branch that carries them.

How to fix: update this branch with main (merge or rebase), then re-run this command and I'll open the pull request. If updating causes merge conflicts, comment @coderabbitai resolve merge conflict and I'll resolve them first.

If this branch is already up to date with main, CodeRabbit may be missing repository write access — ask a repository admin to refresh its permissions.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

❌ Failed to create Coding Agent finishing-touch task. Please try again.

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.

[Repo] affinescript-dom and affinescript-pixijs as production-ready migration prerequisite

1 participant