Skip to content

chore: upgrade oxc to 0.127.0#9194

Merged
shulaoda merged 1 commit intomainfrom
codex/upgrade-oxc-0.127.0
Apr 22, 2026
Merged

chore: upgrade oxc to 0.127.0#9194
shulaoda merged 1 commit intomainfrom
codex/upgrade-oxc-0.127.0

Conversation

@Dunqing
Copy link
Copy Markdown
Contributor

@Dunqing Dunqing commented Apr 22, 2026

Summary

Upgrade OXC from 0.126.0 to 0.127.0 across the Rust workspace and JS workspace packages.

This updates the pinned OXC crates and packages, refreshes the embedded runtime helper version, and records the snapshot / fixture changes caused by the new OXC output.

What Changed

  • bump Rust OXC workspace deps in Cargo.toml to 0.127.0
  • bump JS OXC packages in pnpm-workspace.yaml to 0.127.0
  • refresh Cargo.lock and pnpm-lock.yaml
  • regenerate crates/rolldown_plugin_oxc_runtime/src/generated/embedded_helpers.rs
  • update affected snapshots and sourcemap expectations

Why

Rolldown tracks OXC closely, and this brings the repo onto the latest crates_v0.127.0 release.

The snapshot churn here is expected from upstream minifier / DCE behavior changes rather than local Rolldown logic changes.

Upstream Behavior Behind The Snapshot Changes

  • OXC #21567 preserves the replaced identifier span when inlining single-use variables during DCE.
    • This explains the sourcemap provenance changes in packages/rolldown/tests/fixtures/output/sourcemap/true and sourcemap-base-url.
    • It also explains issue_6263, where /* @vite-ignore */ is preserved during inlining.
    • The same DCE path is the best explanation for ts_import_equals_undefined_import and transform-empty-mappings becoming more aggressively folded / mapped to use sites.
  • OXC #21568 and #21571 explain this_outside_function dropping this when it is side-effect free.

Impact

  • OXC version alignment stays current on both the Rust and JS sides.
  • Sourcemap expectations now match upstream OXC use-site span preservation during DCE.
  • A few esbuild / rolldown snapshots become smaller or structurally different due to stronger folding.

Validation

  • just roll
    • This ran through Rust tests, clippy, cargo checks, Node tests, rollup tests, and vp check.
    • It then stopped at vp run lint-knip with unlisted-dependency warnings from generated test outputs under packages/rolldown/tests/.../dist.
    • That blocker is repo-level validation noise, not a failure in the OXC upgrade itself.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 9d64ee6
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69e86cf7f5b4ba00082f9cf0
😎 Deploy Preview https://deploy-preview-9194--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines -9 to -12
// HIDDEN [\0rolldown/runtime.js]
//#region entry.ts
let foo = (/* @__PURE__ */ __exportAll({ value: () => 123 })).value;
console.log(foo);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not exactly know why this change occurred; it may be related to oxc-project/oxc#21567.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems it works because the inlining works because the span is preserved

@Dunqing Dunqing changed the title [codex] chore: upgrade oxc to 0.127.0 chore: upgrade oxc to 0.127.0 Apr 22, 2026
@Dunqing
Copy link
Copy Markdown
Contributor Author

Dunqing commented Apr 22, 2026

Most of the snapshot changes are introduced by oxc-project/oxc#21567, which even corrected the sourcemap.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​oxc-project/​types@​0.127.01001007296100
Added@​oxc-project/​runtime@​0.127.01001007596100
Addedvite@​8.0.8991008298100

View full report

@Dunqing Dunqing marked this pull request as ready for review April 22, 2026 06:48
@Dunqing Dunqing requested review from sapphi-red and shulaoda April 22, 2026 06:49
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 22, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing codex/upgrade-oxc-0.127.0 (9d64ee6) with main (75bb10b)

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@shulaoda shulaoda merged commit 42c14bc into main Apr 22, 2026
38 of 39 checks passed
@shulaoda shulaoda deleted the codex/upgrade-oxc-0.127.0 branch April 22, 2026 08:51
This was referenced Apr 22, 2026
shulaoda added a commit that referenced this pull request Apr 22, 2026
## [1.0.0-rc.17] - 2026-04-22

### 🐛 Bug Fixes

- link: error on missing export between TS modules (#9197) by @IWANABETHATGUY
- rolldown_plugin_vite_import_glob: import path should not be affected by absolute base option (#9145) by @kermanx
- `this.resolve()` returns null for bare relative paths without importer (#9142) by @Copilot
- collect destructured bindings in HMR module exports (#9146) by @h-a-n-a
- esbuild-tests: handle 0.28.0 test cases (#9149) by @sapphi-red
- plugin/copy-module: honor external resolutions from other plugins (#9139) by @TheAlexLichter
- allow undefined in sourcesContent type (#9136) by @jurijzahn8019
- reduce false positives in chunk optimizer circular dependency detection (#9049) by @AlonMiz

### 🚜 Refactor

- chunk-optimizer: extract runtime-module placement into rehome_runtime_module (#9163) by @IWANABETHATGUY

### 📚 Documentation

- add design doc for sort_modules execution ordering (#9169) by @IWANABETHATGUY
- add document for `RenderedModule` (#9147) by @sapphi-red

### ⚡ Performance

- rolldown_plugin_vite_import_glob: skip self-import earlier using raw path comparison (#9193) by @shulaoda

### 🧪 Testing

- lazy: add `playground/lazy-compilation` (#7974) by @hyf0

### ⚙️ Miscellaneous Tasks

- use app token for release PR (#9198) by @Boshen
- upgrade oxc to 0.127.0 (#9194) by @Dunqing
- use oxc security action (#9196) by @Boshen
- esbuild-tests: remove some tests from ignored list as enum inline is now supported (#9184) by @sapphi-red
- deps: update dependency vite-plus to v0.1.19 (#9183) by @renovate[bot]
- use vp instead of pnpm in check-wasi-binding-deps (#9182) by @shulaoda
- verify wasm32-wasi binding deps match @rolldown/browser before publish (#9162) by @shulaoda
- deps: update esbuild for tests to 0.28.0 (#9172) by @sapphi-red
- deps: update rollup submodule for tests to v4.60.2 (#9173) by @sapphi-red
- deps: update test262 submodule for tests (#9174) by @sapphi-red
- sort_modules: fix stale async-entry sort key comment (#9170) by @IWANABETHATGUY
- deps: update npm packages (#9157) by @renovate[bot]
- deps: update dependency diff to v9 (#9158) by @renovate[bot]
- deps: update rust crates (#9156) by @renovate[bot]
- run Windows CI on PRs labeled with `ci: windows` (#9153) by @hyf0
- update-test-dependencies: run setup-rust before file changes (#9151) by @sapphi-red
- deps: update dependency rust to v1.95.0 (#9140) by @renovate[bot]

### ❤️ New Contributors

* @jurijzahn8019 made their first contribution in [#9136](#9136)
* @AlonMiz made their first contribution in [#9049](#9049)

---------

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
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.

[Bug]: Static property initialization with computed Symbol keys fails when class has a constructor [Bug]: /*@vite-ignore*/ is incorrectly stripped

3 participants