-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
lib: Expand list of supported platforms #143732
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
base: master
Are you sure you want to change the base?
Conversation
|
|
|
I'm not sure that lib/systems/supported.nix contains sufficient information to serve as the platform tier list. This file is just the system doubles, and the support tier needs to take into account libc (musl/glibc), static/dynamic linking, gcc/clang, ABI, etc. If anything I think lib/systems/supported.nix would be autogenerated from the platform list, rather than the other way around. |
|
@Ericson2314, is that file more authoritative and are the doubles enough information to disambiguate between the platforms or do we need @r-burns, this is exactly intended to start this discussion. I did note the relative lack of information currently in You say |
|
What is all this So yes I do agree with @r-burns. Either we pare this back to be just doubles, or we make it non-string full records, in which case it should be merged with The underlying problem, as usual, is that Flakes are ignorant about how we've dealt with platforms in Nixpkgs in recent years. |
|
Yes, agreed. I did state this in the OP:
|
|
I marked this as stale due to inactivity. → More info |
|
I've just pushed an update to this PR that attempts to address concerns raised. Rather than a list of system doubles, which are inadequate as identifiers for the support tiers, it now uses the system attrsets from This is much closer to the ideal situation but there are still some problems:
Item 2 could be addressed with some refactoring of Item 3 does have the benefit that it's clear where a certain tier isn't completely respected. All tier 3 systems should probably be built by Hydra but that's currently not the case for Pinging @asymmetric @RaitoBezarius, who prompted me picking this back up and might be interested. |
RFC NixOS#112 raised the question of what the source of truth is about the platforms supported in Nixpkgs. RFC NixOS#46 specified the authoritative source would be the Nixpkgs manual but this hasn't happened yet. When it comes to Nixpkgs the tier list is currently only important to determine what platforms Hydra should evaluate for. This information is currently in `lib/systems/flake-systems.nix`. However, a manual section as described in RFC NixOS#46 would be a second consumer, so a separate file is warranted. We re-introduce `lib/systems/supported.nix` as a suitable authoritative source. A Nixpkgs manual section could be auto-generated based on this file.
`lib.systems.supported` is intended to be the authoritative source on what support tier platforms belong to. By getting the platforms built by Hydra from there we make explicit which platforms are currently not supported according to their tier and should either be taken care of or reassigned to a different tier. `x86_64-unknown-linux-musl` is listed in RFC NixOS#46 as a tier 3 platform but is not currently built by Hydra for example. And many platforms originally proposed as tier 7 are in fact built by Hydra and at least some of them should be considered for promotion.
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't resurrect supported.nix.
We are trying to move away from having a "blessed platform list" in examples.nix that people can fight over, and towards passing arguments to nixpkgsFun.
|
Then what's the way forward here? Just have the tiers listed in the manual? Users do want to know how well their platform of choice is supported. And maintainers need a clear reference of what platforms can hold up channels or warrant significant refactors. |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-07-24-documentation-team-meeting-notes-66/30885/1 |
This is contradictory though with the RFC regarding supported platform tiers. We at least need a way to organize the blessed platform list that is supported by the official nixpkgs CI that outputs signed NARs for cache.nixos.org. We can call it nixpkgs-ci-platforms.nix if you prefer it. |
This is already in the hydra jobset configuration. How else do you think Hydra knows what outputs to build and sign?
Sure. The RFC is about documentation. Indeed, its one-sentence description of itself is "Document the way to describe the level of support a platform can expect in Nixpkgs." The only place those lists need to appear as code is in Hydra's job lists (where they already do) and OfBorg's configuration files (where they already do). Putting it elsewhere is just gratuitous imposition of policy, not mechanism. |
Do you suggest it is possible to consume the Hydra jobset list to auto-generate documentation for the purpose mentioned in the original post of that PR? If so, that's fine, yes. |
Probably, but if not then the PR to amend that should be opened against the Hydra jobsets, not |
|
The problem with the Hydra jobsets is that they're a flat specification of things Hydra builds. AFAIK Hydra only needs the doubles? Adding tier information to the jobsets is superfluous and the tiers need more than just doubles. The documentation would also be more comfortably written against a stable API. I'm not sure why lib is such a bad location for this information but I also don't care all that much where it goes. If there's an appropiate alternate location, I'm perfectly willing to refactor. It seems like you're worried about bikeshedding platform tiers more than anything but that's already a thing. There officially is a tier list (even though almost unwritten at this point) and people already want to change the official tier of certain platforms. We should simply require RFCs or whatever due process is decided on for changes to this file. |
You're just starting to scratch the surface of why it's a bad idea to try to put this stuff into code. It's one thing to write documentation that says in prose what non-developer users should expect. It's quite another to specify that precisely enough that it can be used programmatically; it's a minefield we shouldn't step into.
Because, like I said,
Things that turn out to be a bad idea are are easy to revert if they aren't exposed in
No. |
Motivation for this change
RFC #112 has raised the question of what the source of truth is about the platforms supported in Nixpkgs. RFC #46 specified the authoritative source would be the Nixpkgs manual but this hasn't happened yet.
Recently,
lib/systems/supported.nixwas added and this seems like a suitable authoritative source. A Nixpkgs manual section could be auto-generated based on this file. However, this file only lists the platforms that the Hydra CI builds for, so we need to add the other tiers and platforms.I have added the platforms as they are listed in RFC #46 almost verbatim because they include the compiler and libc and further properties like which linker or whether the platform uses static libraries. Should this rather use system triples as in
lib/systems/examples.nix, e.g.,aarch64-unknown-linux-android? Or perhaps platforms should be represented as attrsets rather than strings?The RFC also specifies
x86_64-illumoswhilelib/systems/doubles.nixhasx86_64-solarisfor illumos. Is either one canonical and are there other platforms with multiple identifiers?This PR is opened to support NixOS/rfcs#113.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)