Skip to content

Conversation

@stepheng
Copy link

@stepheng stepheng commented Aug 26, 2025

Xcode 16: xcresulttool version 23024, format version 3.53 (current)
Xcode 26: xcresulttool version 24051.1, schema version: 0.1.0 (legacy commands format version: 3.53)

The regular expression added to determine if the --legacy parameter is needed only matched on numeric characters for the version, the new version number has a decimal and would result in a null pointer error being thrown when trying to get the version. Updated to optionally support the decimalised version number. If no match is found, assume it's a newer version and assume --legacy is needed in this case as well.

This is the trace seen when this issue this PR resolves is hit:

/Users/bamboo/.gem/gems/xcresult-0.2.2/lib/xcresult/parser.rb:90:in `xcresulttool_command': undefined method `[]' for nil:NilClass (NoMethodError)
	from /Users/bamboo/.gem/gems/xcresult-0.2.2/lib/xcresult/parser.rb:80:in `get_result_bundle_json'
	from /Users/bamboo/.gem/gems/xcresult-0.2.2/lib/xcresult/parser.rb:13:in `initialize'

If the version string does not match the expected format, assume legacy is required.
Add unit test to validate legacy is required for the Xcode 26 command line tools style version string returned from xcresulttool.
Update unit tests to confirm that the version is being correctly matched for the newer style string.

.Include a test for the case where no version information can be decoded (assume new).
Preferred instead of allowing arbitrary matches.
@bradwindy
Copy link

What's the timeline on getting this merged? It may solve the following error I'm getting in Xcode 26.1. But not on 26.0 for some reason?

/Users/vagrant/.asdf/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/xcresult-0.2.2/lib/xcresult/parser.rb:100:in `execute_cmd': Failed to execute - xcrun xcresulttool get --legacy --format json --path output-build/XXXXX.xcresult (RuntimeError)
	from /Users/vagrant/.asdf/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/xcresult-0.2.2/lib/xcresult/parser.rb:82:in `get_result_bundle_json'
from /Users/vagrant/.asdf/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/xcresult-0.2.2/lib/xcresult/parser.rb:82:in `get_result_bundle_json'
	from /Users/vagrant/.asdf/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/xcresult-0.2.2/lib/xcresult/parser.rb:13:in `initialize'
	from /Users/vagrant/.asdf/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/danger-xcode_summary-1.5.0/lib/xcode_summary/plugin.rb:161:in `new'
	from /Users/vagrant/.asdf/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/danger-xcode_summary-1.5.0/lib/xcode_summary/plugin.rb:161:in `report'
	from danger/build/helpers/Dangerfile:15:in `parse_xcode_summary'

@m1entus
Copy link

m1entus commented Nov 5, 2025

+1

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.

3 participants