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 lists within functions #233

Merged
merged 2 commits into from
Sep 7, 2024

Conversation

piegamesde
Copy link
Member

This is just a quick experiment to see where we can go with this.

Copy link

github-actions bot commented Aug 11, 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/satisfaction-survey-from-the-new-rfc-166-formatting/49758/29

@piegamesde piegamesde force-pushed the compact-lists branch 2 times, most recently from 9b11e90 to 24b529e Compare August 17, 2024 07:53
@piegamesde
Copy link
Member Author

The format still looks a bit weird when the last two arguments are lists each. This can happen with partially applied string replacement, or with mkRemovedOptionModule for example. Not sure if it's worth special casing that though

@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

Reviewed in the meeting today:

  • First commit:
    • infinisil: Lists in the last argument should also be contracted
    • pie: Still a net improvement for now, can be more special-cased in the future
    • infinisil: Hopefully doesn't need an extra special case, can be done with a refactor perhaps
  • Second commit (experiment to do the same for sets)
    • infinisil: Not a fan of this, doesn't seem like an improvement
    • pie: Okay let's drop this
  • Third commit (experiment to absorb sets with single inherits)
    • infinisil: Fairly unopinionated on this, seems okay though
  • pie: Will clean it up
  • infinisil: Also mention that part of the code is duplicated in a comment

@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-09-03/51584/1

@infinisil infinisil merged commit d0c0cda into NixOS:master Sep 7, 2024
2 checks passed
@infinisil infinisil deleted the compact-lists branch September 7, 2024 12:10
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.

4 participants