[parenscript-devel] Bug: can't call ps-to-string directly

Vladimir Sedach vsedach at gmail.com
Tue Jul 31 23:01:08 UTC 2007


> This might cause some unexpected behavior since it creates a lingering,
> universal compilation environment.  Package definitions will persist across
> all compilations, for example.

You're absolutely right, it does. I undid the patch that bound
*compilation-environment*, and the one that was affected by it. Thank
you for the lucid explanation. I also unexported ps-to-string.
However, it turns out that in the code I'm working on, we do take
advantage of a persistent compilation environment in other ways
(specifically, I want macro definitions to persist across several
parenscript compilations), so I've added a function
setup-persistent-compilation-environment to the deprecated file which
sets *compilation-environment* to such a value (and also a function to
clear *compilation-environment*).

Vladimir

> The revised compilation interface will ensure that *compilation-environment*
> is bound to a compilation environment before compiling (see
> compilation-interface.lisp and "non-nil-comp-env").  I think the functions
> provided in compilation-interface are sufficient for all
> compilation/translation needs.  We might want to unexport some other
> functions.
>
> A compilation environment is generally supposed to be initialized before and
> die after a logical compilation process.  For example, consider an HTML page
> with a inlined script in a <script> tag, some external script in a <script
> src="...">, and script function calls embedded in onMouseClick attributes in
> the HTML page.  The compilation environment will be created.  The compiler
> will then be invoked on the inline script, the script files, and the script
> embedded in HTML.  After all this, the compilation environment can be thrown
> away, along with all the Parenscript package definitions and other local
> compilation rules.
>
> This intended use requires the user to manage a compilation environment to
> some degree.  Before long we should figure out the public interface for
> dealing with a compilation environment.  I also have no problem writing up
> the documentation.  Before I do this, however, I would like to use the
> package system extensively for a real application so I can see how it is
> best used in practice.
>
> > Vladimir
> > > Dan
> > >
>
>
> Red
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
>



More information about the parenscript-devel mailing list