Make ValidPathInfo, NarInfo JSON instances, but don't yet use in the CLI#14503
Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom Nov 11, 2025
Merged
Conversation
32 tasks
a076bf8 to
94712c1
Compare
|
🎉 All dependencies have been resolved ! |
xokdvium
reviewed
Nov 10, 2025
94712c1 to
8858057
Compare
…the CLI Make instances for them that share code with `nix path-info`, but do a slightly different format without store paths containing store dirs (matching the other latest JSON formats). Progress on NixOS#13570. If we depend on the store dir, our JSON serializers/deserializers take extra arguements, and that interfaces with the likes of various frameworks for associating these with types (e.g. nlohmann in C++, Serde in Rust, and Aeson in Haskell). For now, `nix path-info` still uses the previous format, with store dirs. We may yet decide to "rip of the band-aid", and just switch it over, but that is left as a future PR.
8858057 to
f5390e7
Compare
xokdvium
reviewed
Nov 11, 2025
Comment on lines
+28
to
+29
| nlohmann::json toJSON(const StoreDirConfig * store, bool includeImpureInfo) const override; | ||
| static UnkeyedNarInfo fromJSON(const StoreDirConfig * store, const nlohmann::json & json); |
Contributor
There was a problem hiding this comment.
Could probably use a comment for the special semantics of nullptr. Otherwise sounds good.
xokdvium
approved these changes
Nov 11, 2025
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
Make instances for them that share code with
nix path-info, but do a slightly different format without store paths containing store dirs (matching the other latest JSON formats).Progress on #13570.
If we depend on the store dir, our JSON serializers/deserializers take extra arguements, and that interfaces with the likes of various frameworks for associating these with types (e.g. nlohmann in C++, Serde in Rust, and Aeson in Haskell).
Context
For now,
nix path-infostill uses the previous format, with store dirs. We may yet decide to "rip of the band-aid", and just switch it over, but that is left as a future PR.depends on #14502
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.