summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-10-09 23:46:13 +0200
committerLudovic Courtès <ludo@gnu.org>2014-10-09 23:51:19 +0200
commit0363991a250177912d4ee6849c1b5ba05fbeaaff (patch)
tree5c2c5b4248cfafac372eae34c1adf78dfde18df4 /tests
parent4938b0eead9b1f34883c166a16c769a5db03edd9 (diff)
downloadguix-0363991a250177912d4ee6849c1b5ba05fbeaaff.tar.gz
Break module cycle involving (guix store) and (guix ui).
Before, there was a cycle along the lines of:

  (guix store) -> (guix nar) -> (guix ui) -> (guix store)

This caused problems, as discussed at:

  http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00109.html

This patch removes cycles in the (guix ...) modules.

* guix/nar.scm (&nar-error, &nar-read-error, dump, write-contents,
  read-contents, %archive-version-1, write-file, restore-file): Move to...
* guix/serialization.scm: ... here.
* guix/store.scm: Remove dependency on (guix nar).
* guix/scripts/hash.scm, guix/scripts/offload.scm,
  guix/scripts/substitute-binary.scm, tests/nar.scm, tests/store.scm,
  tests/substitute-binary.scm: Adjust accordingly.
Diffstat (limited to 'tests')
-rw-r--r--tests/nar.scm1
-rw-r--r--tests/store.scm2
-rw-r--r--tests/substitute-binary.scm2
3 files changed, 3 insertions, 2 deletions
diff --git a/tests/nar.scm b/tests/nar.scm
index 3188599bf1..1641d6f9b2 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -19,6 +19,7 @@
 (define-module (test-nar)
   #:use-module (guix tests)
   #:use-module (guix nar)
+  #:use-module (guix serialization)
   #:use-module (guix store)
   #:use-module ((guix hash)
                 #:select (open-sha256-port open-sha256-input-port))
diff --git a/tests/store.scm b/tests/store.scm
index ba15524be4..88a8877d80 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -24,7 +24,7 @@
   #:use-module (guix base32)
   #:use-module (guix packages)
   #:use-module (guix derivations)
-  #:use-module (guix nar)
+  #:use-module (guix serialization)
   #:use-module (gnu packages)
   #:use-module (gnu packages bootstrap)
   #:use-module (ice-9 match)
diff --git a/tests/substitute-binary.scm b/tests/substitute-binary.scm
index 163cd74593..7c1204c1ab 100644
--- a/tests/substitute-binary.scm
+++ b/tests/substitute-binary.scm
@@ -21,7 +21,7 @@
   #:use-module (guix scripts substitute-binary)
   #:use-module (guix base64)
   #:use-module (guix hash)
-  #:use-module (guix nar)
+  #:use-module (guix serialization)
   #:use-module (guix pk-crypto)
   #:use-module (guix pki)
   #:use-module (guix config)