Hi all, In LilyPond initialization code, at the moment we build a list of scheme files to load from our %load-path and interpret as we go.
I'm currently hacking some code so that if we do the load-from-path successfully we then call (compile-file (%search-load-path "blah.scm") <output-path>/blah.go). However one of these file has code using (current-module) to do some validation on some interpretive code basically looking for a symbol-name which is defined in the current module and is a procedure. The procedure works fine and validates as expected when the .scm file is loaded via load-from-path, but fails validation of exactly the same symbol when the file is being compiled using compile-file. I investigated by putting trace commands in the file being compiled to (format #f "~s" (current-module)) and this showed different results between when the file was being interpreted after being loaded and when it was compiling. (load-from-path) showed the expected module '(lily), (compile-file) showed an "anonymous" module with an internally generated name. Tested with Guile V2.0.3. Is this a bug, or are we doing something seriously screwy in our code? Cheers, Ian Hulin