nix-super/src/libcmd
Maximilian Bosch 6905291daf
libcmd/installables: force re-evaluation of cached failures
I think that it's not very helpful to get "cached failures" in a wrong
`flake.nix`. This can be very confusing when debugging a Nix expression.
See for instance NixOS/nixpkgs#118115.

In fact, the eval cache allows a forced reevaluation which is used for
e.g. `nix eval`.

This change makes sure that this is the case for `nix build` as well. So
rather than

    λ ma27 [~/Projects/exp] → ../nix/outputs/out/bin/nix build -L --rebuild --experimental-features 'nix-command flakes'
    error: cached failure of attribute 'defaultPackage.x86_64-linux'

the evaluation of already-evaluated (and failed) attributes looks like
this now:

    λ ma27 [~/Projects/exp] → ../nix/outputs/out/bin/nix build -L --rebuild --experimental-features 'nix-command flakes'
    error: attribute 'hell' missing

           at /nix/store/mrnvi9ss8zn5wj6gpn4bcd68vbh42mfh-source/flake.nix:6:35:

                5|
                6|     packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hell;
                 |                                   ^
                7|
    (use '--show-trace' to show detailed location information)
2021-04-19 19:51:04 +02:00
..
command.cc Make DerivedPathWithHints a newtype 2021-04-05 10:05:21 -04:00
command.hh Rename Buildable 2021-04-05 09:52:25 -04:00
installables.cc libcmd/installables: force re-evaluation of cached failures 2021-04-19 19:51:04 +02:00
installables.hh buildable.{cc,hh} -> derived-path.{cc,hh} 2021-04-05 10:33:28 -04:00
legacy.cc Move command plugin interface to libnixcmd 2021-01-26 06:22:24 -05:00
legacy.hh Move command plugin interface to libnixcmd 2021-01-26 06:22:24 -05:00
local.mk Move command plugin interface to libnixcmd 2021-01-26 06:22:24 -05:00
markdown.cc libcmd/markdown: handle allocation errors in lowdown_term_rndr 2021-02-06 13:14:57 +01:00
markdown.hh Move command plugin interface to libnixcmd 2021-01-26 06:22:24 -05:00
nix-cmd.pc.in Move command plugin interface to libnixcmd 2021-01-26 06:22:24 -05:00