New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WhatMoldsCanIUse? does not report molds with failed dependencies #23
Comments
Funny. I put some messaging in, and found evaluating the lambda contents to display it causes it to give a result. Without the (defun me-usable-molds-requiring-deps ()
"Find molds that require dependencies to run."
(--remove
(let ((mold it)
(given-cond (me-get-in it '(:given :fn))))
(ignore-errors
(and
(> (length given-cond) 1)
(eq (car given-cond) 'and)
(progn (message "me-usable-molds-requiring-deps:got and:filtered=%s" (eval (cons 'and (--remove
(or
(and
(seqp it)
(-contains? it 'executable-find))
(and
(seqp it)
(-contains? it 'me-require)))
(cdr given-cond))))) t)
(me-with-mold-let mold
(lambda ()
(eval (cons 'and (--remove
(or
(and
(seqp it)
(-contains? it 'executable-find))
(and
(seqp it)
(-contains? it 'me-require)))
(cdr given-cond)))))))))
me-available-molds)) |
And I think this is relevant |
I think we need to do a deep traversal of the :given (:fn (and
url
(me-require 'json)
(executable-find "lighthouse") ;; npm i -g lighthouse
(or (executable-find "chromium")
(executable-find "chrome")
(file-exists-p "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome")))) will not currently find the |
You are correct! That is still at a basic implementation. (let ((example (-flatten '(and
url
(me-require 'json)
(executable-find "lighthouse") ;; npm i -g lighthouse
(or (executable-find "chromium")
(executable-find "chrome")
(file-exists-p "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"))))))
(--> example
(--find-indices (eq it 'executable-find) it)
(--map (nth (+ 1 it) example) it))) |
now it can find missing dependencies even if they are nested in a :given :fn predicate #23
I do not have
org-ql
installed.If I open an org-mode file, and activate
WhatMoldsCanIUse?
it does not add a section noting the missing dependencies.Perhaps there should be a test for this, with a test mold having an impossible dependency to keep it from regressing.
The text was updated successfully, but these errors were encountered: