mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
packages: 'package-transitive-supported-systems' detects cycles.
With this change, commands such as 'guix build' or 'guix package' report obvious package-level cycles upfront. Derivation-level cycles are not detected. * guix/packages.scm (&package-cyclic-dependency-error): New condition type. (package-transitive-supported-systems): Define 'visited', check it, and parameterize it. * guix/ui.scm (call-with-error-handling): Handle '&package-cyclic-dependency-error'. * tests/packages.scm ("package-transitive-supported-systems detects cycles"): Add test.
This commit is contained in:
parent
35c27ec5ee
commit
e4259d4e9e
3 changed files with 56 additions and 11 deletions
|
@ -722,6 +722,15 @@ evaluating the tests and bodies of CLAUSES."
|
|||
(leave (G_ "~a:~a:~a: package `~a' has an invalid input: ~s~%")
|
||||
file line column
|
||||
(package-full-name package) input)))
|
||||
((package-cyclic-dependency-error? c)
|
||||
(let ((package (package-error-package c)))
|
||||
(leave (package-location package)
|
||||
(G_ "~a: dependency cycle detected:
|
||||
~a~{ -> ~a~}~%")
|
||||
(package-full-name package)
|
||||
(package-full-name package)
|
||||
(map package-full-name
|
||||
(package-error-dependency-cycle c)))))
|
||||
((package-cross-build-system-error? c)
|
||||
(let* ((package (package-error-package c))
|
||||
(loc (package-location package))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue