unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Jean Abou Samra <jean@abou-samra.fr>, guile-devel@gnu.org
Subject: Re: Are source locations broken?
Date: Fri, 25 Mar 2022 21:27:18 +0100	[thread overview]
Message-ID: <3bb93b9b4afae36ef51cbbaa876a558214412fd3.camel@telenet.be> (raw)
In-Reply-To: <1b0c619131ac4c488ec48307db1d53aa542b1540.camel@telenet.be>

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

Maxime Devos schreef op vr 25-03-2022 om 21:22 [+0100]:
Here's a minimal reproducer:

$ cat trtr.scm:
> foo

$ guild compile trtr.scm
> <unknown-location>: warning: possibly unbound variable `foo'
> wrote `$HOME/.cache/guile/ccache/3.0-LE-8-4.6/$HOME/trtr.scm.go'

Curiously, it seems that source locations were actually recorded:

(define-syntax pk-the-source-location
  (lambda (s)
    (pk 'invocation (syntax-source s))
    (syntax-case s ()
      ((_ stuff)
       (pk 'use (syntax-source #'stuff))
       #'stuff))))

(lambda () (pk-the-source-location foo))

;;; [...]
;;; (invocation ((filename . "$HOME/trtr.scm") (line . 8) (column . 11)))

;;; (use ((filename . "$HOME/trtr.scm") (line . 8) (column . 35)))
;;; <unknown-location>: warning: possibly unbound variable `foo'
;;; compiled [...]


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-03-25 20:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 20:11 Are source locations broken? Jean Abou Samra
2022-03-25 20:22 ` Maxime Devos
2022-03-25 20:27   ` Maxime Devos [this message]
2022-05-01 17:04     ` Olivier Dion via Developers list for Guile, the GNU extensibility library
2022-05-01 18:03       ` Jean Abou Samra
2022-05-01 18:27       ` Maxime Devos

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bb93b9b4afae36ef51cbbaa876a558214412fd3.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=guile-devel@gnu.org \
    --cc=jean@abou-samra.fr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).