Subject: bug#15284: closed (wish: make the (name) field optional)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 16 Apr 2020 21:54:03 +0000

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 [email-masked].

-- 
15284: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15284
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: wish: make the (name) field optional
From: Ricardo Wurmus <[email-masked]>
To: [email-masked]
Date: Thu, 16 Apr 2020 23:53:33 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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

Subject: wish: make the (name) field optional
From: Arne Babenhauserheide <[email-masked]>
To: [email-masked]
Date: Fri, 06 Sep 2013 11:05:26 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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