emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: GNU bug Tracking System
Subject: bug#15284: closed (wish: make the (name) field optional)
Date: Thu, 16 Apr 2020 21:54:02 +0000

Your message dated Thu, 16 Apr 2020 23:53:33 +0200
with message-id <address@hidden>
and subject line wish: make the (name) field optional
has caused the debbugs.gnu.org bug report #15284,
regarding wish: make the (name) field optional
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
15284: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15284
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: wish: make the (name) field optional Date: Fri, 06 Sep 2013 11:05:26 +0200 User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
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



--- End Message ---
--- Begin Message --- Subject: wish: make the (name) field optional Date: Thu, 16 Apr 2020 23:53:33 +0200 User-agent: mu4e 1.2.0; emacs 26.3
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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]