Description
Nix 2.24 (release announcement post on discourse) added support for experimental pipes (RFC 0148).
I don't believe the exact formatting of code with pipe operator is specified in RFC 0148 or RFC 0166; this issue is about nixfmt not throwing an error when it encounters the pipe operator syntax.
Small example input
Expected output
Actual output
|
1 | 1 |> builtins.add 2
| ^
unexpected '|'
expecting "or", '.', end of input, operator, or term
Steps to reproduce
❯ nix shell "github:NixOS/nixfmt" "github:NixOS/nix?ref=2.24.1"
❯ echo "1 |> builtins.add 2" | nix eval --extra-experimental-features pipe-operators --file -
3
❯ echo "1 |> builtins.add 2" | nixfmt
<stdin>:1:3:
|
1 | 1 |> builtins.add 2
| ^
unexpected '|'
expecting "or", '.', end of input, operator, or term
Description
Nix 2.24 (release announcement post on discourse) added support for experimental pipes (RFC 0148).
I don't believe the exact formatting of code with pipe operator is specified in RFC 0148 or RFC 0166; this issue is about
nixfmtnot throwing an error when it encounters the pipe operator syntax.Small example input
Expected output
Actual output
Steps to reproduce