Team info
All meeting notes
Team attendees: @jfly @infinisil @MattSturgeon @piegamesde @sergey @0x4A6F
Other attendees:
Agenda & Notes
- We as the formatting team are unhappy with how events played out in Preserving empty lines before a semicolon is a bit strange · Issue #298 · NixOS/nixfmt · GitHub.
- Part of the problem is that we were sending out mixed signals w.r.t. how to proceed with that issue.
- We are working on improving our internal coordination, as well as communication with the moderation team.
- Going forward, @piegames has opened Re-evaluate policy of preserving empty lines · Issue #308 · NixOS/nixfmt · GitHub to give the discussion a fresh start, while highlighting the various complexities of the issue.
- Discussed treefmt stdin spec (Add a Stdin Specification by jfly · Pull Request #586 · numtide/treefmt · GitHub). @jfly to ping treefmt maintainers.
- Discussed nixfmt-tree: remove `tree-root-file` default by MattSturgeon · Pull Request #407681 · NixOS/nixpkgs · GitHub
- Discussed Unindent concatenation by piegamesde · Pull Request #307 · NixOS/nixfmt · GitHub.
Formatting generally looks good. Found a minor regression that @piegames is working on.-
@jfly to update standard to allow for this: Update standard.md to allow for unindented concatenation · Issue #309 · NixOS/nixfmt · GitHub
-
We’ll apply the “deindent” formatting when the first operand is a literal (aka
"..."
,[...]
, or{...}
) -
In other cases (function application, variables, etc), we will keep the current (indented) formatting.
Concretely, format this input:
programs.ssh.knownHosts2 = someAttrSet // (with expr; someStuff functionArg) // lib.mapAttrs (host_name: publicKey: { inherit publicKey; extraHostNames = [ "${host_name}.m-0.eu" "${host_name}.vpn.m-0.eu" "${host_name}.lo.m-0.eu" ]; }) secret-config.ssh-hosts // { foo = "bar"; };
to:
programs.ssh.knownHosts2 = someAttrSet // (with expr; someStuff functionArg) // lib.mapAttrs (host_name: publicKey: { inherit publicKey; extraHostNames = [ "${host_name}.m-0.eu" "${host_name}.vpn.m-0.eu" "${host_name}.lo.m-0.eu" ]; }) secret-config.ssh-hosts // { foo = "bar"; };
Here’s an example with
lib.optionals
:programs.ssh.knownHosts2 = lib.optionals true [ "a" "b" ] ++ [ "c" "d" ];
Keep this output:
programs.ssh.knownHosts2 = lib.optionals true [ "a" "b" ] ++ [ "c" "d" ];
In the future, we may introduce more nuanced logic for deciding between indented or not. For example consider how “complicated” the function application is.
-