nix path-info --json output schema divergence from Nix #1100
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Lix outputs a JSON array when running
nix path-info --json. Upstream Nix (since approximately version 2.14) outputs a JSON object/dictionary keyed by the store path.This schema mismatch breaks compatibility with external tooling and scripts written for modern Nix versions that expect
Dict<StorePath, DerivationInfo>.Steps To Reproduce
Install Lix.
Run a command like
nix path-info --json nixpkgs#coreutils.Observe the output structure:
Compare with upstream Nix output:
Expected behavior
Lix should output a JSON object keyed by the store path to match upstream behavior. The output should be
Dict<str, DerivationInfo>, notArray<DerivationInfo>.nix --versionoutputnix (Nix) 2.31.2+2
Additional context
This divergence stems from missing upstream commit cc46ea163024254d0b74646e1b38b19896d40040, which changed the output format. Lix appears to have dropped or missed this change, causing the API to drift for the last three years.
this is intentional. we never cherry-picked this change because it changed the output in a backwards-incompatible way that broke many CI systems, and we will not be changing the schema again before we have a way to request a specific, known version of the output (cf #901)