Skip to content

feat(swc_cli): Implement all features for swc_cli#11797

Draft
kdy1 wants to merge 2 commits intomainfrom
kdy1/issue-4017-cli-comment-fixes
Draft

feat(swc_cli): Implement all features for swc_cli#11797
kdy1 wants to merge 2 commits intomainfrom
kdy1/issue-4017-cli-comment-fixes

Conversation

@kdy1
Copy link
Copy Markdown
Member

@kdy1 kdy1 commented Apr 16, 2026

Summary

  • add real long-running swc compile --watch support with incremental --out-dir updates and --out-file rebuilds
  • add --copy-files and --strip-leading-paths to the Rust CLI
  • normalize --out-dir path resolution, including absolute inputs, and cover the regressions with issue tests

Why

Issue #4017 called out a few gaps in the Rust CLI compared to the older behavior: --watch was exposed but did not actually keep running, compatibility flags for copying files and stripping leading paths were missing, and out-dir path handling regressed for some inputs. This keeps the current default dist/src/... layout while restoring the requested compatibility options and watch behavior.

Validation

  • git submodule update --init --recursive
  • cargo fmt --all
  • cargo test -p swc_cli_impl
  • cargo clippy --all --all-targets -- -D warnings

Fixes #4017

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 16, 2026

⚠️ No Changeset found

Latest commit: 3648031

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kdy1 kdy1 changed the title [codex] Fix compile CLI regressions from #4017 feat(swc_cli): Fix compile CLI regressions from #4017 Apr 16, 2026
@kdy1 kdy1 changed the title feat(swc_cli): Fix compile CLI regressions from #4017 feat(swc_cli): Implement all features for swc_cli Apr 16, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 16, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Binary Sizes

File Size
swc.linux-x64-gnu.node 27M (27776072 bytes)

Commit: ef89b66

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 16, 2026

Merging this PR will not alter performance

✅ 219 untouched benchmarks
⏩ 31 skipped benchmarks1


Comparing kdy1/issue-4017-cli-comment-fixes (3648031) with main (5986411)2

Open in CodSpeed

Footnotes

  1. 31 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.

  2. No successful run was found on main (857c0b6) during the generation of this report, so 5986411 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Implement swcx compile to feature parity to @swc/cli

1 participant