GNU bug report logs - #74979
[PATCH 0/4] scripts: style: Sort more kinds of package

Previous Next

Package: guix-patches;

Reported by: Herman Rimm <herman <at> rimm.ee>

Date: Thu, 19 Dec 2024 19:33:02 UTC

Severity: normal

Tags: moreinfo, patch

Full log


Message #41 received at 74979 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Herman Rimm <herman <at> rimm.ee>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, 74979 <at> debbugs.gnu.org,
 Christopher Baines <guix <at> cbaines.net>
Subject: Re: [bug#74979] [PATCH v2 1/4] scripts: style: Refactor
 order-packages.
Date: Sun, 09 Feb 2025 17:11:50 +0100
Hi,

With the warnings added in patch #4, ‘tests/guix-style.log’ reads this:

--8<---------------cut here---------------start------------->8---
guix style: not sorting top-level S-exp.: ((operating-system (host-name komputilo) (locale eo_EO.UTF-8) #<<vertical-space> height: 1> #<<comment> str: ";; User accounts.\n" margin?: #f> (users (cons (user-account (name alice) (comment Bob's sister) (group users) #<<vertical-space> height: 1> #<<comment> str: ";; Groups fit on one line.\n" margin?: #f> (supplementary-groups (quote (wheel audio video)))) %base-user-accounts)) #<<vertical-space> height: 1> #<<com
--8<---------------cut here---------------end--------------->8---

(It goes on on several lines.)

This is below our standards and probably hard to use in practice.  I
think a better solution here would be to report the source code
location:

  (info loc (G_ "ignoring s-expression~%"))

The problem is how to get source location information.

I see two options:

  1. (read-enable 'positions) and hope that ‘read-with-comments’
     preserves or augments source location info from ‘read’ using the
     ‘source-properties’ side table.  Not pretty.

  2. Have ‘read-with-comments’ insert zero-length blanks with source
     location info right before top-level definitions, which would allow
     us to get partial source location info.  Not great either, but
     avoids the memory-hungry side table.

Thoughts?

For now I’ve applied everything except patch #4.

Thanks,
Ludo’.




This bug report was last modified 116 days ago.

Previous Next


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