Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(es/parser): Do not use lexical #7758

Merged

Conversation

gmcsorley-work
Copy link
Contributor

@gmcsorley-work gmcsorley-work commented Aug 4, 2023

This PR replaces the current usage of lexical within the swc_ecma_parser crate with equivalent parsing of large numbers using BigInt.

Description: As discussed in #7752, lexical contains a number of soundness issues but doesn't appear to be actively supported. Given the relatively low integration surface it seems reasonable to replace the usage of lexical with another package to avoid this issue.

Related issue:

@gmcsorley-work gmcsorley-work marked this pull request as ready for review August 4, 2023 16:12
@gmcsorley-work
Copy link
Contributor Author

Note that either this PR or #7757 should be accepted, but not both.

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thank you so much and sorry for the late review 😄
I was very busy the last weekend.


swc-bump:

  • swc_ecma_parser

@kdy1 kdy1 changed the title Remove usage of lexical from swc_ecma_parser refactor(es/parser): Do not use lexical Aug 6, 2023
@kdy1 kdy1 self-assigned this Aug 6, 2023
@kdy1 kdy1 added this to the Planned milestone Aug 6, 2023
@kdy1 kdy1 enabled auto-merge (squash) August 6, 2023 19:41
@kdy1 kdy1 merged commit e50cfde into swc-project:main Aug 6, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.75 Aug 8, 2023
kdy1 pushed a commit to kdy1/swc that referenced this pull request Aug 15, 2023
This PR replaces the current usage of lexical within the swc_ecma_parser
crate with equivalent parsing of large numbers using BigInt.

**Description:**

As discussed in
swc-project#7752, lexical contains a
number of soundness issues but doesn't appear to be actively supported.
Given the relatively low integration surface it seems reasonable to
replace the usage of lexical with another package to avoid this issue.

**Related issue:**

- Closes swc-project#7752
@swc-project swc-project locked as resolved and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to disable lexical dep
3 participants