From: "Ludovic Courtès" <ludo@gnu.org>
To: Jesse Gibbons <jgibbons2357@gmail.com>
Cc: 43193@debbugs.gnu.org
Subject: [bug#43193] [PATCH] guix: Add --with-dependency-source option
Date: Thu, 10 Sep 2020 11:43:50 +0200 [thread overview]
Message-ID: <87y2lige5l.fsf@gnu.org> (raw)
In-Reply-To: <9c3a00ba-19bf-a8e9-8803-d150e91f1b6e@gmail.com> (Jesse Gibbons's message of "Thu, 3 Sep 2020 22:30:02 -0600")
Hi Jesse,
Jesse Gibbons <jgibbons2357@gmail.com> skribis:
> The attached patch adds support for the --with-dependency-source
> common build option. It can be used to specify the sources of
> dependencies of specified packages. With this step, we can close
> #42155. This is also a step in closing #43061.
Excellent!
> Note that I suggested making a new
> --with-dependency-source=package=source build option in response to
> #42155 and nobody responded with an objection. So I am sending this
> patch with the assumption that there are no objections to this new
> build option, and that if a member of the community wants to
> completely replace the behavior of --with-source with the behavior of
> the new option, that person can do the work required to not break
> --with-source=source.
OK. Like I wrote at <https://issues.guix.gnu.org/42155#3>, I wouldn’t
mind simply calling this new option ‘--with-source’. What we’d lose by
doing so is the warning you get if you do
‘--with-source=does-not-exist=whatever’, saying the option had no
effect, but that’s about it. The new ‘--with-source’ behavior
(recursive) would be consistent with the other options, which, to me, is
more important.
WDYT?
>>From 91a89277067fd454ad77edb3a09ed06382f3694c Mon Sep 17 00:00:00 2001
> From: Jesse Gibbons <jgibbons2357+guix@gmail.com>
> Date: Thu, 3 Sep 2020 17:45:08 -0600
> Subject: [PATCH v1 1/1] guix: Add --with-dependency-source option
>
> * guix/scripts/build.scm: (transform-package-inputs/source): new
> function
> (evaluate-source-replacement-specs): new function
> (%transformations): add with-dependency-source option
> (%transformation-options): add with-dependency-source-option
> (show-transformation-options-help): document --with-dependency-source
[...]
> +(define (evaluate-source-replacement-specs specs proc)
> + "Parse SPECS, a list of strings like \"guile=/path/to/source\", and return a
> +list of package pairs, where (PROC PACKAGE URL) returns the replacement package.
> +Raise an error if an element of SPECS uses invalid syntax, or if a package it
> +refers to could not be found."
> + (map (lambda (spec)
> + (match (string-tokenize spec %not-equal)
> + ((spec url)
> + (define (replace old)
> + (proc old url))
> + (cons spec replace))
> + (x
> + (leave (G_ "invalid replacement specification: ~s~%") spec))))
^
Add “source” here. It’s always a good idea to not have the exact same
error message in several places. :-)
Could you:
1. adjust doc/guix.texi accordingly? That is, if we rename this new
option to ‘--with-source’, simply add a note stating that it’s
recursive.
2. add a test to tests/guix-build.sh? There are already --with-source
tests in other files. You can mimic them, essentially to make sure
the option has an effect.
3. optionally add an entry as a separate commit to
etc/news.scm. I can do that for you if you want.
Thanks!
Ludo’.
next prev parent reply other threads:[~2020-09-10 9:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 4:30 [bug#43193] [PATCH] guix: Add --with-dependency-source option Jesse Gibbons
2020-09-10 9:43 ` Ludovic Courtès [this message]
2020-09-11 5:16 ` Jesse Gibbons
2020-09-11 15:43 ` Ludovic Courtès
2020-09-11 18:28 ` Jesse Gibbons
2020-09-13 12:55 ` Ludovic Courtès
2020-09-13 14:28 ` Jesse Gibbons
2020-09-26 22:46 ` Jesse Gibbons
2020-10-08 3:43 ` Jesse Gibbons
2020-10-22 15:08 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2lige5l.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=43193@debbugs.gnu.org \
--cc=jgibbons2357@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).