Lix doesn't follow the nix fmt behavior of newer nix versions #637

Closed
opened 2025-01-22 19:24:30 +00:00 by arilotter · 1 comment

Describe the bug

The below issue happens on Lix 2.91.1, but doesn't happen in Nix 2.24.
https://github.com/numtide/treefmt-nix/issues/303
It seems that at some point, Nix changed how cwd is passed to nix fmt, but Lix hasn't pulled those changes in.
My guess is that Nix always sets the cwd of the fmt command to the root of the repo / location of the flake, but Lix keeps the cwd as whatever the cwd was when nix fmt was invoked.

Steps To Reproduce

See https://github.com/arilotter/fmt-tree-bug

Expected behavior

nix fmt behaves the same as new Nix versions with respect to cwd.

nix --version output

nix (Lix, like Nix) 2.91.1

## Describe the bug The below issue happens on Lix 2.91.1, but doesn't happen in Nix 2.24. https://github.com/numtide/treefmt-nix/issues/303 It seems that at some point, Nix changed how `cwd` is passed to `nix fmt`, but Lix hasn't pulled those changes in. My guess is that Nix always sets the cwd of the `fmt` command to the root of the repo / location of the flake, but Lix keeps the cwd as whatever the cwd was when `nix fmt` was invoked. ## Steps To Reproduce See https://github.com/arilotter/fmt-tree-bug ## Expected behavior `nix fmt` behaves the same as new Nix versions with respect to `cwd`. ## `nix --version` output nix (Lix, like Nix) 2.91.1
Owner

This is fixed in 2.92; see the changelog under breaking changes.

This is fixed in 2.92; see the changelog under breaking changes.
jade closed this issue 2025-01-22 20:54:23 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#637
No description provided.