Age | Commit message (Collapse) | Author |
|
This is good in general, but in particular ensures when we heavily
refactor it in the next commit there is less likelihood for an
unintentional change in behavior to sneak in.
|
|
Fix ControlMaster behaviour
|
|
These items are not templates, and they declared in
`worker-protocol.hh`; therefore they should live in a
`worker-protocol.cc`.
Anything else needlessly diverges from convention. After all, it is not
like this code is only used in `remote-store.cc`; it is also used in
`daemon.cc`. There is no good reason to place it with the client
implementation or the server implementation when it used equally by
both.
|
|
|
|
Dedup some markdown -> C++ big literal stuff in build system
|
|
Delete commited build artifacts
|
|
They were improperly added in 8a93b5a55184d9d34effdd94d58429c9ad1a3d14.
They were not `.gitignore`d because they were stale in that commit --
build artifacts no longer used that name by then and so `.gitignore` was
updated accordingly.
|
|
`inRange` is exclusive not inclusive:
https://github.com/emil-e/rapidcheck/blob/master/doc/generators.md#usage
Furthermore, use `std::variant_size_v` so we use the right number
automatically.
Finally, make the `switch` assert the discriminant is in bounds as
expected.
|
|
This pattern rule was unwisely hidden in `src/libstore/local.mk`. Now it
is properly in `mk/` and we reuse it for the profile docs too.
|
|
Document user files of nix
|
|
|
|
`max-substitution-jobs` setting
|
|
Derivations can output "text-hashed" data
|
|
The `ContentAddressWithReferences` method is made total, with error
handling now squarely the caller's job. This is better.
|
|
|
|
|
|
Thanks!
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
It appears we were checking a variable in the process of definining it.
|
|
Didn't mean to use the private name that shouldn't be exposed.
|
|
|
|
|
|
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
Thanks so much!
Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
|
|
In other words, use a plain `ContentAddress` not
`ContentAddressWithReferences` for `DerivationOutput::CAFixed`.
Supporting fixed output derivations with (fixed) references would be a
cool feature, but it is out of scope at this moment.
|
|
Good to round out the library interface.
|
|
Don't want `nix derivation add` to be a way to sneak by experimental
feature checks!
|
|
|
|
Make "NAR info file is corrupt" messages more informative
|
|
Recently, I encountered the "NAR info file 'xxxx' is corrupt" error
with my binary cache. The message is not helpful in determining, which
kind of corruption happened. The file, fetched with curl, looked
reasonably.
This commit adds more information to the error message, which should
allow debugging and hopefully fixing the problem.
|
|
I suppose we can use `dynamic-derivations` for the few things we neeed.
|
|
|
|
This is an entry point for outside data, so we need to check enabled
experimental features here.
|
|
Experimentally allow forcing `nix-daemon` trust; use this to test
|
|
We finally test the status quo of remote build trust in a number of
ways. We create a new experimental feature on `nix-daemon` to do so.
PR #3921, which improves the situation with trustless remote building,
will build upon these changes. This code / tests was pull out of there
to make this, so everything is easier to review, and in particular we
test before and after so the new behavior in that PR is readily apparent
from the testsuite diff alone.
|
|
Issues:
1. Features gated on disabled experimental settings should warn and be
ignored, not silently succeed.
2. Experimental settings in the same config "batch" (file or env var)
as the enabling of the experimental feature should work.
3. For (2), the order should not matter.
These are analogous to the issues @roberth caught with my changes for
arg handling, but they are instead for config handling.
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
Shuffle `BuildResult` data definition, make state machine clearer, introduce `SingleDrvOutputs`
|
|
|
|
|
|
Introduce `StoreReferences` and `ContentAddressWithReferences`
|
|
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
|
Make `initLibStore` a viable alternative
|
|
Deduplicate string literal rendering, fix 4909
|
|
Fix #8162
The test is changed to compare `nlohmann::json` values, not strings of dumped
JSON, which allows us to format things more nicely.
|
|
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: John Ericson <git@JohnEricson.me>
|
|
In many cases we are dealing with a collection of realisations, they are
all outputs of the same derivation. In that case, we don't need
"derivation hashes modulos" to be part of our map key, because the
output names alone will be unique. Those hashes are still part of the
realisation proper, so we aren't loosing any information, we're just
"normalizing our schema" by narrowing the "primary key".
Besides making our data model a bit "tighter" this allows us to avoid a
double `for` loop in `DerivationGoal::waiteeDone`. The inner `for` loop
was previously just to select the output we cared about without knowing
its hash. Now we can just select the output by name directly.
Note that neither protocol is changed as part of this: we are still
transferring `DrvOutputs` over the wire for `BuildResult`s. I would only
consider revising this once #6223 is merged, and we can mention protocol
versions inside factored-out serialization logic. Until then it is
better not change anything because it would come a the cost of code
reuse.
|
|
If my memory is correct, @edolstra objected to modifying `wantedOutputs`
upon falling back to doing a build (as we did before), because we should
only modify it in response to new requests --- *actual* wants --- and
not because we are "incidentally" building all the outptus beyond what
may have been requested.
That's a fair point, and the alternative is to replace the boolean soup
with proper enums: Instead of modifying `wantedOuputs` som more, we'll
modify `needsRestart` to indicate we are passed the need.
|