Skip to content

Conversation

@edolstra
Copy link
Member

Motivation

InputCache is now keyed on Inputs rather than FlakeRefs. This prepares it to be used by fetchTree (in a future PR).

Context


Add 👍 to pull requests you find important.

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

@github-actions github-actions bot added repl The Read Eval Print Loop, "nix repl" command and debugger fetching Networking with the outside (non-Nix) world, input locking c api Nix as a C library with a stable interface labels Apr 10, 2025
@Mic92 Mic92 requested a review from Ericson2314 April 12, 2025 08:15
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

I am very happy to see functionality move from libflakes to libfetchers like this, but I don't want there to be a new global variable. Because there is no global fetchers::Settings in libfetchers, I don't think it is even correct to have such a global variable.

If the purpose of this is fetchTree then I think it is better to have one of these two alternatives:

  1. EvalState owns a fetchers::InputCache. Separate EvalStates maintain their own cache.
  2. EvalState has a references to a fetchers::InputCache, and libcmd has a global variable, just like it has global variables for fetch::Settings and EvalSettings (see src/libcmd/common-eval-args.cc). getEvalState hooks up everything properly.

@edolstra
Copy link
Member Author

@Ericson2314 Okay, the InputCache is now owned by EvalState.

@edolstra edolstra requested a review from Ericson2314 April 14, 2025 12:30
@Ericson2314
Copy link
Member

Thank you!!

@Mic92 Mic92 dismissed Ericson2314’s stale review April 15, 2025 11:31

Believe this has been addressed?

@Mic92 Mic92 merged commit 22c928f into NixOS:master Apr 15, 2025
12 checks passed
@cole-h cole-h deleted the input-cache branch April 15, 2025 14:44
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 fetching Networking with the outside (non-Nix) world, input locking repl The Read Eval Print Loop, "nix repl" command and debugger

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants