Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
patricktcoakley opened this issue Apr 6, 2025 · 4 comments

Comments

@patricktcoakley
Copy link
Contributor

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.

@cmcgee1024
Copy link
Member

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

@patricktcoakley
Copy link
Contributor Author

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?

@cmcgee1024
Copy link
Member

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.

@patricktcoakley
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants