-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Build loops trying to substitute when output is missing #3964
Comments
So I've wanted to shift the division of labor between subtitution and derivation goals: I think we shoul just have substitution and building goals:
I beleive that would incidentally solve your problem! |
@Ericson2314 that sounds good. So if I understand correctly, after instantiation you'd make substitution goals for all top-level outputs, which will fall back to building as necessary.
If I understand correctly, you mean: building goals don't try to substitute their outputs Is that something you want to implement? |
@roberth Yes I think we're on the same page. I'd love to take a look at implementing it as soon as next week, because it is also good for building derivations that are themselves the outputs of derivations. |
Most probably also the cause for #3534 |
Lines 1204 to 1207 in f156513
Ah slight bummer, with the new plan I would still have to read in derivation in the substitution goal to decide whether to immediately fallback on building rather than trying to substitute. |
Ah, better plan: a 3rd goal type. If we have a "plain goal", where we haven't decided whether substitute or build yet, and again get rid of |
Sounds good! So we'll start with something like |
My idea was to have a single output per realization goal, so we aren't change the "goal of the goal" in flight.
And indeed they are cleared already. Regardless, I took a stab at this yesterday, and it's proved irksome. For example, see I think I'd want to definitely talk more about what we want --- perhaps in real time at the hackathon? --- to try to come up with a design we all pre-agree upon. (And through in the other stuff I mention in #4114 (comment) and the scale of the endeavor just goes up further.) |
(cherry picked from commit ea8d320)
(cherry picked from commit ea8d320)
This reverts commit e90530e. It appears that this backported test relies on new functionality. The error is: + nix copy --to file:///build/nix-test/binary-cache /build/nix-test/store/dckdy2xp7sn8qvyx8axxjq7clnxddri1-multi-output warning: you don't have Internet access; disabling some network-dependent features error: uploading to 'file:///build/nix-test/binary-cache/nar/0hpfhrig9h6fvbjmiwsb7zkaxr19vr2w048y4xb3nrs36bagf92n.nar.xz' is not supported
Describe the bug
Suppose we have a derivation with two outputs,
out
anddoc
, whereout
will referencedoc
.out
is in the cache butdoc
has been removed.out
to be validout
narinfo is fetched.out
depends ondoc
doc
narinfo is fetched; is missingdoc
needs to be built. Build thedrv
drv
may be substitutable, let's fetchout
. go to 2, infinitelySo the false "assumption" seems to be that a path dependency implies a derivation dependency, whereas it could be the same derivation.
Steps To Reproduce
-vvv
is the least verbose level that prints from the loop.Expected behavior
build.cc
determines that not all outputs are substitutable and proceeds to build.(It may still need to build input derivations that by definition of input can not be the same derivation.)
nix-env --version
outputnix-env (Nix) 2.3.6
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: