gexp: 'compiled-modules' disables deprecation warnings by default.
This avoids repeated deprecation messages, particularly while running 'guix system build' or similar. * guix/gexp.scm (gexp->derivation): Add #:deprecation-warnings. Pass it to 'compiled-modules'. (compiled-modules): Add #:deprecation-warnings and honor it. * doc/guix.texi (G-Expressions): Update 'gexp->derivation' documentation. * guix/packages.scm (patch-and-repack): Pass #:deprecation-warnings #t.
This commit is contained in:
parent
15c2ddc124
commit
a912c723f7
3 changed files with 23 additions and 3 deletions
|
@ -4879,6 +4879,7 @@ information about monads.)
|
||||||
[#:disallowed-references #f] @
|
[#:disallowed-references #f] @
|
||||||
[#:leaked-env-vars #f] @
|
[#:leaked-env-vars #f] @
|
||||||
[#:script-name (string-append @var{name} "-builder")] @
|
[#:script-name (string-append @var{name} "-builder")] @
|
||||||
|
[#:deprecation-warnings #f] @
|
||||||
[#:local-build? #f] [#:substitutable? #t] [#:guile-for-build #f]
|
[#:local-build? #f] [#:substitutable? #t] [#:guile-for-build #f]
|
||||||
Return a derivation @var{name} that runs @var{exp} (a gexp) with
|
Return a derivation @var{name} that runs @var{exp} (a gexp) with
|
||||||
@var{guile-for-build} (a derivation) on @var{system}; @var{exp} is
|
@var{guile-for-build} (a derivation) on @var{system}; @var{exp} is
|
||||||
|
@ -4919,6 +4920,9 @@ refer to. Any reference to another store item will lead to a build error.
|
||||||
Similarly for @var{disallowed-references}, which can list items that must not be
|
Similarly for @var{disallowed-references}, which can list items that must not be
|
||||||
referenced by the outputs.
|
referenced by the outputs.
|
||||||
|
|
||||||
|
@var{deprecation-warnings} determines whether to show deprecation warnings while
|
||||||
|
compiling modules. It can be @code{#f}, @code{#t}, or @code{'detailed}.
|
||||||
|
|
||||||
The other arguments are as for @code{derivation} (@pxref{Derivations}).
|
The other arguments are as for @code{derivation} (@pxref{Derivations}).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
|
|
@ -564,6 +564,7 @@ names and file names suitable for the #:allowed-references argument to
|
||||||
allowed-references disallowed-references
|
allowed-references disallowed-references
|
||||||
leaked-env-vars
|
leaked-env-vars
|
||||||
local-build? (substitutable? #t)
|
local-build? (substitutable? #t)
|
||||||
|
deprecation-warnings
|
||||||
(script-name (string-append name "-builder")))
|
(script-name (string-append name "-builder")))
|
||||||
"Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a
|
"Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a
|
||||||
derivation) on SYSTEM; EXP is stored in a file called SCRIPT-NAME. When
|
derivation) on SYSTEM; EXP is stored in a file called SCRIPT-NAME. When
|
||||||
|
@ -599,6 +600,9 @@ refer to. Any reference to another store item will lead to a build error.
|
||||||
Similarly for DISALLOWED-REFERENCES, which can list items that must not be
|
Similarly for DISALLOWED-REFERENCES, which can list items that must not be
|
||||||
referenced by the outputs.
|
referenced by the outputs.
|
||||||
|
|
||||||
|
DEPRECATION-WARNINGS determines whether to show deprecation warnings while
|
||||||
|
compiling modules. It can be #f, #t, or 'detailed.
|
||||||
|
|
||||||
The other arguments are as for 'derivation'."
|
The other arguments are as for 'derivation'."
|
||||||
(define %modules
|
(define %modules
|
||||||
(delete-duplicates
|
(delete-duplicates
|
||||||
|
@ -648,7 +652,9 @@ The other arguments are as for 'derivation'."
|
||||||
(compiled-modules %modules
|
(compiled-modules %modules
|
||||||
#:system system
|
#:system system
|
||||||
#:module-path module-path
|
#:module-path module-path
|
||||||
#:guile guile-for-build)
|
#:guile guile-for-build
|
||||||
|
#:deprecation-warnings
|
||||||
|
deprecation-warnings)
|
||||||
(return #f)))
|
(return #f)))
|
||||||
(graphs (if references-graphs
|
(graphs (if references-graphs
|
||||||
(lower-reference-graphs references-graphs
|
(lower-reference-graphs references-graphs
|
||||||
|
@ -1023,7 +1029,8 @@ last one is created from the given <scheme-file> object."
|
||||||
#:key (name "module-import-compiled")
|
#:key (name "module-import-compiled")
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
(guile (%guile-for-build))
|
(guile (%guile-for-build))
|
||||||
(module-path %load-path))
|
(module-path %load-path)
|
||||||
|
(deprecation-warnings #f))
|
||||||
"Return a derivation that builds a tree containing the `.go' files
|
"Return a derivation that builds a tree containing the `.go' files
|
||||||
corresponding to MODULES. All the MODULES are built in a context where
|
corresponding to MODULES. All the MODULES are built in a context where
|
||||||
they can refer to each other."
|
they can refer to each other."
|
||||||
|
@ -1073,7 +1080,15 @@ they can refer to each other."
|
||||||
(gexp->derivation name build
|
(gexp->derivation name build
|
||||||
#:system system
|
#:system system
|
||||||
#:guile-for-build guile
|
#:guile-for-build guile
|
||||||
#:local-build? #t)))
|
#:local-build? #t
|
||||||
|
#:env-vars
|
||||||
|
(case deprecation-warnings
|
||||||
|
((#f)
|
||||||
|
'(("GUILE_WARN_DEPRECATED" . "no")))
|
||||||
|
((detailed)
|
||||||
|
'(("GUILE_WARN_DEPRECATED" . "detailed")))
|
||||||
|
(else
|
||||||
|
'())))))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
|
@ -608,6 +608,7 @@ specifies modules in scope when evaluating SNIPPET."
|
||||||
(gexp->derivation name build
|
(gexp->derivation name build
|
||||||
#:graft? #f
|
#:graft? #f
|
||||||
#:system system
|
#:system system
|
||||||
|
#:deprecation-warnings #t ;to avoid a rebuild
|
||||||
#:guile-for-build guile-for-build))))
|
#:guile-for-build guile-for-build))))
|
||||||
|
|
||||||
(define (transitive-inputs inputs)
|
(define (transitive-inputs inputs)
|
||||||
|
|
Reference in a new issue