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

Don't expand already-contracted lists if they fit on a line #237

Closed
wants to merge 1 commit into from

Conversation

infinisil
Copy link
Member

This fixes annoying previous expansions of e.g.

imports = [
  (mkRenamedOptionModule [ "foo" "bar" ] [ "florp" "baz" ])
];

Simpler alternative to #233

This fixes annoying previous expansions of e.g.

    imports = [
      (mkRenamedOptionModule [ "foo" "bar" ] [ "florp" "baz" ])
    ];
Copy link

github-actions bot commented Aug 20, 2024

Nixpkgs diff

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/formatting-team-meeting-2024-08-20/50885/1

@infinisil
Copy link
Member Author

From the meeting notes: Turns out that always allowing contracted lists also means that e.g. buildInputs don’t get expanded as desired (unless it’s already expanded) which makes the diff harder to read when adding elements in the future

@infinisil infinisil closed this Aug 20, 2024
@infinisil infinisil deleted the less-list-expansion branch August 20, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants