-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Track the dependencies of derivation outputs #4267
Commits on Dec 1, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0e5c22a - Browse repository at this point
Copy the full SHA 0e5c22aView commit details -
Allow fixed-output derivations to depend on (floating) content-addres…
…sed ones Fix an overlook of NixOS#4056
Configuration menu - View commit details
-
Copy full SHA for 403fb3b - Browse repository at this point
Copy the full SHA 403fb3bView commit details -
Add a test ensuring compatibility with an old daemon
This requires adding `nix` to its own closure which is a bit unfortunate, but as it is optional (the test will be disabled if `OUTER_NIX` is unset) it shouldn't be too much of an issue. (Ideally this should go in another derivation so that we can build Nix and run the test independently, but as the tests are running in the same derivation as the build it's a bit complicated to do so).
Configuration menu - View commit details
-
Copy full SHA for c3ad8dd - Browse repository at this point
Copy the full SHA c3ad8ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 47f097d - Browse repository at this point
Copy the full SHA 47f097dView commit details -
Store metadata about drv outputs
For each “known” derivation output, store: - its output id - its output path This comes with a set of needed changes: - New `drv-output-info` module declaring the types needed for describing these mappings - New `Store::registerDrvOutput` method registering all the needed informations about a derivation output (also replaces `LocalStore::linkDeriverToPath`) - new `Store::queryDrvOutputInfo` method to retrieve the informations for a derivations This introcudes some redundancy on the remote-store side between `wopQueryDerivationOutputMap` and `wopQueryDrvOutputInfo`. However we might need to keep both (regardless of backwards compat) because we sometimes need to get some infos for all the outputs of a derivation (where `wopQueryDerivationOutputMap` is handy), but all the stores can't implement it − because listing all the outputs of a derivation isn't really possible for binary caches where the server doesn't allow to list a directory.
Configuration menu - View commit details
-
Copy full SHA for ec67ea8 - Browse repository at this point
Copy the full SHA ec67ea8View commit details -
Make
copyPaths
work with derivation outputsCopying a derivation output is equivalent to copy the output path, except that it will also link the output to the path (with `linkDeriverToPath` on the remote store)
Configuration menu - View commit details
-
Copy full SHA for 21bfece - Browse repository at this point
Copy the full SHA 21bfeceView commit details -
Allow
/nix/store/....drv!out
as a cli inputCommands that accept store paths or installables as input can now take a derivation path with outputs. Like when the input is a nix expr, the derivation will be realised if needed.
Configuration menu - View commit details
-
Copy full SHA for 30eb04a - Browse repository at this point
Copy the full SHA 30eb04aView commit details -
Generalises `StorePathsCommand` to allow manipulating `Buildables` rather than just store paths.
Configuration menu - View commit details
-
Copy full SHA for d2e6cc0 - Browse repository at this point
Copy the full SHA d2e6cc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08fcb23 - Browse repository at this point
Copy the full SHA 08fcb23View commit details -
Add a store method for computing the closure of a drv output
Mostly dummy atm as it just computes the closure of the output path, but might be extended later
Configuration menu - View commit details
-
Copy full SHA for 2607da5 - Browse repository at this point
Copy the full SHA 2607da5View commit details -
Configuration menu - View commit details
-
Copy full SHA for ebfdafa - Browse repository at this point
Copy the full SHA ebfdafaView commit details -
Rework the db schema for derivation outputs
Add a new table for tracking the derivation output mappings. We used to hijack the `DerivationOutputs` table for that, but (despite its name), it isn't a really good fit: - Its entries depend on the drv being a valid path, making it play badly with garbage collection and preventing us to copy a drv output without copying the whole drv closure too; - It dosen't guaranty that the output path exists; By using a different table, we can experiment with a different schema better suited for tracking the output mappings of CA derivations. (incidentally, this also fixes NixOS#4138)
Configuration menu - View commit details
-
Copy full SHA for ca27a6b - Browse repository at this point
Copy the full SHA ca27a6bView commit details -
InstallableStorePath: Don't read the derivation if there's no need
That way we can `nix copy --from` a store that doesn't have the derivation but just its outputs
Configuration menu - View commit details
-
Copy full SHA for 3e2201d - Browse repository at this point
Copy the full SHA 3e2201dView commit details -
Also register the outputs of the non-resolved derivation
That way we don't need to resolve it again to know its output paths. In particular, this means that we don't need to keep its whole build-time closure
Configuration menu - View commit details
-
Copy full SHA for b646c2a - Browse repository at this point
Copy the full SHA b646c2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9d8891 - Browse repository at this point
Copy the full SHA d9d8891View commit details -
Better detect when
buildPaths
would be a no-op`buildPaths` can be called even for stores where it's not defined in case it's bound to be a no-op. The “no-op detection” mechanism was only detecting the case wher `buildPaths` was called on a set of (non-drv) paths that were already present on the store. This commit extends this mechanism to also detect the case where `buildPaths` is called on a set of derivation outputs which are already built on the store.
Configuration menu - View commit details
-
Copy full SHA for e51e5d2 - Browse repository at this point
Copy the full SHA e51e5d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bfcd02 - Browse repository at this point
Copy the full SHA 0bfcd02View commit details -
Configuration menu - View commit details
-
Copy full SHA for dcb8957 - Browse repository at this point
Copy the full SHA dcb8957View commit details -
SubstitutionGoal -> PathSubstitutionGoal
To prepare for the upcoming DrvOutputSubstitutionGoal
Configuration menu - View commit details
-
Copy full SHA for b05ba63 - Browse repository at this point
Copy the full SHA b05ba63View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0dde491 - Browse repository at this point
Copy the full SHA 0dde491View commit details -
Move the CA tests to a sub-directory
Requires a slight update to the test infra to work properly
Configuration menu - View commit details
-
Copy full SHA for 6c9e183 - Browse repository at this point
Copy the full SHA 6c9e183View commit details -
Configuration menu - View commit details
-
Copy full SHA for e10741c - Browse repository at this point
Copy the full SHA e10741cView commit details -
Add a dependencies field to DrvOutputInfo
Currently never used, nor set but will be useful shortly
Configuration menu - View commit details
-
Copy full SHA for 2628e03 - Browse repository at this point
Copy the full SHA 2628e03View commit details -
Configuration menu - View commit details
-
Copy full SHA for d01cd98 - Browse repository at this point
Copy the full SHA d01cd98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 52d0250 - Browse repository at this point
Copy the full SHA 52d0250View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e8f8ae - Browse repository at this point
Copy the full SHA 7e8f8aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 258f6c9 - Browse repository at this point
Copy the full SHA 258f6c9View commit details -
Register the drv outputs in order when copying
We need to topologically sort them like we do for the store paths, otherwise the registration will fail because of an incomplete closure
Configuration menu - View commit details
-
Copy full SHA for a1e7076 - Browse repository at this point
Copy the full SHA a1e7076View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6aef911 - Browse repository at this point
Copy the full SHA 6aef911View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b8e75b - Browse repository at this point
Copy the full SHA 8b8e75bView commit details