Skip to content

Show a hint that available versions depend on the actual runner/image tag #94

@janbrasna

Description

@janbrasna

I'm wondering whether in case of version not found type of error, under listing the available versions:

Run maxim-lobanov/setup-xcode@v1
Switching Xcode to version '14.2'...
Available versions:
┌─────────┬──────────┬─────────────┬─────────────┬────────┬──────────────────────────────────┐
│ (index) │ version  │ buildNumber │ releaseType │ stable │               path               │
├─────────┼──────────┼─────────────┼─────────────┼────────┼──────────────────────────────────┤
│    0    │ '15.4.0' │ '15F5021i'  │   'Beta'    │ false  │  '/Applications/Xcode_15.4.app'  │
│    1    │ '15.3.0' │  '15E204a'  │    'GM'     │  true  │  '/Applications/Xcode_15.3.app'  │
│    2    │ '15.2.0' │  '15C500b'  │    'GM'     │  true  │  '/Applications/Xcode_15.2.app'  │
│    3    │ '15.1.0' │   '15C65'   │    'GM'     │  true  │  '/Applications/Xcode_15.1.app'  │
│    4    │ '15.0.1' │  '15A507'   │    'GM'     │  true  │ '/Applications/Xcode_15.0.1.app' │
│    5    │ '14.3.1' │  '14E300c'  │    'GM'     │  true  │ '/Applications/Xcode_14.3.1.app' │
└─────────┴──────────┴─────────────┴─────────────┴────────┴──────────────────────────────────┘
Error: Could not find Xcode version that satisfied version spec: '14.2'

if additional guidance or a short explainer would help with the usual confusion.

  1. that only version preinstalled on the runner can be selected, and these versions depend on what GHA ships:
    • on the runner image tag — versions will be added and removed over time
    • folks can get one image tag one day, and another image tag the next… and then the first one again after that
    • and that every major macOS version label ships with a whole different set of Xcode versions, so they should make sure they're on the runs-on: chosen or pinned as they deliberately intend…
  2. however they can influence that mainly by selecting the right OS, esp. in times when -latest label moves between versions, or shifts beneath them if they're note paying enough attention or don't have the tribal knowledge that at times of year the labels start pointing to a new major version, and these images will have completely different set of tools available.
    • but also in general, when -latest might be older than some arbitrary os version if specified explicitly in the runs-on label, and that one is getting the newer versions, while the more conservative "stable" not… it's a good nudge to check, that -latest might not be the newest and bestest;)

Some sort of concise, helpful amalgamation of all these case into a simple line added to the error output, what to check for or consider.

Would help with all the confusion like #89 #80 #78 #77 #76 #73 #72

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions