Post by Mark H WeaverPost by Thomas Morleywhat's up with 'current-load-port'?
guile-1.8: #<primitive-procedure current-load-port>
guile-2.0.14: #<procedure current-load-port ()>
;;; <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