fix(xcode): Improve Xcode error msg when config load fails#2028
fix(xcode): Improve Xcode error msg when config load fails#2028
Conversation
When a user sets up a project in xcode, e.g., by using the wizard, the .sentryclirc config is created in the project folder. However, when this file isn't included in the Input Files of the Xcode script for uploading debug files, this causes an error in Xcode which is not very clear. This commit improves that error message.
szokeasaurusrex
left a comment
There was a problem hiding this comment.
Two small nitpicks – you can choose whether or not to implement the changes – this code looks pretty good though! Great first PR!
src/config.rs
Outdated
| let msg = format!("Failed to load {file_desc}."); | ||
| #[cfg(target_os = "macos")] | ||
| if xcode::launched_from_xcode() { | ||
| return msg + " Hint: Please ensure that ${SRCROOT}/.sentryclirc is added to the Input Files of this Xcode Build Phases script."; |
There was a problem hiding this comment.
Also nitpick: I slightly preferred your previous implementation with push_str here.
There was a problem hiding this comment.
@szokeasaurusrex Clippy would give an error for having msg as mutable
There was a problem hiding this comment.
Code looks good!
One last thing before merging, however: please make sure the PR title and comment follow the Sentry commit naming conventions. I specifically would recommend changing the title to "fix(xcode)" (lowercase). Please also make sure to reference the issue that this PR addresses at the end of the PR description, like so:
Fixes GH-<issue number here>
When a user sets up a project in xcode, e.g., by using the wizard, the .sentryclirc config is created in the project folder. However, when this file isn't included in the Input Files of the Xcode script for uploading debug files, an error is thrown in Xcode which isn't very clear. This commit improves that error message by specifying what the user needs to do.
Fixes GH-1924