GNU bug report logs - #15284
wish: make the (name) field optional

Previous Next

Package: guix;

Reported by: arne_bab <at> web.de

Date: Fri, 6 Sep 2013 09:07:02 UTC

Severity: wishlist

Tags: patch

Merged with 50349

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: arne_bab <at> web.de
Subject: bug#15284: closed (wish: make the (name) field optional)
Date: Thu, 16 Apr 2020 21:54:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#15284: wish: make the (name) field optional

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 15284 <at> debbugs.gnu.org.

-- 
15284: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15284
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ricardo Wurmus <rekado <at> elephly.net>
To: 15284-done <at> debbugs.gnu.org
Subject: wish: make the (name) field optional
Date: Thu, 16 Apr 2020 23:53:33 +0200
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

[Message part 3 (message/rfc822, inline)]
From: Arne Babenhauserheide <arne_bab <at> web.de>
To: bug-guix <at> gnu.org
Subject: wish: make the (name) field optional
Date: Fri, 06 Sep 2013 11:05:26 +0200
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



This bug report was last modified 3 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.