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(emotion): Fix panic on function name identifier being None #254

Merged
merged 5 commits into from
Jan 22, 2024

Conversation

Codex-
Copy link
Contributor

@Codex- Codex- commented Jan 21, 2024

Follow up to #245

Fixes this panic by ensuring that there is something to unwrap:

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/runner/work/plugins/plugins/packages/emotion/transform/src/lib.rs:449:48
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.270.26/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/alexmiller/dev/app/node_modules/jest-runner/build/index.js")'

Caused by:
    0: failed to invoke `@swc/plugin-emotion` as js transform plugin at @swc/plugin-emotion
    1: RuntimeError: unreachable

Stack backtrace:
   0: _napi_register_module_v1
   1: _wasmer_vm_imported_memory32_atomic_notify
   2: _napi_register_module_v1
   3: _napi_register_module_v1
   4: _napi_register_module_v1
   5: _napi_register_module_v1
   6: _napi_register_module_v1

Copy link

changeset-bot bot commented Jan 21, 2024

⚠️ No Changeset found

Latest commit: 9a1698c

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@Codex- Codex- force-pushed the fix_plugin_emotion_panic branch from 80fc066 to 906b5dd Compare January 21, 2024 22:36
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!

@kdy1 kdy1 enabled auto-merge (squash) January 22, 2024 03:28
@kdy1 kdy1 changed the title fix(plugin-emotion): panic on function name identify if None fix(emotion): Fix panic on function name identifier being None Jan 22, 2024
@kdy1 kdy1 merged commit 94d9e63 into swc-project:main Jan 22, 2024
6 checks passed
@Codex- Codex- deleted the fix_plugin_emotion_panic branch January 22, 2024 04:11
@kdy1 kdy1 self-assigned this Mar 26, 2024
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.

2 participants