Skip to content

flake.nix: Tidy packages build matrix code#10962

Merged
Ericson2314 merged 1 commit into
NixOS:masterfrom
hercules-ci:tidy-packages-matrix
Jun 26, 2024
Merged

flake.nix: Tidy packages build matrix code#10962
Ericson2314 merged 1 commit into
NixOS:masterfrom
hercules-ci:tidy-packages-matrix

Conversation

@roberth
Copy link
Copy Markdown
Member

@roberth roberth commented Jun 26, 2024

Motivation

Make it easier to read.

flatMapAttrs is easier to read because it introduces the values before using them, kind of like a let bindings with multiple values.

The repeated comments remind the reader of the purpose of the innermost attrsets, which is actually very simple. Knowing that they go right into the result should help a lot with building a mental model for this pattern.

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

flatMapAttrs is easier to read because it introduces the values
before using them, kind of like a `let` bindings with multiple
values.

The repeated comments remind the reader of the purpose of the
innermost attrsets, which is actually very simple.
Knowing that they go right into the result should help a lot
with building a mental model for this pattern.
@roberth roberth requested a review from edolstra as a code owner June 26, 2024 00:07
@Ericson2314 Ericson2314 merged commit a92f307 into NixOS:master Jun 26, 2024
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.

3 participants