cljfmt icon indicating copy to clipboard operation
cljfmt copied to clipboard

Macro cljfmt.core/read-resource does not exist error when building native-image

Open codeasone opened this issue 3 years ago • 1 comments

When building native image via lein do clean, native-image for the latest 0.8.0 release, I'm hitting the following issue:

Caused by: clojure.lang.ExceptionInfo: Invalid :refer, macro cljfmt.core/read-resource does not exist in file src/cljfmt/core.cljc {:tag :cljs/analysis-error}

Full output: https://gist.github.com/codeasone/e258af1f2160d0120dbc66bc8c870949

So there is a problem with the cljs build triggered via the leiningen.cljsbuild hook.

Work-around: just comment out the following line in the project.clj

  ;; :hooks [leiningen.cljsbuild]

And re-run lein do clean, native-image

codeasone avatar Jun 23 '21 08:06 codeasone

In case it helps: it seems easy enough to separate cljsbuild to its own Lein profile

vemv avatar Oct 08 '21 13:10 vemv