Skip to content
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

lib.systems.doubles.all: reorganize #119833

Merged
merged 1 commit into from
Apr 23, 2021
Merged

Conversation

alyssais
Copy link
Member

Motivation for this change

The previous mess was partially grouped by OS, and partially grouped
by architecture, which made it very difficult to know where to add new
entries.

I've chosen to group by OS entirely, because OSes are likely to
maintain exhaustive lists of supported architectures, but it's far
less likely we'd be able to find exhaustive lists of supported OSes
for every architecture.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

lib/systems/doubles.nix Outdated Show resolved Hide resolved
@Ericson2314
Copy link
Member

I'm fine with rearranging the big lists, but I think all lists below should be calculated not handwritten. This is important to ensure that the predicates and the platforms list stay in sync.

@Ericson2314
Copy link
Member

See also https://github.com/NixOS/nixpkgs/blob/master/lib/tests/systems.nix for the lists which are supposed to stay hand coded.

@alyssais
Copy link
Member Author

I'm fine with rearranging the big lists, but I think all lists below should be calculated not handwritten. This is important to ensure that the predicates and the platforms list stay in sync.

I don't understand what you mean by this. Can you rephrase?

@Ericson2314
Copy link
Member

I mean when we do e.g.

darwin = filterDoubles predicates.isDarwin;

and then in https://github.com/NixOS/nixpkgs/blob/master/lib/tests/systems.nix do

testdarwin = mseteq darwin [ "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" ];

we are testing isDarwin does what we expect, but if we write

darwin = [ "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" ];

here we are no longer testing isDarwin.

@alyssais
Copy link
Member Author

alyssais commented Apr 22, 2021 via email

@Ericson2314
Copy link
Member

That sounds great to me!

The previous mess was partially grouped by OS, and partially grouped
by architecture, which made it very difficult to know where to add new
entries.

I've chosen to group by OS entirely, because OSes are likely to
maintain exhaustive lists of supported architectures, but it's far
less likely we'd be able to find exhaustive lists of supported OSes
for every architecture.
@Ericson2314 Ericson2314 merged commit 9f3459a into NixOS:master Apr 23, 2021
@alyssais alyssais deleted the doubles branch April 23, 2021 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants