[consfigurator] v4 pass data source

Sean Whitton spwhitton at spwhitton.name
Thu May 5 16:40:27 BST 2022


Hello,

On Thu 05 May 2022 at 08:29am -03, David Bremner wrote:

> I think I adopted all of the suggestions, except for moving the "," in 8/8. I
> might have misunderstood something but
>
>  (defmacro with-test-pass-source (test-home &rest body)
>    "Run BODY with pass(1) data source in TEST-HOME populated and registed."
> -  `(let ((*test-pass-dir* (merge-pathnames #P"password-store/" ,test-home)))
> +  `(let ((*test-pass-dir* ,(merge-pathnames #P"password-store/" test-home)))
>       (pass (list "init" *test-gnupg-fingerprint*))
>       (populate-data-pass)
>       (handler-case
>
> resulted in
>
> ; caught ERROR:
> ;   during macroexpansion of (WITH-TEST-PASS-SOURCE TEST-HOME (DO-TESTS)). Use
> ;   *BREAK-ON-SIGNALS* to intercept.
> ;
> ;    The value
> ;      TEST-HOME
> ;    is not of type
> ;      (OR STRING PATHNAME SYNONYM-STREAM FILE-STREAM)
> ;    when binding SB-IMPL::DEFAULTS
>
> I guess this has to do with nested macro expansion, but I'm unclear on the
> details.

The macro is passed a symbol not a literal, on which it can't call
MERGE-PATHNAMES.  It's not inherently about the calls being nested.  In
this case, keeping the command inside the MERGE-PATHNAMES is correct.

-- 
Sean Whitton



More information about the sgo-software-discuss mailing list