grafts: Actually cache grafts during the derivation DAG traversal.

This fixes a regression introduced in
d38bc9a9f6 whereby the cache was
effectively disabled.

Reported by Thomas Danckaert <thomas.danckaert@gmail.com>.

* guix/grafts.scm (with-cache): In the cache miss case, wrap body in
'mbegin'.
This commit is contained in:
Ludovic Courtès 2017-01-16 21:59:00 +01:00
parent b09903619f
commit 90ad5c8836
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 2 deletions

View File

@ -222,8 +222,9 @@ available."
(return result)) (return result))
(#f ;cache miss (#f ;cache miss
(mlet %state-monad ((result (begin exp ...))) (mlet %state-monad ((result (begin exp ...)))
(mbegin %state-monad
(set-current-state (vhash-consq key result cache)) (set-current-state (vhash-consq key result cache))
(return result)))))) (return result)))))))
(define* (cumulative-grafts store drv grafts (define* (cumulative-grafts store drv grafts
references references