GNU bug report logs -
#15284
wish: make the (name) field optional
Previous Next
To reply to this bug, email your comments to 15284 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#15284
; Package
guix
.
(Fri, 06 Sep 2013 09:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
arne_bab <at> web.de
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Fri, 06 Sep 2013 09:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Guix Hackers,
Currently when defining a package, I have to write the name at least
twice:
(define-public NAME
(name "NAME"))
This gives the flexibility to use different names for the visual
output and the technical name. But for most packages it likely just
adds useless duplication.
So I think the (name) field should be optional, and if it is not
present, the packages technical name should be used automatically.
Best wishes,
Arne
Information forwarded
to
bug-guix <at> gnu.org
:
bug#15284
; Package
guix
.
(Fri, 06 Sep 2013 12:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 15284 <at> debbugs.gnu.org (full text, mbox):
Arne Babenhauserheide <arne_bab <at> web.de> skribis:
> Currently when defining a package, I have to write the name at least
> twice:
>
> (define-public NAME
> (name "NAME"))
>
> This gives the flexibility to use different names for the visual
> output and the technical name. But for most packages it likely just
> adds useless duplication.
>
> So I think the (name) field should be optional, and if it is not
> present, the packages technical name should be used automatically.
As discussed on IRC, the main issue is that package objects exist
whether or not the exist a variable bound to them; and really there can
be any number of variables whose value is a given package object. IOW,
there is no direct connection between the variable name and the package
name.
That said, for cases like the above, we could have:
(define-syntax-rule (define-package package-name fields ...)
(define-public package-name
(package
(name (symbol->string 'package-name))
fields ...)))
However, I prefer treating packages just like any other Scheme object,
and to avoid introducing “magic” with macros like this.
WDYT?
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#15284
; Package
guix
.
(Sat, 07 Sep 2013 21:31:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 15284 <at> debbugs.gnu.org (full text, mbox):
On Fri, Sep 06, 2013 at 02:06:49PM +0200, Ludovic Courtès wrote:
> As discussed on IRC, the main issue is that package objects exist
> whether or not the exist a variable bound to them; and really there can
> be any number of variables whose value is a given package object. IOW,
> there is no direct connection between the variable name and the package
> name.
This is what happens with the python package rewriting I just implemented:
Inputs are rewritten as packages inside a list, and are not associated
to a variable name.
Having a special syntax just for avoiding to write the package name a second
time is not really needed in my opinion.
Andreas
Information forwarded
to
bug-guix <at> gnu.org
:
bug#15284
; Package
guix
.
(Fri, 13 Sep 2013 23:01:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 15284 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Am Freitag, 6. September 2013, 14:06:49 schrieb Ludovic Courtès:
> However, I prefer treating packages just like any other Scheme object,
> and to avoid introducing “magic” with macros like this.
I prefer not having to repeat stuff, and being able to do stuff like this is one of the big advantages of scheme.
But to see whether it actually helps a lot, it would be necessary to know how many packages will be available in multiple versions (so the package name and the variable have to differ).
Best wishes,
Arne
--
Ein Mann wird auf der Straße mit einem Messer bedroht.
Zwei Polizisten sind sofort da und halten ein Transparent davor.
"Illegale Szene. Niemand darf das sehen."
Der Mann wird ausgeraubt, erstochen und verblutet,
denn die Polizisten haben beide Hände voll zu tun.
Willkommen in Deutschland. Zensur ist schön.
( http://draketo.de/stichwort/zensur )
[signature.asc (application/pgp-signature, inline)]
Severity set to 'wishlist' from 'normal'
Request was from
ludo <at> gnu.org (Ludovic Courtès)
to
control <at> debbugs.gnu.org
.
(Mon, 23 Sep 2013 16:00:03 GMT)
Full text and
rfc822 format available.
Reply sent
to
Ricardo Wurmus <rekado <at> elephly.net>
:
You have taken responsibility.
(Thu, 16 Apr 2020 21:54:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
arne_bab <at> web.de
:
bug acknowledged by developer.
(Thu, 16 Apr 2020 21:54:03 GMT)
Full text and
rfc822 format available.
Message #21 received at 15284-done <at> debbugs.gnu.org (full text, mbox):
I agree with Ludo and Andreas that we better shouldn’t make the
name field optional.
That said, I just pushed a series of patches that happens to address
this wishlist item in a very roundabout way. It is now possible to
build packages from JSON files like this:
--8<---------------cut here---------------start------------->8---
[
{
"name": "myhello",
"version": "2.10",
"source": "mirror://gnu/hello/hello-2.10.tar.gz",
"build-system": "gnu",
"arguments": {
"tests?": false
}
"home-page": "https://www.gnu.org/software/hello/",
"synopsis": "Hello, GNU world: An example GNU package",
"description": "GNU Hello prints a greeting.",
"license": "GPL-3.0+",
"native-inputs": ["gettext"]
},
{
"name": "greeter",
"version": "1.0",
"source": "https://example.com/greeter-1.0.tar.gz",
"build-system": "gnu",
"arguments": {
"test-target": "foo",
"parallel-build?": false,
},
"home-page": "https://example.com/",
"synopsis": "Greeter using GNU Hello",
"description": "This is a wrapper around GNU Hello.",
"license": "GPL-3.0+",
"inputs": ["myhello", "hello"]
}
]
--8<---------------cut here---------------end--------------->8---
As you can see, there is no variable assignment, because this is JSON.
The “name” field is the only identifier, and its value can be used as an
input in other packages (see the reference to “myhello” in the “greeter”
package definition).
It’s really only tangentially related to what this issue is about, but
it’s as close as we can get to duplication-free syntax — even though
it’s JSON and not Scheme. Look, there are also no labels for inputs!
Because there are no custom phases either…
--
Ricardo
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 15 May 2020 11:24:07 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Tobias Geerinckx-Rice <me <at> tobias.gr>
to
control <at> debbugs.gnu.org
.
(Sat, 04 Sep 2021 10:18:02 GMT)
Full text and
rfc822 format available.
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 04 Sep 2021 10:18:02 GMT)
Full text and
rfc822 format available.
Merged 15284 50349.
Request was from
Tobias Geerinckx-Rice <me <at> tobias.gr>
to
control <at> debbugs.gnu.org
.
(Sat, 04 Sep 2021 10:21:01 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 280 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.