This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-18
Channels
- # adventofcode (40)
- # aleph (8)
- # announcements (2)
- # beginners (27)
- # calva (3)
- # cider (3)
- # clj-kondo (21)
- # cljsrn (9)
- # clojure (122)
- # clojure-europe (38)
- # clojure-france (93)
- # clojure-nl (2)
- # clojure-spec (1)
- # clojure-uk (32)
- # clojuredesign-podcast (1)
- # clojurescript (10)
- # community-development (11)
- # conjure (14)
- # cursive (11)
- # datalog (7)
- # depstar (21)
- # emacs (31)
- # fulcro (85)
- # google-cloud (1)
- # graalvm (1)
- # graphql (7)
- # jobs-discuss (3)
- # joker (1)
- # kaocha (14)
- # pathom (2)
- # re-frame (1)
- # reagent (1)
- # reitit (6)
- # reveal (50)
- # shadow-cljs (64)
- # spacemacs (8)
- # tools-deps (5)
Hello, I'm having a bit of trouble generating a native image. I have pinpointed the problem to the function resolve
. Assuming that the problem was with this function, I tried to rebuild resolve. Eventually, I found the minimal working code:
(defn -main [& args]
((fn [^clojure.lang.Namespace ns] (.getName ns)) *ns*))
which compiles, and
(defn -main [& args]
((fn [^clojure.lang.Namespace ns] (.getMappings ns)) *ns*))
which does not.
As a quick look at the java code for clojure.lang.Namespace shows, both methods do simple field access, and I am unsure as to why one would compile successfully and the other would fail (Unless maybe AtomicReference is causing issues?). Any suggestions you might have would be wonderful.
Edit:
As a quick note, when ignoring unsupported features with --report-unsupported-features-at-runtime
, everything works as intended, even when using clojure.core/resolve
.