Actually, I see these lines in the file asdf.lisp in my sbcl
distribution (SBCL 1.4):
>   (defmethod operate :around (operation component &rest keys
>                               &key verbose
>                                 (on-warnings *compile-file-warnings-
>                                 behaviour*)>                                 
> (on-failure *compile-file-failure-
>                                 behaviour*))
Could someone please ELI5 how to hook into that for on-failure?

Thanks,

Mark

----- Original message -----
From: Robert Goldman <rpgold...@sift.info>
To: "Mark H. David" <m...@yv.org>
Cc: "ASDF-devel" <asdf-devel@common-lisp.net>
Subject: Re: Best Practice for an ASDF Variable Like 
**compile-file-failure-behaviour**Date: Fri, 09 Mar 2018 16:34:48 -0600

Are you just using this for yourself?  If so, a simple


(let ((asdf:*compile-file-failure-behaviour* :warn)) (asdf:load-system
"my system"))will suffice.


Alternatively, you could put something like this in the .asd file:


(defmethod operate :around ((operation load-op) (system (asdf:find-
system "my-system"))) (let ((asdf:*compile-file-failure-behaviour*
:warn)) (call-next-method)))The above most emphatically *has not been tested*, 
so it might be wrong.I *think* if the top-level operation you use is load-op, 
this should
work.  Alternatively, you might want to replace (operation load-op) with
just (operation operation) (and add a (declare (ignorable operation)))Cheers,
 r


On 9 Mar 2018, at 16:12, Mark H. David wrote:


> As has been discussed here over the years,  asdf:*compile-file-failure-
> behaviour* is :warn on most platforms, but it is notoriously :error on
> #+sbcl. So what would you do if you wanted to change 
> asdf:*compile-file-failure-
> behaviour* to be :warn on #+SBCL? How would you recommend to change
> it. Where?> 
>  I don't want to really have to impose an init file on everyone.
>  Also, I don't really want to necessarily make this global across
>  every use of ASDF, but let's say I just want it to apply to one main
>  system and all subsystems loaded as part of this.> 
>  I cannot think of anything better than a top-level setq in the .asd
>  file of the system, something like this?> 
>  #+sbcl
>  (setq asdf:*compile-file-failure-behaviour* :warn)
> 
>  What else can one do that's any better?
> 
>  Maybe there's a less crude way, like something like an around method
>  that wraps around the compile/load.  I'm really just barely a novice
>  user, so I'm sorry this if this is such a naive question.  If there's
>  a simple example one could provide or point me to that does this, I'd
>  appreciate it.> 
>  Thanks,
> 
>  Mark




Reply via email to