xcresultparser icon indicating copy to clipboard operation
xcresultparser copied to clipboard

Xcode 16 beta 3 tests fail as xcresulttool get object is deprecated

Open mikehouse opened this issue 1 year ago • 5 comments

Hi. The issue the same as here https://github.com/fastlane/fastlane/issues/22132

These commands are okay

~ xcodebuild -version
Xcode 15.4
Build version 15F31d

~ ./scripts/xcresultparser -o cli /fastlane/test_output/Test-MyApp-2024.07.09_14-57-50-339029-+0700.xcresult

These commands are not okay

~ xcodebuild -version
Xcode 16.0
Build version 16A5202i

~ ./scripts/xcresultparser -o cli /fastlane/test_output/Test-MyApp-2024.07.09_14-57-50-339029-+0700.xcresult
Error: This command is deprecated and will be removed in a future release, --legacy flag is required to use it.
Usage: xcresulttool get object [--legacy] --path <path> [--id <id>] [--version <version>] [--format <format>]
  See 'xcresulttool get object --help' for more information.
Error: argumentError

Thanks for awesome tool, we use it every day on our CI pipelines.

mikehouse avatar Jul 09 '24 09:07 mikehouse

Thanks for the heads up. I will look into asap.

a7ex avatar Jul 09 '24 15:07 a7ex

The issue is with XCResultKit actually. It calls xcrun xcresulttool get/export, which are deprecated with xcresulttool shipped in Xcode 16 beta 3.

mangerlahn avatar Jul 10 '24 07:07 mangerlahn

I know. But I will need to investigate, whether I can use xcresultkit in another way or at least give the xcresulttool developers a heads up. Or even consider to ditch xcresulttool...

a7ex avatar Jul 10 '24 07:07 a7ex

I have prepared a pull request that adds a temporary workaround: https://github.com/davidahouse/XCResultKit/pull/52

The old/existing commands on xcresulttool will continue to work if a —legacy option is added.

mangerlahn avatar Jul 10 '24 08:07 mangerlahn

It's rather annoying that Apple didn't provide an environment variable option. Some of the new commands looks like we could use however seems to be missing a way to get the warnings from the report unfortunately.

Brett-Best avatar Jul 10 '24 08:07 Brett-Best

@a7ex https://github.com/davidahouse/XCResultKit/pull/52 is merged now, would we be able to bump the package to use it?

Brett-Best avatar Jul 23 '24 13:07 Brett-Best

Sure, will do that later after work. Stay tuned! :-)

On 23. Jul 2024, at 15:57, Brett Best @.***> wrote:

@a7ex https://github.com/a7ex davidahouse/XCResultKit#52 https://github.com/davidahouse/XCResultKit/pull/52 is merged now, would we be able to bump the package to use it?

— Reply to this email directly, view it on GitHub https://github.com/a7ex/xcresultparser/issues/39#issuecomment-2245331508, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANBA4VQ6NRZEEC7GDO2CADZNZOL3AVCNFSM6AAAAABKSNUFZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVGMZTCNJQHA. You are receiving this because you were mentioned.

a7ex avatar Jul 23 '24 16:07 a7ex

There is no new tag. I am waiting for David to make a new tag, so I can update my Package.swift.

Is it so urgent, that we can not wait for the tag an would now reference the commit hash? No…is it?

It’s all still beta early days… I am sure, David will soon make a tag for a new release.

As far as I understand this is anyway only a temporary solution. Once Apple really deprecates the old API, we will need to change a bit more. As far as I could see, that JSON objects are much simpler and nicer AND way smaller. But they also seem to lack information, which we had before with the now deprecated method. But we will see. Maybe the information is hidden behind some switches to the new API calls :-)

On 23. Jul 2024, at 15:57, Brett Best @.***> wrote:

@a7ex davidahouse/XCResultKit#52 is merged now, would we be able to bump the package to use it? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

a7ex avatar Jul 23 '24 22:07 a7ex

All good, I've made https://github.com/a7ex/xcresultparser/pull/40 which I'll update when a tag is made 😄

Yeah, I think the test summary part looks okay? But getting compile warnings/errors doesn't look okay so probably should raise a feedback with Apple about that removed functionality which I find really useful 😢

Brett-Best avatar Jul 24 '24 23:07 Brett-Best

Thank you Brett. I have a few refactoring for Swift 6 compatibility as well. I will add them also to the "Xcode 16 compatibility release" :-)

a7ex avatar Jul 25 '24 12:07 a7ex