Consider OS version when matching artifacts to platforms#419
Draft
Consider OS version when matching artifacts to platforms#419
Conversation
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 have `compare_version_cap` set for their `os_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 for `CompilerShard` 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()`.
8 tasks
Member
|
I have the impression that so far we haven't include this because binaries are effectively mostly compatible across different os versions, and making the os versions would introduce lots of friction. In a sense, I believe this was a pragmatic decision. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_matchhas documented but unfortunate behavior when both arguments havecompare_version_capset for theiros_versioncomparison 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 forCompilerShardtargets 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_platformsstart settingos_version.