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

Draft
wants to merge 16 commits into
base: master
from
Draft

Implementation of a CAS store #3528

wants to merge 16 commits into from

Conversation

@regnat
Copy link
Contributor

regnat commented Apr 23, 2020

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

@regnat regnat marked this pull request as draft Apr 23, 2020
@regnat regnat mentioned this pull request Apr 23, 2020
@@ -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;

This comment has been minimized.

Copy link
@Ericson2314

Ericson2314 Apr 30, 2020

Member

@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.

regnat added 16 commits Jun 17, 2020
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
@regnat regnat force-pushed the tweag:simple-cas branch from 2238175 to 28cdbf9 Jun 17, 2020
@regnat regnat mentioned this pull request Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.