mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 22:12:43 +01:00
Make rootFS's showPath() render the paths from the original accessors
This makes paths in error messages behave similar to lazy-trees,
e.g. instead of store paths like
error: attribute 'foobar' missing
at /nix/store/ddzfiipzqlrh3gnprmqbadnsnrxsmc9i-source/machine/configuration.nix:209:7:
208|
209| pkgs.foobar
| ^
210| ];
you now get
error: attribute 'foobar' missing
at /home/eelco/Misc/eelco-configurations/machine/configuration.nix:209:7:
208|
209| pkgs.foobar
| ^
210| ];
This commit is contained in:
parent
5506428e67
commit
b28bc7ae64
10 changed files with 122 additions and 22 deletions
|
|
@ -262,6 +262,16 @@ public:
|
|||
/** `"unknown"` */
|
||||
Value vStringUnknown;
|
||||
|
||||
using StorePathAccessors = std::map<CanonPath, ref<SourceAccessor>>;
|
||||
|
||||
/**
|
||||
* A map back to the original `SourceAccessor`s used to produce
|
||||
* store paths. We keep track of this to produce error messages
|
||||
* that refer to the original flakerefs.
|
||||
* FIXME: use Sync.
|
||||
*/
|
||||
ref<StorePathAccessors> storePathAccessors;
|
||||
|
||||
/**
|
||||
* The accessor for the root filesystem.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue