-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make NixStringContextElem::DrvDeep
opt-in, and maybe deprecate it
#7910
Comments
NixStringContextElem::DrvDeep
opt-in, and maybe deprecate it
We can achieve this goal for 99% without breaking the semantics of anyone's pinned expressions.
If we were not to wait, we might cause trouble for users who do need the old Anyway, the point is that we can leverage Nixpkgs to deliver the improved behavior and cover basically everyone's use of derivations that way. |
That sounds like a good plan to me! |
Listed in the issue now. |
I have a slight variation: we could have an opt-in like (Came up with that when responding to #7087, got this and that confused. Tangent idea over there is relevant to the above.) |
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended.
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended.
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended.
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Finally, we will need (TODO ACTUALLY MAKE!) unit tests catching failures to demonstrate when `builtins.addDrvOutputDependencies` intentionally does *not* work. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> addDrvOutputDependencies: Print outpath in error message
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*.
The new primop is fairly simple. What is far more weird is the test plan. The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*. Also, there is a regular language test testing the `derivation` primop in isolation (again, no breaking change to it!) which has been extended. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*.
The test plan is taken by Robert's comment in NixOS#7910 (comment) describing how we could migrate *Nixpkgs* without a breaking change in Nix. The Nix testsuite has its own `mkDerivation`, and we so we do the same thing with it: - `drvPath` is now overridden to not have the funky `DrvDeep` string context anymore. - Tests that previously needed to `builtins.unsafeDiscardOutputDependency` a `drvPath` no don't. - Tests that previous did *not* need to `builtins.unsafeDiscardOutputDependency` a `drvPath` now *do*.
Currently,
drvPath
attributes have a very weirdDrvDeep
nix string context elem. This string context element makes refer toThe "all the outputs part" is really weird!
builtins.unsafeDiscardOutputDependency
turns this back to a regular string context, but it is unfortunate to have to use an "unsafe" function to get back to the more normal behavior.Instead, it would be nice if
drvPath
had a regularOpaque
string context, and instead there was a primop to do the opposite: turn a string with a single such opaque string context elem to one with a single drv-deep string context elem.See also #7330
TODO
builtins.addDrvOutputDependencies
primopbuiltins.unsafeDiscardOutputDependency
to NixpkgsmkDerivation
'sdrvPath
.The text was updated successfully, but these errors were encountered: