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

fix(swc/core): Stop doing require unnecessary packages (@swc/core-darwin-universal). #6902

Merged

Conversation

AsPulse
Copy link
Contributor

@AsPulse AsPulse commented Feb 5, 2023

Description:

Removed the part that requires a package that does not exist.

(Previously, this was enclosed in a try-catch and did not manifest itself as a clear error, but was problematic in the situation described in the issue below.)


BREAKING CHANGE:

If process.platform === 'darwin' && (process.arch !== 'x64' && process.arch !== 'arm64'),
then Error "Unsupported architecture on macOS: (process.arch)" will be thrown.

Previously, however, the Error "Failed to load native binding" would have been thrown because @swc/core-darwin-arm64 does not exist. In this point of view, Probably I can argue that this changes make error easy-to-understand.


Related issue (if exists):

@CLAassistant
Copy link

CLAassistant commented Feb 5, 2023

CLA assistant check
All committers have signed the CLA.

@kdy1 kdy1 requested a review from kwonoj February 5, 2023 12:12
Copy link
Member

@kwonoj kwonoj left a comment

Choose a reason for hiding this comment

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

🤔 Honestly I don't remember if I added this or not,

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.

Same here 🤣 I wasn't aware of this code


swc-bump:

  • dbg-swc

@kdy1 kdy1 enabled auto-merge (squash) February 5, 2023 19:48
@kdy1 kdy1 added this to the Planned milestone Feb 5, 2023
@kdy1 kdy1 merged commit 964dfba into swc-project:main Feb 5, 2023
@AsPulse AsPulse deleted the fix/require-unneeded-package-darwin-universal branch February 5, 2023 22:41
@kdy1 kdy1 modified the milestones: Planned, v1.3.33, v1.3.34 Feb 8, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Jun 5, 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.

None yet

4 participants