swiftly icon indicating copy to clipboard operation
swiftly copied to clipboard

list-available/install don't seem to do bounds checking on Swift versions

Open patricktcoakley opened this issue 8 months ago • 4 comments

Currently you are able to call list-available and install on arbitrary numbers like 0 or 400 without any indication that those are not real versions. It would be nice if it swiftly could at least keep track of actual releases to gate the args to actual toolchain releases before running any commands with a friendly error message.

patricktcoakley avatar Apr 06 '25 23:04 patricktcoakley

Thanks, there could be some reasonable bounds to the selectors here, such as >1 and <30.

cmcgee1024 avatar Apr 07 '25 13:04 cmcgee1024

Would it make sense to cache the releases locally on bootstrap and gate them based on arch/platform for at least the minimum available versions and periodically update it?

patricktcoakley avatar Apr 07 '25 16:04 patricktcoakley

It's a bit of a balancing act. The idea is to try and decouple swiftly from having too much knowledge that there would need to be a release of swiftly just to update its internal database, not feature/bug fixing to swiftly itself.

cmcgee1024 avatar Apr 08 '25 11:04 cmcgee1024

Yeah that makes sense as a design goal and changes how I might interpret some things, thanks for clarifying.

patricktcoakley avatar Apr 08 '25 11:04 patricktcoakley