-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
build: Make backtraces useable in release builds #2324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks reasonable.
Ideally, instead of enabling unwinding directly, another alternative would be to add -C force-unwind-tables
to the RUSTFLAGS
(see https://swatinem.de/blog/unwind-tables/#rust)
Another option to consider would be using debug = "line-tables-only"
, which would give you a full-fidelity backtrace with inline frames, etc, but I bet that would inflate the binary size even more.
@Swatinem So, if I understand correctly, with this option we would still have
I think let's just try with the current change first, I think it may already be helpful enough for what I need it for (mostly, I just would like to be able to find where errors originating from libraries are coming from. Usually if the error is emitted in Sentry CLI, I can find the error by searching for the error string). |
Yes, that codegen option adds the necessary unwind info to the binary so that backtraces work, but it avoids generating all the code to safely unwind in Rust, like destructors, |
Having `strip = "symbols"` and omitting `-C force-unwind-tables` makes backtraces generated with `RUST_BACKTRACE=1` completely useless in release builds. By adding the `-C force-unwind-tables` flag and setting `strip = "debuginfo"`, we make backtraces usable in release builds. This will help us debug issues we are unable to reproduce, since we can ask users to set `RUST_BACKTRACE=1` and provide the logs with this option.
e51acd9
to
ed19a2b
Compare
Alright, I went with your suggestion to set the |
 [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->  <h3>Snyk has created this PR to upgrade @sentry/cli from 2.40.0 to 2.41.1.</h3> :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project. <hr/> - The recommended version is **2 versions** ahead of your current version. - The recommended version was released **24 days ago**. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@sentry/cli</b></summary> <ul> <li> <b>2.41.1</b> - <a href="https://redirect.github.com/getsentry/sentry-cli/releases/tag/2.41.1">2025-01-21</a></br><h3>Various fixes & improvements</h3> <ul> <li>build: Replace <code>dotenv</code> with <code>dotenvy</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2801327504" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2351" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2351/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2351">#2351</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a> <ul> <li>This fixes a problem where multiline env variables were not supported in <code>.env</code> files</li> </ul> </li> </ul> </li> <li> <b>2.41.0</b> - <a href="https://redirect.github.com/getsentry/sentry-cli/releases/tag/2.41.0">2025-01-20</a></br><h3>Various fixes & improvements</h3> <ul> <li>build: Bump <code>symbolic</code> to <code>12.13.3</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2799045261" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2346" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2346/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2346">#2346</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(api): Replace custom deserializer with derive (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2775470184" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2337" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2337/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2337">#2337</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(sourcemaps): Reduce sourcemap upload memory usage (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2787225271" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2343" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2343/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2343">#2343</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>build: Update <code>memmap2</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2787106986" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2340" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2340/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2340">#2340</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref: Fix new clippy lints (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2787116709" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2341" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2341/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2341">#2341</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>feat(dif): Fail <code>debug-files upload</code> when file is too big (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2766119834" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2331" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2331/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2331">#2331</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(dif): Handle "too big" error with warning (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2766102524" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2330" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2330/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2330">#2330</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(dif): Create type for DIF validation errors (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2766031653" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2329" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2329/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2329">#2329</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(api): Remove unnecessary <code>collect</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2767666740" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2333" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2333/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2333">#2333</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> </ul> </li> <li> <b>2.40.0</b> - <a href="https://redirect.github.com/getsentry/sentry-cli/releases/tag/2.40.0">2025-01-02</a></br><h3>New features</h3> <ul> <li>feat(debugid): Update debug ID snippet to write on <code>globalThis</code> when available (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2720221798" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2301" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2301/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2301">#2301</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lforst/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/lforst">@ lforst</a></li> </ul> <h3>Improvements</h3> <ul> <li>build: Change release opt-level (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2750669268" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2325" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2325/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2325">#2325</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>build: Make backtraces useable in release builds (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2750667061" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2324" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2324/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2324">#2324</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> </ul> <h3>Bug fixes</h3> <ul> <li>fix(chunking): Remove power-of-two chunk size restriction (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2736094295" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2312" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2312/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2312">#2312</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> </ul> <details> <summary><h3>Non-user-facing changes</h3></summary> <p>We made several refactors and added several tests in this release. These changes should not affect users.</p> <ul> <li>ref(sourcemaps): Reword "no sourcemap ref" (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2746021867" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2320" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2320/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2320">#2320</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>test(proguard): Add chunk upload tests (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2747804109" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2322" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2322/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2322">#2322</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(proguard): Use existing chunked upload logic (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2742898013" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2318" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2318/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2318">#2318</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(chunks): Remove <code>upload-dif</code> reference from <code>poll_assemble</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2746026735" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2321" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2321/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2321">#2321</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(chunks): Make <code>render_detail</code> take <code>Option<&str></code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2742846974" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2317" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2317/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2317">#2317</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(chunks): Extract upload logic from <code>upload_difs_chunked</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2742820192" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2316" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2316/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2316">#2316</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(chunks): Rename <code>upload</code> module to <code>options</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2742766016" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2315" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2315/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2315">#2315</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(chunks): Make <code>ChunkOptions</code> a <code>struct</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2742699779" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2314" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2314/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2314">#2314</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(dif): Use <code>&str</code> in <code>DifUpload</code> struct (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2723132242" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2307" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2307/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2307">#2307</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(dif): Genericize <code>poll_assemble</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2718290128" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2300" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2300/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2300">#2300</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>feat(release): Replace release bot with GH app (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2721413987" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2306" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2306/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2306">#2306</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Jeffreyhung/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/Jeffreyhung">@ Jeffreyhung</a></li> <li>fix(proguard): Add leading <code>/</code> to uploaded Proguard file name (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2720591894" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2304" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2304/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2304">#2304</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(dif): Genericize <code>try_assemble</code> <code>options</code> parameter (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2718243867" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2299" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2299/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2299">#2299</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(api): Rename <code>ChunkedUploadOptions</code> to indicate they are set by server (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2718233880" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2298" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2298/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2298">#2298</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(proguard): Use <code>Chunked<ProguardMapping></code> for proguard upload (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2717433809" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2296" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2296/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2296">#2296</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(chunks): Make <code>ChunkedDifRequest</code> take <code>Cow<'_, str></code> for <code>name</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2717426787" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2295" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2295/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2295">#2295</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(proguard): Replace <code>MappingRef</code> with <code>ProguardMapping</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2717318233" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2294" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2294/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2294">#2294</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(proguard): Create new <code>proguard</code> <code>utils</code> submodule (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2715071148" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2293" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2293/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2293">#2293</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(proguard): Directly open paths as <code>ByteView</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2715020830" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2292" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2292/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2292">#2292</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(dif): Put hash in <code>ChunkedDifRequest</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2712888089" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2290" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2290/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2290">#2290</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(chunks): Rename <code>Named</code> trait to <code>Assemblable</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2712567504" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2289" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2289/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2289">#2289</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(dif): Make <code>poll_assemble</code> generic (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2705363162" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2287" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2287/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2287">#2287</a>) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/szokeasaurusrex/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/szokeasaurusrex">@ szokeasaurusrex</a></li> <li>ref(dif): Rename <code>ToAssemble</code> trait</li> <li>ref(dif): Make <code>try_assemble_dif</code> generic</li> <li>ref(dif): Replace <code>ChunkedDifMatch</code> with generic <code>ChunkedObject</code></li> <li>ref(utils): Use <code>usize</code> in <code>get_sha1_checksums</code> signature</li> <li>test(chunk-upload): Test chunk uploading only some chunks missing</li> <li>ref: Fix new Clippy lints</li> <li>test(chunk-upload): Test upload where only some files need upload (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2699666052" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2276" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2276/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2276">#2276</a>)</li> <li>test(chunk-upload): Test chunk upload with many chunks (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2699626039" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2275" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2275/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2275">#2275</a>)</li> <li>ref(test): Use constant for expected request boundary (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2699674601" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2277" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2277/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2277">#2277</a>)</li> <li>test(chunk-upload): Add a test for uploading multiple debug files (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2699041412" data-permission-text="Title is private" data-url="getsentry/sentry-cli#2274" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-cli/pull/2274/hovercard" href="https://redirect.github.com/getsentry/sentry-cli/pull/2274">#2274</a>)</li> <li>ref(sourcemaps): Fix clippy lint</li> <li>ref(test): Introduce <code>assert_cmd</code> test manager</li> <li>test(chunk-upload): Add test for full chunk upload</li> </ul> </details> </li> </ul> from <a href="https://redirect.github.com/getsentry/sentry-cli/releases">@sentry/cli GitHub release notes</a> </details> </details> --- > [!IMPORTANT] > > - Check the changes in this PR to ensure they won't cause issues with your project. > - This PR was automatically created by Snyk using the credentials of a real user. --- **Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs._ **For more information:** <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJjZTY2NTI4Zi04MmNmLTQ4ZWQtYjU1MC1iMzM3ODI5MTExMWEiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImNlNjY1MjhmLTgyY2YtNDhlZC1iNTUwLWIzMzc4MjkxMTExYSJ9fQ==" width="0" height="0"/> > - 🧐 [View latest project report](https://app.snyk.io/org/reisene/project/3b48baaa-833b-4239-b348-16091472ee83?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 📜 [Customise PR templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template) > - 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/reisene/project/3b48baaa-833b-4239-b348-16091472ee83/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/reisene/project/3b48baaa-833b-4239-b348-16091472ee83/settings/integration?pkg=@sentry/cli&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) [//]: # 'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/cli","from":"2.40.0","to":"2.41.1"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"ce66528f-82cf-48ed-b550-b3378291111a","prPublicId":"ce66528f-82cf-48ed-b550-b3378291111a","packageManager":"npm","priorityScoreList":[],"projectPublicId":"3b48baaa-833b-4239-b348-16091472ee83","projectUrl":"https://app.snyk.io/org/reisene/project/3b48baaa-833b-4239-b348-16091472ee83?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":2,"publishedDate":"2025-01-21T15:18:31.069Z"},"vulns":[]}' ## Podsumowanie zmian od Sourcery Aktualizacja @sentry/cli z wersji 2.40.0 do 2.41.1. Ta wersja zawiera różne poprawki błędów, ulepszenia kompilacji, nowe funkcje oraz zmiany niezwiązane z użytkownikiem, takie jak refaktoryzacje i nowe testy. Nowe funkcje: - Aktualizacja fragmentu debug ID do zapisu na `globalThis`, gdy jest dostępny. - Niepowodzenie `debug-files upload`, gdy plik jest za duży Poprawki błędów: - Naprawiono problem, w którym wieloliniowe zmienne środowiskowe nie były poprawnie parsowane z plików .env. - Usunięcie ograniczenia rozmiaru fragmentu do potęg dwójki. - Naprawiono problem, w którym przesyłanie plików debugowania mogło się nie powieść bez jasnego komunikatu o błędzie, gdy plik był zbyt duży. - Upewnij się, że przesłane pliki Proguard mają ukośnik na początku nazwy. - Poprawiono niepoprawne sformułowanie w komunikatach o błędach map źródłowych Ulepszenia: - Zmniejszenie zużycia pamięci podczas przesyłania map źródłowych. - Zastąpienie niestandardowego deserializatora makrem derive. - Refaktoryzacja logiki przesyłania plików w fragmentach. - Uogólnienie logiki składania plików w fragmentach. - Poprawa obsługi błędów dla dużych plików debugowania poprzez emitowanie ostrzeżeń zamiast przerywania przesyłania. - Utworzenie nowego typu dla błędów walidacji DIF. - Usunięcie niepotrzebnych wywołań collect w interakcjach API. - Zmiana sformułowania komunikatu "no sourcemap ref". - Użycie istniejącej logiki przesyłania w fragmentach dla plików Proguard. - Usunięcie odniesienia `upload-dif` z funkcji `poll_assemble`. - Umożliwienie funkcji `render_detail` przyjmowania opcjonalnego ciągu znaków. - Wyodrębnienie logiki przesyłania z funkcji `upload_difs_chunked`. - Zmiana nazwy modułu `upload` na `options`. - Utworzenie struktury `ChunkOptions`. - Użycie wycinków ciągów znaków w strukturze `DifUpload`. - Uogólnienie parametru opcji `try_assemble`. - Zmiana nazwy `ChunkedUploadOptions`, aby wskazać, że są one ustawiane przez serwer. - Umożliwienie `ChunkedDifRequest` przyjmowania `Cow` dla nazwy. - Zastąpienie `MappingRef` przez `ProguardMapping`. - Utworzenie nowego podmodułu narzędziowego `proguard`. - Bezpośrednie otwieranie ścieżek jako `ByteView`. - Umieszczenie hasha w `ChunkedDifRequest`. - Zmiana nazwy cechy `Named` na `Assemblable`. - Uogólnienie `poll_assemble`. - Zmiana nazwy cechy `ToAssemble`. - Uogólnienie `try_assemble_dif`. - Zastąpienie `ChunkedDifMatch` przez ogólny `ChunkedObject`. - Użycie `usize` w sygnaturze `get_sha1_checksums`. - Naprawienie linta clippy w module sourcemaps. - Wprowadzenie menedżera testów `assert_cmd` Kompilacja: - Podniesienie zależności `symbolic` do wersji `12.13.3`. - Zmiana poziomu optymalizacji wydania. - Umożliwienie używania backtrace w kompilacjach wydania. - Aktualizacja zależności `memmap2`. - Zastąpienie zależności `dotenv` przez `dotenvy` Testy: - Dodanie testów przesyłania fragmentów dla plików Proguard. - Testowanie przesyłania fragmentów tylko z brakującymi fragmentami. - Testowanie przesyłania fragmentów z wieloma fragmentami. - Użycie stałej dla oczekiwanej granicy żądania. - Dodanie testu przesyłania wielu plików debugowania. - Dodanie testu pełnego przesyłania fragmentów. - Testowanie przesyłania, w którym tylko niektóre pliki wymagają przesłania. Prace porządkowe: - Zastąpienie bota wydawniczego aplikacją GitHub. - Naprawienie nowych lintów clippy <details> <summary>Original summary in English</summary> ## Summary by Sourcery Upgrade @sentry/cli from 2.40.0 to 2.41.1. This release includes various bug fixes, build improvements, new features, and non-user-facing changes such as refactorings and new tests. New Features: - Update debug ID snippet to write on `globalThis` when available. - Fail `debug-files upload` when file is too big Bug Fixes: - Fix an issue where multiline environment variables were not correctly parsed from .env files. - Remove chunk size restriction to powers of two. - Fix a problem where debug files upload could fail without a clear error message when the file was too large. - Ensure uploaded Proguard files have a leading slash in their name. - Fix incorrect wording in source map error messages Enhancements: - Reduce source map upload memory usage. - Replace custom deserializer with derive macro. - Refactor chunked file upload logic. - Genericize chunked file assembly logic. - Improve error handling for large debug files by emitting warnings instead of failing the upload. - Create a new type for DIF validation errors. - Remove unnecessary collect calls in API interactions. - Reword "no sourcemap ref" message. - Use existing chunked upload logic for Proguard files. - Remove `upload-dif` reference from `poll_assemble` function. - Make `render_detail` take an optional string. - Extract upload logic from `upload_difs_chunked` function. - Rename `upload` module to `options`. - Make `ChunkOptions` a struct. - Use string slices in `DifUpload` struct. - Genericize `try_assemble` options parameter. - Rename `ChunkedUploadOptions` to indicate they are set by the server. - Make `ChunkedDifRequest` take a `Cow` for name. - Replace `MappingRef` with `ProguardMapping`. - Create new `proguard` utils submodule. - Directly open paths as `ByteView`. - Put hash in `ChunkedDifRequest`. - Rename `Named` trait to `Assemblable`. - Make `poll_assemble` generic. - Rename `ToAssemble` trait. - Make `try_assemble_dif` generic. - Replace `ChunkedDifMatch` with generic `ChunkedObject`. - Use `usize` in `get_sha1_checksums` signature. - Fix clippy lint in sourcemaps module. - Introduce `assert_cmd` test manager Build: - Bump the `symbolic` dependency to version `12.13.3`. - Change release optimization level. - Make backtraces usable in release builds. - Update `memmap2` dependency. - Replace `dotenv` with `dotenvy` dependency Tests: - Add chunk upload tests for Proguard files. - Test chunk uploading with only some chunks missing. - Test chunk upload with many chunks. - Use a constant for the expected request boundary. - Add a test for uploading multiple debug files. - Add a test for full chunk upload. - Test upload where only some files need to be uploaded. Chores: - Replace release bot with GitHub app. - Fix new clippy lints </details>
Having
panic = "abort"
andstrip = "symbols"
makes backtraces generated withRUST_BACKTRACE=1
completely useless in release builds.By changing these options to
panic = "unwind"
andstrip = "debuginfo"
makes backtraces usable in release builds. This will help us debug issues we are unable to reproduce, since we can ask users to setRUST_BACKTRACE=1
and provide the logs with this option.This change does somewhat significantly increase release build binary size (from 7.9 MB to 13.9 MB on my system). This is likely acceptable if it improves our ability to debug problems. If folks complain, we can consider distributing a separate "stripped" binary for users sensitive to large binary size.
Closes #2200