Skip to content

Comments

Introduce --json-format for nix path-info#14704

Merged
Ericson2314 merged 1 commit intomasterfrom
version-output
Dec 4, 2025
Merged

Introduce --json-format for nix path-info#14704
Ericson2314 merged 1 commit intomasterfrom
version-output

Conversation

@Ericson2314
Copy link
Member

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 N with --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.

@Ericson2314 Ericson2314 requested a review from edolstra as a code owner December 3, 2025 23:34
@github-actions github-actions bot added documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority labels Dec 3, 2025
@Ericson2314 Ericson2314 force-pushed the version-output branch 6 times, most recently from 480ca3f to 1450ceb Compare December 4, 2025 00:27
@Ericson2314 Ericson2314 force-pushed the version-output branch 2 times, most recently from 12cb460 to 28d2f15 Compare December 4, 2025 01:04
Comment on lines 80 to 82
/* Hack in the store dir for now. TODO update the data type
instead. */
jsonObject["storeDir"] = store.storeDir;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only shown with --closure-size?

@Ericson2314 Ericson2314 force-pushed the version-output branch 2 times, most recently from 347e054 to 9928ce1 Compare December 4, 2025 01:39
Copy link
Contributor

@xokdvium xokdvium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine as discussed on the call

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.
@Ericson2314 Ericson2314 disabled auto-merge December 4, 2025 03:08
@Ericson2314 Ericson2314 enabled auto-merge December 4, 2025 03:08
@Ericson2314 Ericson2314 added this pull request to the merge queue Dec 4, 2025
Merged via the queue into master with commit 9246dca Dec 4, 2025
20 checks passed
@Ericson2314 Ericson2314 deleted the version-output branch December 4, 2025 04:30
@edolstra edolstra mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants