feat(iOS): Add sentry plugin to Gemfile + use debug upload - #1113
feat(iOS): Add sentry plugin to Gemfile + use debug upload#1113itaybre wants to merge 5 commits into
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1113 +/- ##
==========================================
+ Coverage 32.47% 32.67% +0.20%
==========================================
Files 133 134 +1
Lines 15695 15769 +74
Branches 1106 1120 +14
==========================================
+ Hits 5097 5153 +56
- Misses 10581 10599 +18
Partials 17 17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3415c60. Configure here.
| const shouldAddGemfile = await clack.confirm({ | ||
| message: | ||
| 'Found a Gemfile in your project. Do you want to add the fastlane-plugin-sentry gem to your Gemfile?', | ||
| }); |
There was a problem hiding this comment.
Missing Gemfile existence check
Medium Severity
The Gemfile prompt always claims a Gemfile was found and asks to edit it, but never checks with gemFile first. Unlike the Fastfile flow above, projects without a Gemfile get a misleading prompt; accepting it then hits the failure path in addSentryPluginToGemfile.
Reviewed by Cursor Bugbot for commit 3415c60. Configure here.
| if (added) { | ||
| debug(`Gemfile found, asking user if they want to configure Gemfile`); | ||
| const shouldAddGemfile = await clack.confirm({ | ||
| message: | ||
| 'Found a Gemfile in your project. Do you want to add the fastlane-plugin-sentry gem to your Gemfile?', | ||
| }); | ||
| debug( |
There was a problem hiding this comment.
Bug: The Gemfile prompt is shown without checking if a Gemfile exists and does not correctly handle cancellation, leading to misleading messages and unexpected behavior.
Severity: MEDIUM
Suggested Fix
First, check for the existence of a Gemfile using gemFile(projectDir) before showing the prompt. Only prompt the user if a Gemfile is found. Second, wrap the clack.confirm call with the abortIfCancelled utility to ensure that user cancellation (e.g., via Ctrl+C) correctly terminates the wizard instead of proceeding with a faulty truthy value.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/apple/configure-fastlane.ts#L44-L50
Potential issue: The wizard unconditionally prompts the user with 'Found a Gemfile in
your project...' without first verifying that a `Gemfile` actually exists. If the user
agrees to add the gem but no `Gemfile` is present, the process fails and displays a
misleading warning: 'Could not edit your Gemfile...'. Additionally, if the user cancels
this prompt (e.g., by pressing Ctrl+C), the cancellation is not handled correctly. The
`clack.confirm` call is not wrapped in `abortIfCancelled`, causing its `Symbol` return
value to be treated as `true`, which leads to an unintended attempt to modify the
non-existent file.
Did we get this right? 👍 / 👎 to inform future reviews.


Changes:
sentry_debug_files_uploadinstead ofsentry_cliin fastlane as per our guides