Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of a CAS store #3528

Closed
wants to merge 16 commits into from
Closed

Conversation

thufschmitt
Copy link
Member

New implementation of NixOS/rfcs#62 (replaces the old prototype from #3262)

Currently at a very early stage:

  • Building a cas derivation locally works
  • Derivations can depend (transitively) on CAS derivations and the cutoff will be correctly done when possible
  • Most tests fail, probably just because the output path returned by most commands isn't the right one anymore
  • Nothing is implemented on the remote {building,caching} side

/cc @edolstra @Ericson2314 @layus

@thufschmitt thufschmitt marked this pull request as draft April 23, 2020 05:05
@@ -799,6 +799,9 @@ class DerivationGoal : public Goal
/* Whether this is a fixed-output derivation. */
bool fixedOutput;

/* Whether this is a content adressed derivation */
bool contentAddressed = false;
Copy link
Member

Choose a reason for hiding this comment

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

@regnat Sorry I have not responded to this PR more thoroughly yet.

First thing I wanted to point out is I made #3418 so that we might talk about the various independent-ish aspects of derivations, rather than keeping around multiple bools of which only 1 should be true.

Not implementing anything here, just throwing an error if a derivation
sets `__contentAddressed = true` without
`--experimental-features content-addressed-paths`
(and also with it as there's nothing implemented yet)
Only works for a local store, and we can't depend on them
Things build − and the output paths are correct, but the paths aren't correctly registred yet
It only returns a really valid value for `LocalFSStore`, but we should extend
the store protocol at some point to make it work for any store, so we might
as well put it here right now − esp. given that it simplifies it usage a lot
If a derivation doesn't depend on a CA derivation (and isn't CA itself), then
make sure that its out path isn't changed
Extend the daemon protocol to give add the `queryOutPath` operation
Inline the build of the CA derivation to make things simpler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants