borkdude/lein2deps

Parsing project.clj file fails with the error: Use the `:fn` option

vedang opened this issue · 0 comments

vedang commented

When I try to run the lein2deps script on a project, the following error gets thrown:

❯ bb -Sdeps '{:deps {io.github.borkdude/lein2deps {:git/sha "4f6d4a0140ddea10c5ac28cc24b49643660f42f6"}}}' \
      -m lein2deps.api --print --write-file deps.edn
----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Function literal not allowed. Use the `:fn` option
Data:     {:type :edamame/error, nil 30}
Location: .../.gitlibs/libs/io.github.borkdude/lein2deps/4f6d4a0140ddea10c5ac28cc24b49643660f42f6/src/lein2deps/internal.clj:23:63

----- Context ------------------------------------------------------------------
19:              :regex true}
20:         form (first (take-while #(or
21:                                   (and (seq? %)
22:                                        (= 'defproject (first %)))
23:                                   (= ::e/eof %)) (repeatedly #(e/parse-next parser cfg))))
                                                                  ^--- Function literal not allowed. Use the `:fn` option
24:         project-clj-edn form]
25:     (apply hash-map (drop 3 project-clj-edn))))
26:
27: (defn qualify-dep-name [d]
28:   (if (simple-symbol? d)

----- Stack trace --------------------------------------------------------------

The example project I was working with was https://github.com/clj-commons/durable-queue/