[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Changes to Svnwiki's extensions system coming
From: |
Alejandro Forero Cuervo |
Subject: |
Re: [Chicken-users] Changes to Svnwiki's extensions system coming |
Date: |
Mon, 10 Nov 2008 21:41:12 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
> > (but there's a problem: sometimes svnwiki-foo will "(use
> > svnwiki-extensions)" to get macros defined there, but the
> > svnwiki-extensions will load svnwiki-foo again and a loop will
> > result; I may be able to fix this in the future, in which case
> > svnwiki-extensions-init will become a no-op).
>
> You could check extensions for being installed with
> "extension-information" (to test for specific eggs). Alternatively,
> grab the directory contents with "(glob (make-pathname
> (repository-path) "svnwiki-*" "setup-info"))".
This solves a problem other than the one I was refering to. This particular
problem I'm solving by having all the chicken-eggs that want svnwiki-extensions
to load them create a file in repository-path/svnwiki-extensions-register named
after them. I then do:
(define (svnwiki-extensions-init)
(for-each (lambda (name)
(require (string-append "svnwiki-" name)))
(directory (make-pathname (repository-path)
"svnwiki-extensions-registry"))))
And then the caller does:
(use svnwiki-extensions)
(svnwiki-extensions-init)
However, I would like to include the body of the
svnwiki-extensions-init function directly in the svnwiki-extensions
egg, so that it suffices for the caller to (use svnwiki-extensions).
However, this will result in a loop:
1. Caller: (use svnwiki-extensions)
2. svnwiki-extensions, as part of the above for-each: (require
"svnwiki-foo")
3. svnwiki-foo, which requires macros and symbols from
svnwiki-extensions: (use svnwiki-extensions)
4. Back to #2.
That's the problem I was refering to. :-)
Alejo.
http://azul.freaks-unidos.net/
Re: [Chicken-users] Changes to Svnwiki's extensions system coming, felix winkelmann, 2008/11/10