From: Simon Tournier <zimon.toutoune@gmail.com>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 68946@debbugs.gnu.org, "Mathieu Othacehe" <othacehe@gnu.org>,
"Ludovic Courtès" <ludo@gnu.org>,
"Tobias Geerinckx-Rice" <me@tobias.gr>,
"Josselin Poiret" <dev@jpoiret.xyz>,
"Ricardo Wurmus" <rekado@elephly.net>,
"Christopher Baines" <guix@cbaines.net>
Subject: [bug#68946] [PATCH v2] guix: Add logging module.
Date: Mon, 19 Feb 2024 16:57:28 +0100 [thread overview]
Message-ID: <874je45tw7.fsf@gmail.com> (raw)
In-Reply-To: <87le7ktenv.fsf@gmail.com>
Hi Maxim,
On ven., 16 févr. 2024 at 14:03, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
> Most of that code also exists in guile-hall, was released in 2023, hence
> the copyright year start [0].
I think it would be best something like:
--8<---------------cut here---------------start------------->8---
;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; The procedures ’define-log-level', ’setup-logging’ and
;;; ’shutdown-logging’ are taken from the 'hall/logging.scm' file of
;;; Guile-lib (guile-hall). That file has the following copyright
;;; notice:
;;;
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of Guix.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
…
--8<---------------cut here---------------end--------------->8---
> [0] https://gitlab.com/a-sassmannshausen/guile-hall/-/blob/master/hall/logging.scm
>
>>> +(define-syntax define-log-level
>>> + ;; This macro defines a log-level enum type bound to ENUM-NAME for the
>>> + ;; provided levels. The levels should be specified in increasing order of
>>> + ;; severity. It also defines 'log-LEVEL' syntax to more conveniently log at
>>> + ;; LEVEL, with location information.
>>
>> Why not also a docstring?
>
> Only procedures can have docstrings, unfortunately.
Ah? For instance ’define-with-syntax-properties’ or ’define-diagnostic’
or ’leave’ from (guix diagnostics); other instance in (gnu build
accounts) or (gnu build secret-service) etc.
Do I miss something?
>> This make “--log-level debug” valid, right?
>>
>> I think the convention is --long-option[=PARAMETER] and that
>> --long-option PARAMTER is unconventional. Although I do not find the
>> reference.
>
> It's not as much a convention as a limitation of the SRFI 37 option
> parser. GNU getopt, which SRFI 37 aims to emulate, doesn't have such a
> limitation, for example. We should improve SRFI 37 to lift such
> limitation, in my opinion.
I think that’s a bad choice. For two reasons,
1. Let’s keep an uniform across subcommands
2. It potentially opens bug as #50472; no space avoids ambiguous
implementations as explained. :-)
https://issues.guix.gnu.org/issue/50472
Cheers,
simon]
next prev parent reply other threads:[~2024-02-19 20:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 4:12 [bug#68946] [RFC PATCH 0/1] Add logging capability to Guix Maxim Cournoyer
2024-02-06 4:12 ` [bug#68946] [RFC PATCH 1/1] guix: Add logging module Maxim Cournoyer
2024-02-11 4:43 ` [bug#68946] [PATCH v2] " Maxim Cournoyer
2024-02-14 14:47 ` Simon Tournier
2024-02-16 19:03 ` Maxim Cournoyer
2024-02-19 15:57 ` Simon Tournier [this message]
2024-02-18 22:17 ` Ludovic Courtès
2024-02-23 1:13 ` Maxim Cournoyer
2024-02-24 11:44 ` Ludovic Courtès
2024-02-25 14:32 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874je45tw7.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=68946@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=guix@cbaines.net \
--cc=ludo@gnu.org \
--cc=maxim.cournoyer@gmail.com \
--cc=me@tobias.gr \
--cc=othacehe@gnu.org \
--cc=rekado@elephly.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.