Skip to content
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

Check specifically for file url in document_location, fixing crash in Xcode 15 when running in Apple Silicon #82

Merged
merged 2 commits into from Feb 14, 2024

Conversation

bpollman
Copy link
Contributor

Problem

The plugin is breaking with Xcode 15 on certain projects due to a missing url property.

Error

/Users/distiller/project/.bundle/ruby/3.1.0/gems/danger-xcode_summary-1.2.0/lib/xcode_summary/plugin.rb:202:in `parse_location': \e[31m (Danger::DSLError)
[00:05:08]: ▸ [!] Invalid `BuildDangerfile` file: undefined method `gsub' for nil:NilClass
[00:05:08]: ▸ file_path = document_location.url.gsub('file://', '').split('#').first
[00:05:08]: ▸ ^^^^^\e[0m

Description

I've taken inspiration from the recent fastlane fix addressing the same issue for the trainer.

It would appear that with Xcode 15 there are at least some cases where test failure data would not include a url property. Adjusting the check in failure_message to specifically verify the presence of self.document_location_in_creating_workspace&.url prior to attempting to append it to the failure message seems liek the most straightforward resolution.

@bpollman bpollman changed the title Check specifically for file url in failure_message, fixing crash in Xcode 15 when running in Apple Silicon Check specifically for file url in document_location, fixing crash in Xcode 15 when running in Apple Silicon Nov 14, 2023
@gmogames360
Copy link

@diogot Do you know when this will get merged/fixed? We are having the same issue in our implementation

@stephengilroy-grx
Copy link

Tested this out locally and it works for me 👍 . Any thoughts @diogot ? I wonder if this has been abandoned?

@nekrich
Copy link

nekrich commented Jan 12, 2024

@marcelofabri, do you have enough permissions to merge it into the master branch 🙏 ?

@giginet
Copy link
Contributor

giginet commented Jan 22, 2024

@diogot Could you check this PR and release it?

@diogot diogot merged commit 62677f0 into diogot:master Feb 14, 2024
@diogot diogot mentioned this pull request Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants