coleslaw-org / coleslaw

Flexible Lisp Blogware
BSD 2-Clause "Simplified" License
553 stars 82 forks source link

Don't compile plugin files. #70

Closed Ferada closed 9 years ago

Ferada commented 9 years ago

I've complained about this, so this is my fix I'm using on my machine. This prevents errors if the compilation is trying to write to a global, readable-only directory.

kingcons commented 9 years ago

I'll merge in some form of this. My first thought is a config parameter that compilation is conditionalized on. But I'm not wild about adding more config parameters. Could also try the compile and have some condition handling in case it fails. We'll see.

Ferada commented 9 years ago

Okay, cool, I can make the change for condition handling; I'm not too keen on a config parameter either.

Ferada commented 9 years ago

'Kay, how about this. Ignores the error the first time, then it will either happen again in the LOAD, or it will just be the one warning, e.g. about the failed file creation.

kingcons commented 9 years ago

That seems pretty reasonable to me. I was thinking a handler-case and specifically catching the error condition thrown for "can't write file" but that condition might not be portable and this is definitely better than what we have. Thanks for the patch!

Ferada commented 9 years ago

From what I can tell from COMPILE-FILE you'd only get as far as FILE-ERROR, so if you think it's worth restricting it to that error. I was unsure, so went with this instead.