Another follow-up from yesterday's doc reviews
fahree at gmail.com
Thu Sep 22 22:01:52 UTC 2016
.asd files are Lisp code, but this Lisp code must be loaded in the
correct context. Just like a random Lisp file won't even load if its
packages haven't been defined, or the readtable is wrong, etc., a
random .asd file won't run if it's not loaded in the correct context.
This is NOT new: ASDF 1 (and ASDF 2 after it) even used to create a
new package around the loading of each and every .asd file -- and
delete it afterwards! And there wasn't even an exported function that
users could call to achieve the same effect, until 2.011.3 (Dec 2010).
Now if you use swank-asdf, I made sure that it calls load-asd when you
use C-c C-k on a .asd file. I also implemented other goodies, so that
compiling a file would be done with perform compile-op, but the slime
maintainers disabled them by default. Sigh.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
I’d like to confess, Papa, at that moment I discovered
that I really like killing. — Ernesto "Che" Guevara
On Thu, Sep 22, 2016 at 5:19 PM, Eric Timmons <etimmons at mit.edu> wrote:
> On Thu, Sep 22, 2016 at 4:44 PM, Robert P. Goldman <rpgoldman at sift.net> wrote:
>> Actually now LOAD-ASD controls syntax, sets the readtable, controls the pretty-printer, sets up a cache, and a handler. And who knows what it will do tomorrow?
> Oooph, didn't realize that was in there as well. At least those
> effects aren't advertised in the manual (I think)?
>> For the record, I'm not a fan. I would prefer that asd files were normal lisp. But they aren't, so I don't think we should lie about it, and I don't want to field alleged bug reports that arise because someone thought they were, when they are not.
> Honestly, I'd go the other way and say I wish ASD files were not
> LOAD'able. It'd make it easier to analyze a system without the
> possibility of incurring side effects due to whatever code the
> developer decided to put in there (this has made my life annoying a
> couple of times). But that's probably not worth thinking about until
> ASDF 4 rolls around.
>> We could make this a continuable error as a concession to people who know that they want to evaluate these forms outside LOAD-ASD, but that's as far as I'm prepared to go.
> That's probably a good compromise.
More information about the asdf-devel