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

feat(common): Use SourceMap::adjust_mappings #9052

Merged
merged 3 commits into from
Jun 14, 2024
Merged

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Jun 14, 2024

Description:

Related issue (if exists):

@kdy1 kdy1 added this to the Planned milestone Jun 14, 2024
@kdy1 kdy1 self-assigned this Jun 14, 2024
Copy link
Member Author

@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.

swc-bump:

  • swc_common --breaking

@kdy1 kdy1 marked this pull request as ready for review June 14, 2024 14:28
@kdy1 kdy1 requested review from a team as code owners June 14, 2024 14:28
@kdy1 kdy1 enabled auto-merge (squash) June 14, 2024 14:28
@kdy1 kdy1 changed the title fix(common): Use SourceMap::adjust_mappings feat(common): Use SourceMap::adjust_mappings Jun 14, 2024
@kdy1 kdy1 disabled auto-merge June 14, 2024 14:28
@kdy1 kdy1 enabled auto-merge (squash) June 14, 2024 14:28
@kdy1 kdy1 merged commit eda2e45 into swc-project:main Jun 14, 2024
148 checks passed
@kdy1 kdy1 deleted the srcmap branch June 14, 2024 14:45
kdy1 added a commit that referenced this pull request Jun 16, 2024
**Description:**

getsentry/rust-sourcemap#91 should fix this
issue, but let's revert #9052 for now.

# Context

`swc_core` regressed.

Caught by vercel/next.js#66902

```
 ⚠ Linting is disabled.
  ▲ Next.js 15.0.0-canary.34

 ✓ Checking validity of types
   Creating an optimized production build ...
Panic: PanicInfo { payload: Any { .. }, message: Some(attempt to add with overflow), location: Location { file: "/Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sourcemap-8.0.1/src/encoder.rs", line: 89, col: 13 }, can_unwind: true, force_no_backtrace: false }
Backtrace:    0: backtrace::backtrace::libunwind::trace
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5
      backtrace::backtrace::trace_unsynchronized::<<backtrace::capture::Backtrace>::create::{closure#0}>
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5
      backtrace::backtrace::trace::<<backtrace::capture::Backtrace>::create::{closure#0}>
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14
      <backtrace::capture::Backtrace>::create
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9
      <backtrace::capture::Backtrace>::new
             at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22
   1: next_swc_napi::init::{closure#0}
             at packages/next-swc/crates/napi/src/lib.rs:85:29
   2: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/alloc/src/boxed.rs:2077:9
      std::panicking::rust_panic_with_hook
             at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/std/src/panicking.rs:799:13
   3: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/std/src/panicking.rs
```
@kdy1 kdy1 modified the milestones: Planned, v1.6.0 Jun 16, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Jul 16, 2024
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.

1 participant