Commit b1dfa423 authored by Eric Timmons's avatar Eric Timmons
Browse files

Add new config option :grovel :lisp :command

Deprecates (:grovel :lisp :path). Is split into a list of arguments using
shlex.

Add new recognized implementation :CUSTOM that doesn't use any arguments from
lisp-invocation to start the groveler.
parent 5662f55e
Pipeline #3184 canceled with stages
in 4 minutes and 29 seconds
......@@ -148,16 +148,23 @@
:type hash-table)
((:grovel :lisp)
:type hash-table)
((:grovel :lisp :command)
:type string
:documentation
"The command to use when executing the Lisp process for groveling. If a
string, it is processed via shlex to split it into a list of strings.")
((:grovel :lisp :implementation)
:type keyword
:default :auto
:documentation
"The implementation to use when groveling. Must be recognized by
lisp-invocation library.")
lisp-invocation library or :CUSTOM. If :CUSTOM, the :COMMAND must start
the implementation in the desired state.")
((:grovel :lisp :path)
:type string
:documentation
"The command to use when executing the Lisp process for groveling.")
"DEPRECATED - USE :COMMAND INSTEAD. The command to use when executing the
Lisp process for groveling.")
((:grovel :sandbox)
:type hash-table)
((:grovel :sandbox :type)
......
......@@ -14,6 +14,7 @@
#:exit-hooks
#:lisp-invocation)
(:shadow #:make-groveler)
(:import-from #:shlex)
(:reexport #:asdf-system-groveler)
(:export #:*active-groveler*
#:active-groveler-ensure-asd-loaded
......@@ -32,7 +33,6 @@
(zerop (nth-value 2 (uiop:run-program
(lisp-invocation-arglist
:implementation-type implementation
:lisp-path (config-value :grovel :lisp :path)
:eval "(print (lisp-implementation-type))"
:eval (quit-form :code 0 :implementation-type implementation))
:input nil
......@@ -47,12 +47,16 @@
config-value)))
(defun make-groveler ()
(let ((dir (asdf-system-groveler:mkdtemp (merge-pathnames "clpm"
(uiop:temporary-directory)))))
(let* ((dir (asdf-system-groveler:mkdtemp (merge-pathnames "clpm"
(uiop:temporary-directory))))
(command-string (or (config-value :grovel :lisp :command)
(config-value :grovel :lisp :path)))
(command-list (unless (null command-string) (shlex:split command-string))))
(flet ((rewrite (args)
(sandbox-augment-command args :read-write-pathnames (list dir))))
(aprog1 (asdf-system-groveler:make-groveler (get-groveler-implementation)
:lisp-path (config-value :grovel :lisp :path)
:lisp-path (first command-list)
:lisp-args (rest command-list)
:asdf-fasl-cache-dir dir
:keep-asdf-fasl-cache-dir nil
:rewrite-arguments-callback #'rewrite)
......
......@@ -167,10 +167,13 @@ The current configuration can be printed by running =clpm config info=.
This table contains the configuration on which Lisp implementation to use
when groveling.
+ =:command= :: The command to execute when starting the Lisp
implementation. Needed only if using a non standard path. Is broken into a
list of arugments using shlex.
+ =:implementation= :: A keyword naming an implementation recognized by the
lisp-invocation library.
+ =:path= :: The command to execute when starting the Lisp
implementation. Needed only if using a non standard path.
lisp-invocation library or =:custom=. If =:custom=, the =:command= must
start the implementation in the desired state.
+ =:path= :: DEPRECATED - USE =:command= instead.
** =(:grovel :sandbox)=
This table contains configuration of the sandbox used to isolate processes
......
Subproject commit 8693a0f4f1d382ac318570c828b7c3a519c9cc28
Subproject commit ef2a5335a5d0ad9cd6b65a3fac3fa04ffd894d33
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment