`guix import json` doesn't handle inputs with the form 'package:output'

  • Done
  • quality assurance status badge
Details
5 participants
  • Sarah Morgensen
  • Ludovic Courtès
  • Lulu
  • pkill9
  • zimoun
Owner
unassigned
Submitted by
pkill9
Severity
normal
P
P
pkill9 wrote on 28 Apr 2018 18:28
(name . bug-guix)(address . bug-guix@gnu.org)
E1fCShx-0005ZC-6a@rmmprod05.runbox
For example, if you specify 'glib:bin' as an input, it will add only 'glib' as an input. (It's not recognising a specified output of a package recipe that produces multiple outputs.)
L
L
Ludovic Courtès wrote on 29 Apr 2018 18:18
control message for bug #31302
(address . control@debbugs.gnu.org)
87sh7e56lb.fsf@gnu.org
tags 31302 easy
L
`guix import json` doesn't handle inputs with the form 'package:output'
(name . 31302@debbugs.gnu.org)(address . 31302@debbugs.gnu.org)
1377321000.57094.1602655936420@office.mailbox.org
I just checked this and failed to replicate it. It happily generates config from
`glib:doc', `glib:bin' and `glib:out' in input fields and complains if there's a
nonexistent `glib:foo' input, as of v1.1.0.

--
Lulu
Z
Z
zimoun wrote on 15 Oct 2020 11:57
(name . Lulu)(address . me@erkin.party)(name . 31302@debbugs.gnu.org)(address . 31302@debbugs.gnu.org)
86wnzr24mc.fsf@gmail.com
Hi Lulu,

Thank you for working of this.

On Wed, 14 Oct 2020 at 09:12, Lulu <me@erkin.party> wrote:

Toggle quote (4 lines)
> I just checked this and failed to replicate it. It happily generates
> config from `glib:doc', `glib:bin' and `glib:out' in input fields and
> complains if there's a nonexistent `glib:foo' input, as of v1.1.0.

Could you provide the commit (hash) of the Guix you are using?
Personally, I do “guix describe” and paste then the short hash
(58af4c9). Then it is easier to reproduce or replicate or see if it is
fixed in which version.

Then, could you provide the sequence of commands you used for
“replication“? And the file example you used too. It eases the process
for confirming or not. :-)


Thanks,
simon
L
(name . zimoun)(address . zimon.toutoune@gmail.com)(name . 31302@debbugs.gnu.org)(address . 31302@debbugs.gnu.org)
1141589329.67315.1603645952789@office.mailbox.org
The version hash of Guix I tried this on was `26f6bd0403ed20c1d26eca9d4f28a0da519a56ac'.

I used the example JSON file for the `hello' package provided in
"(guix)Invoking guix import". Then, based on the given example of glib, I tried
running `guix import json' with `glib', `glib:bin', `glib:doc', `glib:out'
separately appended to the `native-inputs' array of `hello.json', in order. It
produced an appropriate SXML structure in the `native-inputs` field each time:
("glib" (@ (gnu packages glib) glib-with-documentation))
for standalone `glib' and
("glib" (@ (gnu packages glib) glib-with-documentation) "bin")
for the rest, which appears to fit the package definition syntax.

When I tried with `glib:foo', where `foo' is an erroneous output, it yielded the
following error:
guix import: error: package `glib@2.62.6' lacks output `foo'.

So, it seems like this bug was fixed somewhere along the line.

--
Lulu
Z
Z
zimoun wrote on 26 Oct 2020 15:16
(name . Lulu)(address . me@erkin.party)(name . 31302@debbugs.gnu.org)(address . 31302@debbugs.gnu.org)
868sbt5ayt.fsf@gmail.com
Dear,

On Sun, 25 Oct 2020 at 20:12, Lulu <me@erkin.party> wrote:

Toggle quote (2 lines)
> So, it seems like this bug was fixed somewhere along the line.

Yep, the bug is fixed. Probably by these:

7cef499bb0 * import/json: json->code: Handle files with more than one definition.
c893432320 * import/json: Use json->code.
16dd764691 * import/json: Add json->scheme-file.


You can close the bug by sending to <31302-done@debbugs.gnu.org> with
the explanations.


Thanks,
simon
S
S
Sarah Morgensen wrote on 13 Sep 2021 04:17
control message for bug #31302
(address . control@debbugs.gnu.org)
E1mPbX8-0006q1-6Q@debbugs.gnu.org
close 31302
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 31302@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 31302
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch