Introduce --json-format for nix path-info#14704
Merged
Ericson2314 merged 1 commit intomasterfrom Dec 4, 2025
Merged
Conversation
xokdvium
reviewed
Dec 3, 2025
xokdvium
reviewed
Dec 3, 2025
xokdvium
reviewed
Dec 3, 2025
xokdvium
reviewed
Dec 3, 2025
480ca3f to
1450ceb
Compare
xokdvium
reviewed
Dec 4, 2025
12cb460 to
28d2f15
Compare
xokdvium
reviewed
Dec 4, 2025
src/nix/path-info.cc
Outdated
Comment on lines
80
to
82
| /* Hack in the store dir for now. TODO update the data type | ||
| instead. */ | ||
| jsonObject["storeDir"] = store.storeDir; |
Contributor
There was a problem hiding this comment.
Only shown with --closure-size?
347e054 to
9928ce1
Compare
xokdvium
approved these changes
Dec 4, 2025
Contributor
xokdvium
left a comment
There was a problem hiding this comment.
Seems fine as discussed on the call
9928ce1 to
834d2e1
Compare
As discussed today at great length in the Nix meeting, we don't want to break the format, but we also don't want to impede the improvement of JSON formats. The solution is to add a new flag for control the output format. Note that prior to the release, we may want to replace `--json --json-format N` with `--json=N`, but this is being left for a separate PR, as we don't yet have `=` support for CLI flags.
834d2e1 to
1ad13a1
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
As discussed today at great length in the Nix meeting, we don't want to break the format, but we also don't want to impede the improvement of JSON formats. The solution is to add a new flag for control the output format.
Context
Note that prior to the release, we may want to replace
--json --json-format Nwith--json=N, but this is being left for a separate PR, as we don't yet have=support for CLI flags.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.