diff mbox series

[bug#71707,v3,1/2] build-sysem/mix: Preserve code paths.

Message ID 1ca3f415ea8c19b105152099ea4265246ffab95b.1719054612.git.igor@goryachev.org
State New
Headers show
Series Fix tests for elixir dependents | expand

Commit Message

Igor Goryachev June 22, 2024, 11:10 a.m. UTC
* guix/build/mix-build-system.scm (build): Preserve code paths.

Change-Id: Ia43e79385a536de98ae026893e1bda2a8416562c
---
 guix/build/mix-build-system.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/guix/build/mix-build-system.scm b/guix/build/mix-build-system.scm
index fe2e36d184..0b021da791 100644
--- a/guix/build/mix-build-system.scm
+++ b/guix/build/mix-build-system.scm
@@ -1,5 +1,6 @@ 
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Pierre-Henry Fröhring <contact@phfrohring.com>
+;;; Copyright © 2024 Igor Goryachev <igor@goryachev.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -102,13 +103,17 @@  (define* (build #:key mix-environments #:allow-other-keys)
   "Builds the Mix project."
   (for-each (lambda (mix-env)
               (setenv "MIX_ENV" mix-env)
-              (invoke "mix" "compile" "--no-deps-check"))
+              (invoke "mix" "compile" "--no-deps-check"
+                      "--no-prune-code-paths"))
             mix-environments))
 
 (define* (check #:key (tests? #t) #:allow-other-keys)
   "Test the Mix project."
   (if tests?
-      (invoke "mix" "test" "--no-deps-check")
+      (begin
+        (setenv "MIX_ENV" "test")
+        (invoke "mix" "do" "compile" "--no-deps-check" "--no-prune-code-paths" "+"
+                "test" "--no-deps-check"))
       (format #t "tests? = ~a~%" tests?)))
 
 (define* (remove-mix-dirs . _)