diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-08-07 14:46:00 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-08-07 14:47:23 +0200 |
commit | 3c75ddc16b054a7dabf0710ee0a4323b4371effd (patch) | |
tree | b9d6aab5b9ab668a71e9161d33457039db927ec1 /src/libexpr/eval-cache.hh | |
parent | 2ffc0589507de63bea5555ba993ac195154b4517 (diff) |
nix build (and others): Force re-evaluation of cached errors
Fixes #3872.
This is a bit hacky. Ideally we would automatically re-evaluate the
failed attribute iff we need to print the error message (so in
commands like 'nix search' we wouldn't re-evaluate because we're
suppressing errors).
Diffstat (limited to 'src/libexpr/eval-cache.hh')
-rw-r--r-- | src/libexpr/eval-cache.hh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libexpr/eval-cache.hh b/src/libexpr/eval-cache.hh index afee85fa9..8ffffc0ed 100644 --- a/src/libexpr/eval-cache.hh +++ b/src/libexpr/eval-cache.hh @@ -9,6 +9,8 @@ namespace nix::eval_cache { +MakeError(CachedEvalError, EvalError); + class AttrDb; class AttrCursor; @@ -92,11 +94,11 @@ public: std::string getAttrPathStr(Symbol name) const; - std::shared_ptr<AttrCursor> maybeGetAttr(Symbol name); + std::shared_ptr<AttrCursor> maybeGetAttr(Symbol name, bool forceErrors = false); std::shared_ptr<AttrCursor> maybeGetAttr(std::string_view name); - std::shared_ptr<AttrCursor> getAttr(Symbol name); + std::shared_ptr<AttrCursor> getAttr(Symbol name, bool forceErrors = false); std::shared_ptr<AttrCursor> getAttr(std::string_view name); |