Potentially wrong command to get installed runtimes
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 4.8k
- Forks
- 182
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 1
Description
Hey there!
Thanks a lot for the library, it's very useful in our setup!
I've started to use the library to install required runtimes to run screenshots generation with fastlane. And while I was exploring xcrun simctl from terminal and setting up our small swift script I've noticed something that probably is an issue in the library code as well 👀 But since the documentation of the xcrun simctl is not very big it's hard to say if I'm correct. So I'll share my thoughts and you could tell me if my findings make any sense 👀
So in the project I've found this command being used to find installed runtimes:
https://github.com/XcodesOrg/xcodes/blob/aa795f81ad4ffe2c696f643a36fdeac116389e87/Sources/XcodesKit/Environment.swift#L44
If I run this command from terminal this is the output:
Which seems fine at first. We get runtimes by their udid. However if I remove the option to list those as json here is an output:
There is a tiny change that maybe is a big thing. Here it says Disk Images. And I believe that Disk Images are not the same as Installed Runtimes. Basically I think it's possible to have a Disk Image that it not installed.
Another clue which makes it even more obvious is this output on one of our build machines. As you can see there are 3 disk images, 3 of which are ready. While 0 runtimes available:
Let me know what you think about those findings. Maybe I misinterpret something wrong?
Cheers!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Sources/XcodesKit/Environment.swift at line 44 and compare the xcrun simctl JSON output with the non-JSON Disk Images output. Determine whether the command reports installed runtimes or disk images, then verify what the library should use to identify available runtimes. Done means the reported runtime list matches the intended installed-runtime state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100