Fix upstream sentry-wizard bugs in the ported iOS and React Native wizards

未关闭
#2,561 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
ios, react-native, typescript
领域
mobile

调研方向

Start with the Apple wizard in src/lib/wizard/apple/, specifically filterFilesByExceptionSets, getExceptionSetsForGroup and resolvePathOfGroupRelativeToGroup in xcode-manager.ts, and the update regex in fastlane.ts. The React Native bugs are in src/lib/wizard/react-native/ across xcode.ts, expo.ts, expo-env-file.ts, javascript.ts, gradle.ts and react-native-wizard.ts. Done means each of the 11 checklist items behaves as described and the matching tests pass; the issue does not name the test files, so locate them first.

由索引模型根据 Issue 内容生成。

描述

getsentry/toolkit#2544 ports the iOS, Apple Snapshots and React Native flows of sentry-wizard 9.1.0 into sentry wizard as-is (part of getsentry/toolkit#2511). Warden flagged these 11 bugs in that ported code. Each one also exists in upstream sentry-wizard 9.1.0 (@069923d), so #2544 leaves them as they are and this issue tracks fixing them.

iOS (src/lib/wizard/apple/)

  • membershipExceptions are matched with path.includes(), so excluding View.swift also drops ContentView.swift from the target's sources (xcode-manager.ts, filterFilesByExceptionSets). Warden
  • Synchronized-group exception sets aren't filtered by their owning target, so one target's exclusions can hide another target's entry point (xcode-manager.ts, getExceptionSetsForGroup). Warden
  • A nested PBXGroup with no path resolves to undefined, so the files in it are dropped and the snippet isn't injected (xcode-manager.ts, resolvePathOfGroupRelativeToGroup). Warden
  • A sentry_debug_files_upload on the first line of a lane isn't matched by the update regex, so a second copy is appended (fastlane.ts). Warden

React Native (src/lib/wizard/react-native/)

  • script.includes("expo") also matches shell export, so a plain RN bundle script gets the Expo rewrite (xcode.ts). Warden
  • The manual app.json snippet puts plugins at the root instead of under expo (expo.ts). Warden
  • An Expo plugin that's already configured is reported as a patch failure, and the user is told to add it again (expo.ts). Warden
  • Appending to an existing .env.local doesn't add a leading newline, so the token comment can join onto the last line (expo-env-file.ts). Warden
  • addSentryInit reports success after writeFileSync fails (javascript.ts). Warden
  • wrapRootComponent reports success after writeFileSync fails (javascript.ts). Warden
  • writeAppBuildGradle swallows write errors, so the wizard still logs that app/build.gradle was saved (gradle.ts, react-native-wizard.ts). Warden

via @BYK.

--

View Session [Sentry]

主要语言
TypeScript
星标
975
派生
189
平均合并
19 小时 57 分钟
30 天内合并 PR
542

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/toolkit 的其他 Issue

查看 getsentry/toolkit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。