Skip to content

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Sep 8, 2025

Motivation

So far this is just declarations

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

Fix #13570

Depends on #13980

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

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
  2. nix derivation is less-often used, can probably just change it (it is experimental new CLI, of course)
  3. Coordinate hash format with https://github.com/DeterminateSystems/nix-src/blob/3ccbe8465909bc37e222c8a2c2e047142252a083/src/libutil/hash.cc#L473-L479

@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
See #13570 for details --- the idea is that included the store dir in
store paths makes systematic JSON parting with e.g. Serde, Aeson,
nlohmann, or similiar harder.

After talking to Eelco, we are changing the `Derivation` format right
away because not only is `nix derivation` technically experimental, we think it is
also less widely used in practice than, say, `nix path-info`.

Progress on #13570
This is more flexible, and needed for me to be able to reshuffle the
inheritance bureaucracy to make the JSON instances more precise.
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).
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).
Copy link

dpulls bot commented Sep 17, 2025

🎉 All dependencies have been resolved !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Store dirs in store paths in JSON
1 participant