Skip to content

Conversation

matthewbastien
Copy link
Member

@matthewbastien matthewbastien commented Sep 30, 2025

Description

Swiftly toolchains in the toolchain selection dialog were being sorted by name which sorts incorrectly in some cases. For example, 5.10.0 will come after 5.9.0 even though it should be the other way around. This was because the sorting happened after we already converted the version to a string.

Move the sorting to before we map to string so that we have better control over the order in which toolchains are sorted. This means that the sorting is done in the Swiftly class rather than downstream. I also took this opportunity to remove some duplicated code and clean up a few variable names.

In legacy mode (Swiftly <1.1.0) we don't have the actual version numbers unless we do some brittle parsing. So, we'll have to keep sorting by name in that case.

Tasks

  • Required tests have been written
  • [ ] Documentation has been updated
  • [ ] Added an entry to CHANGELOG.md if applicable

@award999 award999 merged commit d37b377 into swiftlang:main Oct 1, 2025
45 of 46 checks passed
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

Successfully merging this pull request may close these issues.

2 participants