Consider OS version when matching artifacts to platforms #419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We currently largely ignore OS version, and for most platforms that doesn't really matter. But binaries built for a particular FreeBSD version are forward- but not backward-compatible with other FreeBSD versions, and that isn't accounted for when choosing artifacts. That means that whenever the FreeBSD version used in the RootFS is bumped, entries in Artifacts.toml corresponding to older versions need to be manually deleted so they don't get chosen instead.
More care is needed here than I had anticipated, as
platforms_match
has documented but unfortunate behavior when both arguments havecompare_version_cap
set for theiros_version
comparison strategies. The function assumes that this case occurs only when both arguments are host platforms, and it compares their versions using==
. That strategy is set explicitly forCompilerShard
targets with a comment about treating the OS version as a bound, except it doesn't act as a bound as such if the comparator is e.g.HostPlatform()
.This is partially an experiment to see what breaks if the FreeBSD entries in
supported_platforms
start settingos_version
.