XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.6k stars 120 forks source link

[Discussion] Optimistic operator support #254

Open crsantos opened 1 year ago

crsantos commented 1 year ago

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.

MattKiazyk commented 1 year ago

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

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

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