[asdf-devel] asdf:run-shell-command - fix, delete or don't touch?

Robert Goldman rpgoldman at sift.info
Fri Oct 7 18:36:42 UTC 2011


On 10/7/11 Oct 7 -10:35 AM, Faré wrote:
> On Fri, Oct 7, 2011 at 08:40, Zach Beane <xach at xach.com> wrote:
>> Faré <fahree at gmail.com> writes:
>>
>>> Do we want to (a) leave run-shell-command half-broken on various
>>> combination of OSes and implementations as soon as any argument needs
>>> quoting, do we want to (b) use heavy artillery to solve the problem
>>> correctly, or should we not just (c) delete this broken functionality
>>> that obviously nobody can or should be relying on for anything
>>> serious?
>>>
>>> My preference goes to (c) delete the damn thing (replacing the
>>> function body by an error that suggests a good replacement), but only
>>> if it doesn't create a quagmire for users.
>>
>> My preference is to leave it as-is.
>>
>>> Xach - would it be easy for you to test Quicklisp with a version of
>>> ASDF without run-shell-command (or fmakunbound'ing it early on) and
>>> see if anything breaks?
>>
>> Of Quicklisp projects, it breaks CommonQT, elephant, gsll, umlisp, and
>> cl-gene-searcher.
>>
> You win, thanks to superior data. Thanks, Zach!
> 
> My plan:
> 1- declare the interface deprecated for now
> 2- work with the authors of said software to migrate off of it.
> 3- when no one is known to use it anymore, make it issue a warning at
> compile and/or runtime.
> 4- after a few versions, make it issue an error

I don't think that's a full solution, per my somewhat garbled email of
last night.  The problem is that we will end up with

(defsystem foo
  (:defsystem-depends-on xcvb-run-program)
  ... system definition ...
)

The problem is that unlike before, we can't have nice

(defmethod PERFORM ((op my-op) (c my-component-class))
  (run-shell-program ....))

Instead, we end up with the much nastier

(defmethod PERFORM ((op my-op) (c my-component-class))
  (funcall (intern (symbol-name #:fare-run-shell-program) :xcvb-runner
....)))

I suppose if there is a one function-sized API, this won't be too bad,
because we can just define

(defun run-shell-command (&rest args)
  (apply (intern (symbol-name #:fare-run-shell-program) :xcvb-runner) ....))

once and then writing the PERFORM methods will be OK....

:DEFSYSTEM-DEPENDS-ON doesn't interact very gracefully with the package
system....



Cheers,
r







More information about the asdf-devel mailing list