refactor(es/parser): remove legacy lexer crate#12014
Conversation
🦋 Changeset detectedLatest commit: 0e11994 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
kdy1
left a comment
There was a problem hiding this comment.
I think it's now good to go, as the main user of this crate was Deno
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d9a6de10d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e11994d5d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -34,7 +34,6 @@ bitflags = { workspace = true } | |||
| compact_str = { workspace = true } | |||
| either = { workspace = true } | |||
| num-bigint = { workspace = true } | |||
| phf = { workspace = true, features = ["macros"] } | |||
| rustc-hash = { workspace = true } | |||
There was a problem hiding this comment.
Regenerate all nested parser lockfiles
The prior swc_core fixture lockfiles are fixed, but the same phf removal still leaves other committed nested lockfiles with swc_ecma_parser depending on phf (crates/swc_plugin_backend_tests/tests/fixture/{swc_noop_plugin,swc_internal_plugin,issue_6404}/Cargo.lock, packages/core/e2e/fixtures/plugin_analyze/Cargo.lock, packages/core/e2e/fixtures/plugin_transform_schema_vtest/Cargo.lock, and crates/swc_ecma_minifier/fuzz/Cargo.lock). These fixture crates are built by the plugin backend tests and package e2e plugin builders, so this change only partially updates the locked dependency graph and the next fixture build/lock refresh will carry unrelated lockfile diffs or keep testing the old graph with phf still present.
Useful? React with 👍 / 👎.
kdy1
left a comment
There was a problem hiding this comment.
I was wrong - Deno is still using SWC, so I'll postpone this PR
Description:
Remove the unmaintained
swc_ecma_lexercompatibility crate now thatswc_ecma_parsercontains the maintained lexer and parser implementation.swc_ecma_lexercrate and its lockfile entry.swc_ecma_parser.phfdependency.BREAKING CHANGE:
The
swc_ecma_lexercrate and the legacyswc_ecma_parser::tokenAPI are removed. Consumers that need direct lexer token access should useswc_ecma_parserwith itsunstablefeature.Validation:
cargo metadata --no-depscargo test -p swc_ecma_parsercargo test -p swc_ecma_transforms_reactcargo fmt --allcargo clippy --all --all-targets -- -D warningsRelated issue (if exists):
N/A