all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Maxime Devos" <maximedevos@telenet.be>,
	"Jérémy Korwin-Zmijowski" <jeremy@korwin-zmijowski.fr>,
	28510@debbugs.gnu.org
Subject: bug#28510: crash: guix build -S foo --with-source=bla
Date: Tue, 20 Sep 2022 11:19:35 +0200	[thread overview]
Message-ID: <87k05y2yjc.fsf@jpoiret.xyz> (raw)
In-Reply-To: <229c1399-ce4b-b942-1bae-deea501f1c48@telenet.be>

Hi everyone,

Maxime Devos <maximedevos@telenet.be> writes:
> Here is a simpler reproducer for that error:
>
> file a.scm:
> (use-modules (gnu packages) (guix packages) (guix gexp))
> (package
>    (inherit (specification->package "hello"))
>    (source (local-file "a.scm")))
>
> guix build -f a.scm --source

The issue is that package-source-derivation in guix/packages.scm doesn't
actually always yield a derivation, since lower-object isn't guaranteed
to do that: here the gexp compiler for local-file only returns a string
denoting the file path of the interned store file.  `guix build` relies
on the (wrong) assumption that everything that it will build will end up
being a derivation in some way or another, so just calls
show-derivation-outputs on that, which then errors as above.

build-derivations, contrary to its name, can also pass simple file names
to build-things, and since the file will already be interned in the
store at that point, it won't need to do anything, and there won't be
any errors there.

The simple fix would be to add another band-aid cond at the
show-derivation-outputs call in build.scm, but it doesn't seem to be
enough in the long term.

What do people think?

-- 
Josselin Poiret




  reply	other threads:[~2022-09-20 10:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 12:09 bug#28510: crash: guix build -S foo --with-source=bla Ricardo Wurmus
2021-02-25  0:34 ` zimoun
2022-09-19 17:38 ` Jérémy Korwin-Zmijowski
2022-09-19 18:44   ` Maxime Devos
2022-09-20  9:19     ` Josselin Poiret via Bug reports for GNU Guix [this message]
2022-09-20 17:25       ` zimoun
2022-09-20 19:42         ` Josselin Poiret via Bug reports for GNU Guix
2022-10-07  8:41           ` jeremy
2022-10-08 13:52             ` zimoun

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k05y2yjc.fsf@jpoiret.xyz \
    --to=bug-guix@gnu.org \
    --cc=28510@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=jeremy@korwin-zmijowski.fr \
    --cc=maximedevos@telenet.be \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.