unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Thomas Morley <thomasmorley65@gmail.com>
To: mhw@netris.org
Cc: guile-user@gnu.org
Subject: Re: What's up with 'current-load-port'
Date: Mon, 5 Nov 2018 09:25:27 +0100	[thread overview]
Message-ID: <CABsfGyV=HRToncAPmMTHvHAfXd9sTQY4-zhQE3r0L9LTdyiZkA@mail.gmail.com> (raw)
In-Reply-To: <87a7momh8c.fsf@netris.org>

Am Mo., 5. Nov. 2018 um 02:43 Uhr schrieb Mark H Weaver <mhw@netris.org>:
>
> Thomas Morley <thomasmorley65@gmail.com> writes:
>
> > what's up with 'current-load-port'?
> >
> > Simply checking in a guile-prompt I get:
> > guile-1.8: #<primitive-procedure current-load-port>
> > guile-2.0.14: #<procedure current-load-port ()>
> > guile-2.2.4 and guile-2.9.1:
> > ;;; <unknown-location>: warning: possibly unbound variable `current-load-port'
> > ERROR: In procedure module-lookup: Unbound variable: current-load-port
> >
> > It's in the manual, though, without any hint it could be deprecated or
> > disabled or the need to use a certain module.
>
> Good catch.  I agree that this was mishandled.
>
> Out of curiosity, what do you use 'current-load-port' for?
>
> Although it's in the manual, the description doesn't really describe
> what the procedure returns, or when one can rely upon it being set.  It
> only says that it's "used internally by 'primitive-load'".
>
>       Mark

Some background:
You probably remember I'm from LilyPond. Currently we still use
guilev-1.8, though have experimental support for guilev2.
I do a lot of support on our user-list, frequently checking things
with my lilypond-guilev2-setup to detect bugs.

Recently a user wrote a large scm-file and put it into lilypond using
'(load file.scm)'.
No problem with guilev1, but with guilev2 'file.scm' is not found.
Thus I tried to track the problem down.
Not a bad start is to rtfm :)
So I found 'current-load-port' and intended to play around with it
whether I can get some useful info out of it.

In short, I likely don't need 'current-load-port' for anything, but
couldn't be sure before I used it. Thus this thread and patch.

While doing rtfm I found 'primitive-load' working for the above
described purpose in guilev1 and guilev2. So the problem is solvable.

Although this doesn't explain why 'load' stopped working for lilypond.
I then started from our master (guilev1) and changed only two things:
- teaching configure to accept guile-2.9.1
- disabling a certain not longer supported function (only needed for
collecting some statistic data and never used afair)
Omitting all other guilev2-patches will ofcourse result in a very
buggy lilypond, if someone would intend to use it, but enough to check
whether 'load' works.
It does not.
So the underlying problem is either already in lilypond-master or
guilev2 changed something in 'load'.

That's my current research-state.

Any hint from the guile side?


Thanks,
  Harm



  reply	other threads:[~2018-11-05  8:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-04 11:55 What's up with 'current-load-port' Thomas Morley
2018-11-04 12:50 ` Alex Vong
2018-11-04 13:14   ` Thomas Morley
2018-11-06 20:25     ` Alex Vong
2018-11-05  1:43 ` Mark H Weaver
2018-11-05  8:25   ` Thomas Morley [this message]
2018-11-05  9:49     ` Thomas Morley
2018-11-05 10:14     ` Ludovic Courtès
2018-11-05 23:37       ` Thomas Morley

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='CABsfGyV=HRToncAPmMTHvHAfXd9sTQY4-zhQE3r0L9LTdyiZkA@mail.gmail.com' \
    --to=thomasmorley65@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=mhw@netris.org \
    /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).