GNU bug report logs - #50349
[PATCH] packages: Add 'define-package' syntax.

Previous Next

Package: guix;

Reported by: Sarah Morgensen <iskarian <at> mgsn.dev>

Date: Fri, 3 Sep 2021 04:07:02 UTC

Severity: wishlist

Tags: patch

Merged with 15284

Full log


View this message in rfc822 format

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 50349 <at> debbugs.gnu.org
Subject: [bug#50349] [PATCH] packages: Add 'define-package' syntax.
Date: Fri, 03 Sep 2021 14:56:36 -0700
Hi,

zimoun <zimon.toutoune <at> gmail.com> writes:

> Hi Sarah,
>
> On Thu, 02 Sep 2021 at 21:06, Sarah Morgensen <iskarian <at> mgsn.dev> wrote:
>
>> (define-package my-favorite-package
>>   (name "my-favorite-package")
>>   ...)
>>
>> The purpose is primarily to save the horizontal indent, but IMO it looks
>> better, and is marginally more clear for newcomers.  I think ideally we could
>> eventually transition to using this syntax as the primary syntax and only use
>> 'define-public' when necessary.
>
> On one hand, I think it is a good idea; especially for newcomers.  On
> the other hand, it will break ’git-blame’, isn’t it?

Yes, there would be a one-time discontinuity.  Reformats like this can
be ignored with the `--ignore-ref' option, or with a file and a config
option:

.git-blame-ignore-revs:
--8<---------------cut here---------------start------------->8---
# Convert 'define-public' forms to 'define-package' forms
15d01b32313f5f2f291b120597719ae92bd26acd
--8<---------------cut here---------------end--------------->8---

.git/config:
--8<---------------cut here---------------start------------->8---
[blame]
        ignoreRevsFile = .git-blame-ignore-revs
--8<---------------cut here---------------end--------------->8---

We could include the latter in e.g. a `.gitconfig' file committed to the
repo, but in order to use config settings from the file, users would
have to first run

  git config --local include.path ../.gitconfig

Thankfully, this only has to be done once per clone.  If you really
wanted to make sure it got run, I suppose you could add it to a 'make'
target.

--
Sarah




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

Previous Next


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