unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36371: guix build --with-git-reference=…
@ 2019-06-25  9:24 Tobias Geerinckx-Rice
  2019-06-25 12:38 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-06-25  9:24 UTC (permalink / raw)
  To: 36371

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

Guix,

bricewge on #guix informed me that there's no way to pass a git 
tag as source transformation option.  Indeed:

  ‘--with-commit=PACKAGE=COMMIT’
     This is similar to ‘--with-branch’, except that it builds 
     from
     COMMIT rather than the tip of a branch.  COMMIT must be a 
     valid Git
     commit SHA1 identifier.

is quite different from (guix git-download)'s pleasantly liberal 
notion of commit:

  (git reference
    (url "git://foo.org/fizbo")
    (commit "fizbo-4.5"))      ; tag yay

bricewge suggested that a single ‘--with-git-ref[erence]=’ could 
replace both ‘--with-branch’ and a new ‘--with-tag’, and I agree. 
(Although I prefer the full spelling, of course :-)

Two questions:
- Is this really not supported yet, or am I missing the obvious?
- Why is the (extremely) git-specific ‘--with-commit=’ option not 
  called ‘--with-git-commit=’?  Was it intended to be more generic 
  than it is now?  Should the new option be ‘--with-reference=’ as 
  well?  That's pushing it a little far.  And three questions in 
  one; I'm cheating.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#36371: guix build --with-git-reference=…
  2019-06-25  9:24 bug#36371: guix build --with-git-reference=… Tobias Geerinckx-Rice
@ 2019-06-25 12:38 ` Ludovic Courtès
  2019-07-26 10:38   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2019-06-25 12:38 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 36371

Hi!

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> bricewge on #guix informed me that there's no way to pass a git tag as
> source transformation option.  Indeed:
>
>  ‘--with-commit=PACKAGE=COMMIT’
>     This is similar to ‘--with-branch’, except that it builds   from
>     COMMIT rather than the tip of a branch.  COMMIT must be a   valid
> Git
>     commit SHA1 identifier.

Indeed:

--8<---------------cut here---------------start------------->8---
$ guix build guile-gcrypt --with-commit=guile-gcrypt=v1.0.0
updating checkout of 'https://notabug.org/cwebber/guile-gcrypt.git'...
guix build: error: cannot fetch commit v1.0.0 from https://notabug.org/cwebber/guile-gcrypt.git: unable to parse OID - contains invalid characters
--8<---------------cut here---------------end--------------->8---

Internally, that uses the ‘git-checkout’ record type defined in (guix
git).

What I would propose is to change ‘git-checkout-compiler’ so that it can
determine with a simple heuristic like that of (@@ (guix swh) commit-id?)
whether the string denotes a commit ID or a tag.

WDYT?

> - Why is the (extremely) git-specific ‘--with-commit=’ option not
> called ‘--with-git-commit=’?  Was it intended to be more generic than
> it is now?  Should the new option be ‘--with-reference=’ as well?
> That's pushing it a little far.  And three questions in one; I'm
> cheating.

Things are named this way for simplicity; the only exception is
‘--with-git-url’ because ‘--with-url’ would have been too vague.

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#36371: guix build --with-git-reference=…
  2019-06-25 12:38 ` Ludovic Courtès
@ 2019-07-26 10:38   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2019-07-26 10:38 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 36371-done

Hello!

Ludovic Courtès <ludo@gnu.org> skribis:

> $ guix build guile-gcrypt --with-commit=guile-gcrypt=v1.0.0
> updating checkout of 'https://notabug.org/cwebber/guile-gcrypt.git'...
> guix build: error: cannot fetch commit v1.0.0 from https://notabug.org/cwebber/guile-gcrypt.git: unable to parse OID - contains invalid characters
>
> Internally, that uses the ‘git-checkout’ record type defined in (guix
> git).
>
> What I would propose is to change ‘git-checkout-compiler’ so that it can
> determine with a simple heuristic like that of (@@ (guix swh) commit-id?)
> whether the string denotes a commit ID or a tag.

Done in 177fecb57c0c9e15249bf6a49244c9dc6eb8439c.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-26 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-25  9:24 bug#36371: guix build --with-git-reference=… Tobias Geerinckx-Rice
2019-06-25 12:38 ` Ludovic Courtès
2019-07-26 10:38   ` Ludovic Courtès

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).