Skip to content

JSON impl and Schema for DummyStore#13942

Merged
Ericson2314 merged 5 commits intomasterfrom
json-no-store-dir
Nov 24, 2025
Merged

JSON impl and Schema for DummyStore#13942
Ericson2314 merged 5 commits intomasterfrom
json-no-store-dir

Conversation

@Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Sep 8, 2025

Motivation

See issue.

Context

This is the "keystone" that puts most of the other store-layer JSON formats together.

Progress on #13570

Depends on #13980
Depends on #14226

I talked to @edolstra about this at NixCon, briefly.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@Ericson2314 Ericson2314 force-pushed the json-no-store-dir branch 2 times, most recently from 3208245 to 2704e1a Compare September 10, 2025 19:48
@Ericson2314
Copy link
Member Author

Ericson2314 commented Sep 10, 2025

I discussed this with @edolstra a bit at the meeting

  1. nix path-info is widely used, needs proper migration/compat story, even though technically experimental
    • Solution: This PR no longer changes that command at all. I makes a new JSON instance "side by side"
  2. nix derivation is less-often used, can probably just change it (it is experimental new CLI, of course)
    • We agreed just to do this. It was done in an earlier PR.
  3. Coordinate hash format with https://github.com/DeterminateSystems/nix-src/blob/3ccbe8465909bc37e222c8a2c2e047142252a083/src/libutil/hash.cc#L473-L479
    • This one is slightly different, but I think it is better.

@github-actions github-actions bot added new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store fetching Networking with the outside (non-Nix) world, input locking labels Sep 11, 2025
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Sep 11, 2025
Ericson2314 added a commit that referenced this pull request Sep 13, 2025
@dpulls
Copy link

dpulls bot commented Sep 17, 2025

🎉 All dependencies have been resolved !

@github-actions github-actions bot added the c api Nix as a C library with a stable interface label Sep 28, 2025
@Ericson2314 Ericson2314 marked this pull request as ready for review October 1, 2025 20:10
@Ericson2314 Ericson2314 requested a review from edolstra as a code owner October 1, 2025 20:10
@Ericson2314 Ericson2314 force-pushed the json-no-store-dir branch 2 times, most recently from d046757 to aa7033c Compare October 1, 2025 21:10
@dpulls
Copy link

dpulls bot commented Oct 15, 2025

🎉 All dependencies have been resolved !

}
}
},
"store-dir": "/nix/store"
Copy link
Member Author

Choose a reason for hiding this comment

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

Should we but camel case in the JSON guide (and change this)?

Also think this should go with in a config object.

Copy link
Member

Choose a reason for hiding this comment

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

That'd be good

@Ericson2314 Ericson2314 force-pushed the json-no-store-dir branch 2 times, most recently from 892c736 to 8ffc6b5 Compare November 21, 2025 04:38
@Ericson2314 Ericson2314 changed the title JSON impls without store dir JSON impl and Schema for DummyStore Nov 21, 2025
Copy link
Contributor

@Radvendii Radvendii left a comment

Choose a reason for hiding this comment

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

This looks good to me, but I am not very familiar with any of the pieces involved (json serialization/deserialization in C++, this json schema system, the testing framework, etc.) So I'm mostly only able to take things at face value.

@Ericson2314 Ericson2314 force-pushed the json-no-store-dir branch 2 times, most recently from 8e3d652 to fee3266 Compare November 24, 2025 19:17
@Ericson2314 Ericson2314 force-pushed the json-no-store-dir branch 3 times, most recently from 66957e2 to 31f1edf Compare November 24, 2025 20:30
@Mic92 Mic92 enabled auto-merge November 24, 2025 20:41
@Mic92 Mic92 added this pull request to the merge queue Nov 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Nov 24, 2025
Also skip a trailing semicolon inside a macro so the caller can use it
instead, which is generally nicer to the formatter.
Otherwise the equality instance we need to add will be messed up.
Will need it for tests.
This is the "keystone" that puts most of the other store-layer JSON
formats together.

Also, add some documentation for JSON testing.
@Ericson2314 Ericson2314 added this pull request to the merge queue Nov 24, 2025
Merged via the queue into master with commit 4f4da90 Nov 24, 2025
20 checks passed
@Ericson2314 Ericson2314 deleted the json-no-store-dir branch November 24, 2025 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface documentation fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store 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.

4 participants