nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

Don't expand final list arguments of functions

Open infinisil opened this issue 1 year ago • 4 comments

Applies #233 to last arguments too

Best review commit by commit


This work is sponsored by Antithesis :sparkles:

infinisil avatar Sep 17 '24 20:09 infinisil

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-17/52300/1

nixos-discourse avatar Sep 17 '24 20:09 nixos-discourse

This produces a couple of weird outputs, like

    (mkRenamedOptionModule [
      "services"
      "xserver"
      "displayManager"
      "sddm"
      "enable"
    ] [ "services" "displayManager" "sddm" "enable" ])

Not sure how to easily solve that though

Edit: okay so it turns out the solution is to stop caring about mkRenamedOptionModule and replace it with an alternative API which doesn't require these weird attrpath lists in the first place.

piegamesde avatar Sep 18 '24 09:09 piegamesde

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

https://discourse.nixos.org/t/formatting-team-meeting-2024-10-01/53763/1

nixos-discourse avatar Oct 01 '24 20:10 nixos-discourse

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

https://discourse.nixos.org/t/how-to-use-nixfmt-for-nixpkgs/56590/2

nixos-discourse avatar Nov 25 '24 20:11 nixos-discourse

Superseded by #257

infinisil avatar Nov 26 '24 19:11 infinisil