Re: sawfish 1.6.3 can't compile sawfish.wm.util.prompt



On 23/05/10 21:33, Harald van Dijk wrote:
On 23/05/10 16:41, Jeremy Hankins wrote:
I haven't been able to replicate this, and it doesn't make a whole lot
of sense to me.  A file shouldn't have to be opened from itself in order
to compile it, and I can't see where a (setq foo bar) would generate a
void-value error on foo.
As far as I could tell, if the file is not opened from itself, the defvar is only evaluated after the setq, because the setq is part of an eval-when-compile. (open)ing prompt.jl from within itself ensures the defvar is processed earlier. I am not sure why you are not seeing this, I will try to track this down further. For reference, I started the build with librep 0.90.5, rep-gtk 0.90.2, and sawfish 1.6.2 installed, no git snapshots. And I do not think this should matter, but it's happening on a fairly standard x86_64 linux system.
Using a test rep file test.jl:

(define-structure test
    (export test-var)
    (open rep)
    (defvar test-var nil)
    (eval-when-compile (setq test-var t)))

a second test file test2.jl:

(require 'test)
(setq test-var t)

and compiling these via

  rm -f *.jlc && rep --batch compiler -f compile-batch test2.jl test.jl

all is fine. Compiling these via

  rm -f *.jlc && rep --batch compiler -f compile-batch test.jl test2.jl

results in

*** Unbound variable: test-var
()

sawfish doesn't use compile-batch, it uses compile-lib-batch. Depending on the order used, it may or may not have opened prompt.jl by pure luck before turning to compile it.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]