GNU bug report logs - #36079
Source location information missing from identifiers

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: Robert Vollmert <rob@HIDDEN>; dated Mon, 3 Jun 2019 20:43:02 UTC; Maintainer for guile is bug-guile@HIDDEN.
Changed bug title to 'Source location information missing from identifiers' from 'unhelpful error message' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 36079 <at> debbugs.gnu.org:


Received: (at 36079) by debbugs.gnu.org; 11 Jun 2019 00:32:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 10 20:32:17 2019
Received: from localhost ([127.0.0.1]:57696 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1haUi1-00043e-2n
	for submit <at> debbugs.gnu.org; Mon, 10 Jun 2019 20:32:17 -0400
Received: from world.peace.net ([64.112.178.59]:58846)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mhw@HIDDEN>) id 1haUhw-00043P-Pt
 for 36079 <at> debbugs.gnu.org; Mon, 10 Jun 2019 20:32:13 -0400
Received: from mhw by world.peace.net with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89)
 (envelope-from <mhw@HIDDEN>)
 id 1haUhq-0007Ky-CH; Mon, 10 Jun 2019 20:32:06 -0400
From: Mark H Weaver <mhw@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>
Subject: Re: bug#36079: unhelpful error message
References: <B29B30DE-0065-417C-8FBF-EFBB04F4531D@HIDDEN>
 <87ftoicygp.fsf@HIDDEN>
Date: Mon, 10 Jun 2019 20:29:48 -0400
In-Reply-To: <87ftoicygp.fsf@HIDDEN> (Ricardo Wurmus's message of "Sun,
 09 Jun 2019 22:09:42 +0200")
Message-ID: <87k1dt7ylk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36079
Cc: 36079 <at> debbugs.gnu.org, Robert Vollmert <rob@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ricardo and Robert,

Ricardo Wurmus <rekado@HIDDEN> writes:

>> Working on Guix, I encountered the following:
>>
>> Within a guix checkout, I edited gnu/packages/haskell.scm, accidentally
>> making a Haskell comment:
>>
>>     (arguments
>>      `(#:tests? #f)) -- sporadic failure: https://github.com/fpco/stream=
ing-commons/issues/49
>>
>> Then I tried to keep working on my in-development package, and was able =
to trace
>> the `guix build` error back to the following:
>>
>> $ ./pre-inst-env guild compile ../modules/postgrest.scm
>> ;;; note: source file /home/rob/guix/gnu/packages/haskell.scm
>> ;;;       newer than compiled /home/rob/guix/gnu/packages/haskell.go
>> ;;; note: source file /home/rob/guix/gnu/packages/haskell.scm
>> ;;;       newer than compiled /run/current-system/profile/lib/guile/2.2/=
site-ccache/gnu/packages/haskell.go
>> ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
>> Syntax error:
>> unknown location: package: invalid field specifier in form =E2=80=94-
>
> This error is produced by the =E2=80=9Cpackage=E2=80=9D macro, which is o=
f this form:
>
>   (package
>    (field value)
>    (another-field its-value)
>    =E2=80=A6)
>
> The macro has a number of valid field names and it tries to do some
> simple validation.  That=E2=80=99s where the error comes from.  When =E2=
=80=9C--=E2=80=9D is
> encountered it is in the position of a field, so the macro tries to be
> helpful and reports that =E2=80=9C--=E2=80=9D is not a valid way to speci=
fy a field.
>
> This error message is not produced by Guile.

Well, yes and no.  It is true that code in Guix is calling
'syntax-violation' to report the error.  However, it is also true that
Guix passes to 'syntax-violation' the syntax object corresponding to
=E2=80=9C--=E2=80=9D, which ideally should have source location information=
 attached to
it.  If the syntax object in question represented a list or some other
heap-allocated value, it *would* have had source location information
attached, and that would have been included in the error message.

This issue is a longstanding limitation in Guile's source location
tracking.  The problem is that Guile uses Scheme's standard 'read'
procedure to read the source code, which uses plain Scheme symbols to
represent identifiers.  Scheme symbols with the same name are
indistinguishable, i.e. every occurrence of 'x' or '--' is represented
by precisely the same heap object, and therefore there's no way to
attach source information to each occurrence of a symbol.

Fixing this would involve abandoning Scheme's standard 'read' procedure
for reading source code, and instead using a different reader (not yet
written) that uses a different object type to represent identifiers and
immediate values.  Our macro expander would need to be modified to
support this new representation.

I believe this should be done, and I hope to find the energy to do it
some day.

       Mark




Information forwarded to bug-guile@HIDDEN:
bug#36079; Package guile. Full text available.

Message received at 36079 <at> debbugs.gnu.org:


Received: (at 36079) by debbugs.gnu.org; 9 Jun 2019 20:09:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 09 16:09:56 2019
Received: from localhost ([127.0.0.1]:55450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ha48Z-00028p-Jg
	for submit <at> debbugs.gnu.org; Sun, 09 Jun 2019 16:09:55 -0400
Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21382)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1ha48X-00028f-Ma
 for 36079 <at> debbugs.gnu.org; Sun, 09 Jun 2019 16:09:54 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1560110987; cv=none; d=zoho.com; s=zohoarc; 
 b=FhsnrvfOVBD+qeWmNRYSu4o3Sk78sbgb1P/mX2KySpB7jysagYb1HJ5Dr2gihPL3VKKt3Yh1XVqZj2EgfDdqR5JKxw133QWXYsgv2mzHNWOC5N84phGZiHnzKlNVbS4Ijo/RgWJ9YizxANROIiovqVTgkWWHgpiXSuHLsmEfbdc=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc; t=1560110987;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results;
 bh=PHwPx0AyqglbRr8d1z1V+5ZHsqFS+bl/wIxSCNK+QOU=; 
 b=naig+58bSdbux1fgbLX3Ee7vKFz0txt2WrfEqOOag+Aa2anVdNVr/zeugbjIKhGrrOFETYwMk9AHJ1VwCbw32IapEGeYIEGQ7QF8IRUAe2bLupFAv+LP3u5IuhcDCPdfk5WODwQmqKF5DznfA6IImG15of/a2HPPIkGnWr8hfsw=
ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1560110987; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 l=1800; bh=PHwPx0AyqglbRr8d1z1V+5ZHsqFS+bl/wIxSCNK+QOU=;
 b=JO8nxsfihqvvDviqFjwQEdssYyt38xvDWL5bGSrglsvaYmyES0Ty1RYc0o4XewjL
 CH6F5zPcwgjhOBPAv+6Iwhc9r2/pVxAM+68m8HG+UOVJ/xKFxv9wRDBhugNk60zbFiI
 8Su0bTx30b+MZMZIETaMK4yrUF1yW6Lwv47oOCIM=
Received: from localhost (p4FD5AF37.dip0.t-ipconnect.de [79.213.175.55]) by
 mx.zohomail.com with SMTPS id 1560110985318903.1587581793218;
 Sun, 9 Jun 2019 13:09:45 -0700 (PDT)
References: <B29B30DE-0065-417C-8FBF-EFBB04F4531D@HIDDEN>
User-agent: mu4e 1.2.0; emacs 26.2
From: Ricardo Wurmus <rekado@HIDDEN>
To: 36079 <at> debbugs.gnu.org
Subject: Re: bug#36079: unhelpful error message
In-reply-to: <B29B30DE-0065-417C-8FBF-EFBB04F4531D@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Sun, 09 Jun 2019 22:09:42 +0200
Message-ID: <87ftoicygp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36079
Cc: Robert Vollmert <rob@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Hi Robert,

> Working on Guix, I encountered the following:
>
> Within a guix checkout, I edited gnu/packages/haskell.scm, accidentally
> making a Haskell comment:
>
>     (arguments
>      `(#:tests? #f)) -- sporadic failure: https://github.com/fpco/streami=
ng-commons/issues/49
>
> Then I tried to keep working on my in-development package, and was able t=
o trace
> the `guix build` error back to the following:
>
> $ ./pre-inst-env guild compile ../modules/postgrest.scm
> ;;; note: source file /home/rob/guix/gnu/packages/haskell.scm
> ;;;       newer than compiled /home/rob/guix/gnu/packages/haskell.go
> ;;; note: source file /home/rob/guix/gnu/packages/haskell.scm
> ;;;       newer than compiled /run/current-system/profile/lib/guile/2.2/s=
ite-ccache/gnu/packages/haskell.go
> ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
> Syntax error:
> unknown location: package: invalid field specifier in form =E2=80=94-

This error is produced by the =E2=80=9Cpackage=E2=80=9D macro, which is of =
this form:

  (package
   (field value)
   (another-field its-value)
   =E2=80=A6)

The macro has a number of valid field names and it tries to do some
simple validation.  That=E2=80=99s where the error comes from.  When =E2=80=
=9C--=E2=80=9D is
encountered it is in the position of a field, so the macro tries to be
helpful and reports that =E2=80=9C--=E2=80=9D is not a valid way to specify=
 a field.

This error message is not produced by Guile.

> There are number of ways the error output could be improved. Ideally, I=
=E2=80=99d
> like to see the offending line of gnu/packages/haskell.scm pin-pointed,
> and/or the start of the enclosing package definition.

I agree that this would be nice.  Let=E2=80=99s move this to the Guix bug
tracker.

--
Ricardo





Information forwarded to bug-guile@HIDDEN:
bug#36079; Package guile. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Jun 2019 20:42:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 03 16:42:31 2019
Received: from localhost ([127.0.0.1]:43277 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hXtmo-00023l-Vr
	for submit <at> debbugs.gnu.org; Mon, 03 Jun 2019 16:42:31 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46328)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rob@HIDDEN>) id 1hXtmm-00023W-Iq
 for submit <at> debbugs.gnu.org; Mon, 03 Jun 2019 16:42:29 -0400
Received: from lists.gnu.org ([209.51.188.17]:43005)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rob@HIDDEN>) id 1hXtmg-00061v-RO
 for submit <at> debbugs.gnu.org; Mon, 03 Jun 2019 16:42:23 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60704)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rob@HIDDEN>) id 1hXtmf-0004JF-He
 for bug-guile@HIDDEN; Mon, 03 Jun 2019 16:42:22 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52753)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rob@HIDDEN>) id 1hXtmf-0005y5-CN
 for bug-guile@HIDDEN; Mon, 03 Jun 2019 16:42:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42567)
 by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <rob@HIDDEN>) id 1hXtmd-0002ck-I9
 for guile-bugs@HIDDEN; Mon, 03 Jun 2019 16:42:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rob@HIDDEN>) id 1hXtmZ-0005jw-RI
 for guile-bugs@HIDDEN; Mon, 03 Jun 2019 16:42:17 -0400
Received: from mx2.mailbox.org ([80.241.60.215]:28160)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rob@HIDDEN>) id 1hXtmZ-0005Z6-Kf
 for guile-bugs@HIDDEN; Mon, 03 Jun 2019 16:42:15 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:1:0])
 (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
 (No client certificate requested)
 by mx2.mailbox.org (Postfix) with ESMTPS id 92A0EA0154
 for <guile-bugs@HIDDEN>; Mon,  3 Jun 2019 22:42:11 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
Received: from smtp1.mailbox.org ([80.241.60.240])
 by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de
 [80.241.56.117]) (amavisd-new, port 10030)
 with ESMTP id ZS8ebk87xCns for <guile-bugs@HIDDEN>;
 Mon,  3 Jun 2019 22:42:10 +0200 (CEST)
From: Robert Vollmert <rob@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Subject: unhelpful error message
Message-Id: <B29B30DE-0065-417C-8FBF-EFBB04F4531D@HIDDEN>
Date: Mon, 3 Jun 2019 22:42:09 +0200
To: guile-bugs@HIDDEN
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 80.241.60.215
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

Working on Guix, I encountered the following:

Within a guix checkout, I edited gnu/packages/haskell.scm, accidentally
making a Haskell comment:

    (arguments
     `(#:tests? #f)) -- sporadic failure: =
https://github.com/fpco/streaming-commons/issues/49

Then I tried to keep working on my in-development package, and was able =
to trace
the `guix build` error back to the following:

$ ./pre-inst-env guild compile ../modules/postgrest.scm
;;; note: source file /home/rob/guix/gnu/packages/haskell.scm
;;;       newer than compiled /home/rob/guix/gnu/packages/haskell.go
;;; note: source file /home/rob/guix/gnu/packages/haskell.scm
;;;       newer than compiled =
/run/current-system/profile/lib/guile/2.2/site-ccache/gnu/packages/haskell=
.go
ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
Syntax error:
unknown location: package: invalid field specifier in form =E2=80=94-

There are number of ways the error output could be improved. Ideally, =
I=E2=80=99d
like to see the offending line of gnu/packages/haskell.scm pin-pointed,
and/or the start of the enclosing package definition. But if that=E2=80=99=
s maybe
difficult due to macro expansion issues, at least knowing which file =
failed
to compile would be great. gnu/packages/haskell.scm does fail to compile
by itself:

$ guild compile gnu/packages/haskell.scm=20
ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
Syntax error:
unknown location: package: invalid field specifier in form =E2=80=94-


This is on a pretty up to date Guix install.

$ guild --version
guild (GNU Guile) 2.2.4






Acknowledgement sent to Robert Vollmert <rob@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#36079; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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