Message ID | 20191121150358.21044-2-ludo@gnu.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#38312,1/3] guix build, daemon: Rename "--no-build-hook" to "--no-offload". | expand |
Hi Ludovic! Perhaps we should print a message to the user for better user visibility when this case gets triggered? Cheers, Carl Dong > On Nov 21, 2019, at 10:03 AM, Ludovic Courtès <ludo@gnu.org> wrote: > > > * guix/scripts/build.scm (set-build-options-from-command-line): Pass > #:offload? #f when 'keep-failed? is true. > * doc/guix.texi (Common Build Options): Document it. > --- > doc/guix.texi | 6 +++--- > guix/scripts/build.scm | 3 ++- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index b1c615235b..e57c12ab7f 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -8048,9 +8048,9 @@ the end of the build log. This is useful when debugging build issues. > @xref{Debugging Build Failures}, for tips and tricks on how to debug > build issues. > > -This option has no effect when connecting to a remote daemon with a > -@code{guix://} URI (@pxref{The Store, the @code{GUIX_DAEMON_SOCKET} > -variable}). > +This option implies @option{--no-offload}, and it has no effect when > +connecting to a remote daemon with a @code{guix://} URI (@pxref{The > +Store, the @code{GUIX_DAEMON_SOCKET} variable}). > > @item --keep-going > @itemx -k > diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm > index acb495a462..a853ac6c7d 100644 > --- a/guix/scripts/build.scm > +++ b/guix/scripts/build.scm > @@ -545,7 +545,8 @@ talking to a remote daemon\n"))) > #:fallback? (assoc-ref opts 'fallback?) > #:use-substitutes? (assoc-ref opts 'substitutes?) > #:substitute-urls (assoc-ref opts 'substitute-urls) > - #:offload? (assoc-ref opts 'offload?) > + #:offload? (and (assoc-ref opts 'offload?) > + (not (assoc-ref opts 'keep-failed?))) > #:max-silent-time (assoc-ref opts 'max-silent-time) > #:timeout (assoc-ref opts 'timeout) > #:print-build-trace (assoc-ref opts 'print-build-trace?) > -- > 2.24.0 > > > >
Hi Carl,
Carl Dong <contact@carldong.me> skribis:
> Perhaps we should print a message to the user for better user visibility when this case gets triggered?
Yeah, I wondered: it seemed to me that people using -K would always use
it together with --no-build-hook, so it should come as no surprise.
Also, since offloading is the default, the warning would always be
printed when using -K, which is not so great.
Thoughts?
Ludo’.
Hello, I went ahead and pushed these patches: 2ce08a5d79 guix build: '--keep-failed' implies '--no-offload'. 7f44ab48f9 Use 'offload?' instead of 'build-hook?' internally. dc209d5a5d guix build, daemon: Rename "--no-build-hook" to "--no-offload". Let me know if you can think of ways we can make the --no-offload effect more visible. Thanks, Ludo’.
diff --git a/doc/guix.texi b/doc/guix.texi index b1c615235b..e57c12ab7f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8048,9 +8048,9 @@ the end of the build log. This is useful when debugging build issues. @xref{Debugging Build Failures}, for tips and tricks on how to debug build issues. -This option has no effect when connecting to a remote daemon with a -@code{guix://} URI (@pxref{The Store, the @code{GUIX_DAEMON_SOCKET} -variable}). +This option implies @option{--no-offload}, and it has no effect when +connecting to a remote daemon with a @code{guix://} URI (@pxref{The +Store, the @code{GUIX_DAEMON_SOCKET} variable}). @item --keep-going @itemx -k diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index acb495a462..a853ac6c7d 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -545,7 +545,8 @@ talking to a remote daemon\n"))) #:fallback? (assoc-ref opts 'fallback?) #:use-substitutes? (assoc-ref opts 'substitutes?) #:substitute-urls (assoc-ref opts 'substitute-urls) - #:offload? (assoc-ref opts 'offload?) + #:offload? (and (assoc-ref opts 'offload?) + (not (assoc-ref opts 'keep-failed?))) #:max-silent-time (assoc-ref opts 'max-silent-time) #:timeout (assoc-ref opts 'timeout) #:print-build-trace (assoc-ref opts 'print-build-trace?)