Migrate from @sentry/cli to the new getsentry/cli
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 65/100
- Issue 類型
- 重構
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- nodejs, shell, typescript
- 領域
- build-system, cli, mobile-dev
研究方向
The issue lists the specific files that invoke the CLI: scripts/update-cli.sh, packages/core/scripts/sentry-xcode.sh, packages/core/scripts/sentry-xcode-debug-files.sh, packages/core/sentry.gradle.kts, and the @sentry/expo-upload-sourcemaps package. Start by examining these files to understand how the old @sentry/cli is referenced and invoked. The main change is in sentry-xcode.sh line 64, where the argument passing needs to switch from a positional to --build-script. Test the changes by running the build scripts in a React Native project to ensure source map and debug file uploads still work.
由索引模型根據 Issue 內容生成。
描述
Description
Migrate the SDK's build-time tooling from the legacy @sentry/cli (currently 3.8.0) to the new getsentry/cli.
Motivation and Context
Today @sentry/react-native depends on @sentry/cli v3 directly, while @sentry/bundler-plugins still resolves @sentry/cli v2. Because these are two incompatible majors, npm/yarn cannot dedupe them and users get the CLI binary installed twice (once per major).
With v11 of the SDKs — and therefore the bundler plugin — we move to the new getsentry/cli, skipping v3 of the old CLI on the plugin side. Aligning the React Native SDK onto the same new CLI removes the duplicate binary and keeps the RN SDK and bundler plugin on a single, shared CLI.
Reported by a user hitting the double-install.
Scope / current CLI touchpoints
The CLI is invoked from build-time scripts, not the JS runtime:
scripts/update-cli.sh— pins the CLI version (packages/core, root,packages/expo-upload-sourcemaps).packages/core/scripts/sentry-xcode.sh—react-native xcode(source maps upload).packages/core/scripts/sentry-xcode-debug-files.sh—debug-files upload(dSYM,--include-sources).packages/core/sentry.gradle.kts— resolves/invokes the CLI for Android.@sentry/expo-upload-sourcemaps— bundled CLI for Expo.
Migration risks
Overall: medium-low. Distribution is one platform binary per npm install.
-
Binary distribution — the new CLI, like the old one, installs one platform binary through npm. No change in install footprint.
-
debug-files upload— supports dSYM and--include-sources. ✅ parity. -
react-native xcode/react-native gradle— both exist in the new CLI and mirror the legacy workflows. ✅ parity. -
⚠️ Xcode wrapper build-script argument (needs code change + testing) — the existing wrapper passes the RN build-script path as a trailing positional:
# packages/core/scripts/sentry-xcode.sh:64 REACT_NATIVE_XCODE_WITH_SENTRY="\"$SENTRY_CLI_EXECUTABLE\" react-native xcode $ARGS \"$REACT_NATIVE_XCODE\""The new command expects the build script via
--build-script; positionals are forwarded to the script instead. The wrapper must be adjusted and tested (default path + custom$1override, spaces in paths — see #6583).
Acceptance criteria
- RN SDK,
@sentry/expo-upload-sourcemaps, and the bundler plugin resolve to a single CLI — no duplicate binary install. - iOS source maps upload works (default and custom build-script path, paths with spaces).
- iOS debug-files (dSYM) upload works, including
--include-sources. - Android (
sentry.gradle.kts) upload works on both architectures. - Expo sourcemaps upload works.
-
SENTRY_DISABLE_AUTO_UPLOAD/SENTRY_ALLOW_FAILUREbehavior preserved. -
scripts/update-cli.sh/ version-pinning updated for the new CLI. - Update
LICENSEfiles similar to getsentry/sentry-javascript#24956
Next steps
Target: v11 (align with the bundler plugin's move to the new CLI).
- 主要語言
- TypeScript
- 星號
- 1.8k
- 分支
- 371
- 平均合併
- 22 小時 3 分鐘
- 30 天內合併 PR
- 106
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getsentry/sentry-react-native 的其他 Issue
-
React-Native
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-react-native#7073 · 1 則留言 ·
維護者通常 1 天內回覆
-
Improvement React-Native
難度 2/5 1-3 小時 新手友好度 80/100
getsentry/sentry-react-native#7055 · 1 則留言 ·
維護者通常 1 天內回覆
-
React-Native Replays Task
難度 2/5 1-3 小時 新手友好度 88/100
getsentry/sentry-react-native#6680 · 1 則留言 ·
維護者通常 1 天內回覆
-
Improvement React-Native
難度 2/5 1-3 小時 新手友好度 68/100
getsentry/sentry-react-native#6143 · 2 則留言 ·
維護者通常 1 天內回覆
-
React-Native Task User Feedbacks
難度 2/5 1-3 小時 新手友好度 84/100
getsentry/sentry-react-native#5932 · 2 則留言 ·
維護者通常 1 天內回覆
查看 getsentry/sentry-react-native 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
MetaMask/eth-phishing-detect#317371 ·
維護者通常 1 天內回覆
-
android:player ios:player
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 92/100
erkamyaman/rust-anything#963 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
ZdruzenieSTROM/webstrom-frontend#934 ·
維護者通常 1 天內回覆
-
bug(worker): detector run is marked failed and never retried when span download fails可能已有人在做 @jagrutgarg 今天認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 72/100
traceroot-ai/traceroot#3434 · 1 則留言 ·
維護者通常 1 天內回覆