Previously, this was implemented using the #+parenscript read-time conditional in the source files.
That worked ok if you loaded Parenscript before loading css-lite, but there were two problems:
- If you loaded the css-lite fasls compiled with Parenscript into a fresh Lisp image without loading Parenscript first, you'd get an error.
Both of these error stem from the fact that ASDF didn't know anything about the optional Parenscript dependency.
Didier Verna has written about optional ASDF dependencies previously (make sure to read the asdf-devel thread on optional dependencies Didier links to if you're interested in this). In short, relying on ASDF's :weakly-depends-on seems quite hairy.
I think I found a simple alternate solution for uri-template that seems to work: put all the Parenscript-dependent code into one file, and then use read-time conditionals in the uri-template.asd list of files like so:
:components ((:file "package")
#+parenscript (:file "parenscript-implementation")
You can see the full implementation in the latest patch to uri-template.
Let me know if you have any ideas about this technique, or optional dependencies in general.