Skip to content

chore: bump the bundled formatters (RuboCop, swift-format, rustfmt, PHP CS Fixer, .NET) - #40

Merged
amritk merged 6 commits into
mainfrom
claude/eloquent-tesla-15w6qm
Sep 24, 2026
Merged

amritk merged 6 commits into
mainfrom
claude/eloquent-tesla-15w6qm

Conversation

@amritk

@amritk amritk commented Sep 23, 2026

Copy link
Copy Markdown
Member

What & why

Moves five packages to the latest release of the tool they bundle, and rebuilds each wasm artifact. There is one commit per package.

Package Change Output
php PHP CS Fixer 3.95.18 → 3.95.27, @php-wasm/* 3.1.47 → 3.1.55 matches the native phar
csharp .NET runtime 10.0.10 → 10.0.12 (CSharpier stays 1.3.0) unchanged
rust nightly-2026-07-19 → nightly-2026-09-22 (rustfmt 1.9.0 → 1.10.0-nightly, rust-lang/rust 1303417c4) can change
swift swift-format 603.0.0 → 604.0.0, Swift toolchain and SDK 6.3.3 → 6.4.0 can change
ruby RuboCop 1.81.6 → 1.91.0, @ruby/wasm-wasi 2.8.1 → 2.10.1 changes (see below)

Two build scripts needed changes for the newer toolchains:

  • build/rust_fmt: this nightly's cargo uses the new build-dir layout. It has no shared deps/, and each unit gets its own build/<pkg>/<hash>/out/. It also builds rlibs whose metadata lives in a sibling .rmeta. collect-artifacts.py gains a deps mode that returns the old deps/ when it exists, and otherwise hard-links the per-unit outputs into one flat directory. externs now passes each crate's .rmeta alongside its .rlib. rustfmt now also links rustc_feature. The graph holds two versions of thiserror-impl and of serde_derive, so procmacros keeps every copy rather than the newest per name.
  • build/swift_fmt: Swift 6.4 makes swift-build SwiftPM's default build system, which puts products under .build/out/Products/. build.sh now asks swift build --show-bin-path for the location instead of hard-coding it. The module's exports are unchanged (memory, _initialize, run).

The Ruby gem bump also refreshes licenses/NOTICE.md and four license files. Only their copyright years changed.

Which packages

packages/php, packages/csharp, packages/rust, packages/swift, packages/ruby, build/rust_fmt, build/swift_fmt, build/ruby_fmt, build/php_fmt, build/csharp_fmt, docs (README size table, architecture notes)

Java and Kotlin are not in this PR. Bumping TeaVM to the current amritk/teavm master (b4ed3d5, which merges upstream 0.17.0) needs both artifacts rebuilt, and the TeaVM Gradle build could not fetch its dependencies from Maven Central in the environment this was built in. That will come as a separate PR.

Exactness

Every changed package is still checked byte-for-byte against the real tool at the new version:

  • php: test/native-conformance.test.ts ran the shipped phar on native PHP 8.4. It passes.
  • csharp: test/native-conformance.test.ts compared against native csharpier 1.3.0. It passes.
  • rust: test/native-conformance.test.ts compared against rustfmt 1.10.0-nightly (1303417c41 2026-09-21). It passes.
  • swift: test/native-conformance.test.ts compared against a native swift-format 604.0.0, built from the same tag. The Swift 6.4 toolchain's own swift-format reports main, so the tag was built separately to be sure. It passes.
  • ruby: test/rubocop-conformance.test.ts compared against a native rubocop 1.91.0 with rubocop-ast 1.50.0 and parser 3.3.12.0. It passes. test/native-conformance.test.ts (syntax_tree 6.3.0) passes too. rubocop-ast and parser are unchanged, so both perf patches in src/rubocop-perf-patch.ts still apply to the versions they were written for.

The Ruby output change was measured with ruby:bench --compare over 304 files from the parser, rubocop-ast, syntax_tree, regexp_parser, rainbow and unicode-display_width gems. 6 of 304 differ. Each is RuboCop 1.91's Layout indentation for a method chain wrapped onto the lines after its receiver, a block hanging off such a chain, or a parenthesised multi-line if condition.

How it was validated

  • bun run check
  • bun run types:check
  • bun run test: all 7 packages pass. The Java and Kotlin native-JVM conformance tests skip, and those packages are untouched.
  • bun run test:node, on Node 24.15.0: 19 pass, 0 fail. The 2 skips are the unsupported-runtime cases.
  • bun run test:browser, in Chromium: all 7 cases across 6 packages are byte-identical to Node.
  • Rebuilt each wasm artifact and re-ran its conformance tests against the native tool (above).

Changeset

  • Added a changeset: one per package. minor for ruby, swift and rust, whose summaries say output can change. patch for php and csharp.

🤖 Generated with Claude Code


Generated by Claude Code

Rebuilt php_fmt.phar.br from the official 3.95.27 phar. The native
conformance test runs the shipped artifact on a native PHP and passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CyNsNak7TbFw9d7XawDLry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CyNsNak7TbFw9d7XawDLry
Rebuilds rust_fmt.wasm.br from rust-lang/rust 1303417c4. The build
script needed three changes for the newer toolchain:

- cargo's new build-dir layout has no shared deps/, so the compiled
  crates are hard-linked into one flat directory for the -L paths
- rlibs no longer embed their metadata, so each --extern also names
  the sibling .rmeta
- rustfmt now links rustc_feature, and two versions of a proc macro can
  share a crate name, so every proc macro is kept, not the newest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CyNsNak7TbFw9d7XawDLry
Swift 6.4 makes swift-build SwiftPM's default build system, which puts
products under .build/out/Products/. build.sh now asks SwiftPM for the
bin path with --show-bin-path rather than spelling out either layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CyNsNak7TbFw9d7XawDLry
Rebuilds ruby_fmt.wasm.br with rubocop 1.91.0 (rubocop-ast and parser
unchanged) and moves @ruby/wasm-wasi to 2.10.1 to match the js gem in
the artifact. rubocop-conformance passes against a native rubocop
1.91.0; a 304-file corpus shows 6 files whose Layout corrections moved
with RuboCop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CyNsNak7TbFw9d7XawDLry
#41 moved the Swift build to -O and wasm-opt -O3. This keeps those
flags in the SWIFT_BUILD_FLAGS array the 604 bump introduced, and
rebuilds swift_fmt.wasm.br from swift-format 604.0.0 with them. The
conformance test passes against a native swift-format 604.0.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@amritk
amritk merged commit 28460c0 into main Sep 24, 2026
8 checks passed
@amritk
amritk deleted the claude/eloquent-tesla-15w6qm branch September 24, 2026 16:35
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.

4 participants