XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Discussion] Optimistic operator support

crsantos opened this issue · comments

Hi, first of all, great cmd line tool.

This is more like a discussion I would like to start, to have your opinions.

I'm focusing this discussion on the cmd line tool, and how it's being used on fastlane right now.


Does it makes sense to support Optimistic operators for Xcode versions ~>?

Just like xcode-install used to do, with its fastlane wrapper:

xcversion(version: "~> 14.1")

I think we can benefit from something similar for xcodes.

Right now,

$ xcodes installed

outputs this list:

13.3.1 (13E500a)         /Applications/Xcode13.3.1.app
14.1 (14B47b) (Selected) /Applications/Xcode14.1.app

The idea was to have something like this:

$ xcodes installed '~> 14'

This would return the matching versions, with the compatible Xcode paths:

14.1 (14B47b) (Selected) /Applications/Xcode14.1.app

Right now, I'm just collecting feedback if this makes sense, but I'm happy to contribute with this change to xcodes installed.

Thanks.

Hey @crsantos

I absolutely think that the operator is a fantastic add for Xcodes, especially those that have come over from xcversion

My thoughts is that code wise, this would be

  • given an array of xcode versions
  • bring back a single xcode version appropriate to how it works with xcversion.

This could be used with the select command as well as installed etc.

Hope that helps. I think it's a fantastic add.