This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-09
Channels
- # announcements (16)
- # beginners (86)
- # calva (4)
- # cider (17)
- # circleci (1)
- # clj-kondo (4)
- # cljs-dev (12)
- # cljsrn (4)
- # clojure (82)
- # clojure-europe (2)
- # clojure-houston (4)
- # clojure-italy (5)
- # clojure-nl (7)
- # clojure-spec (49)
- # clojure-uk (19)
- # clojurescript (76)
- # core-async (7)
- # cursive (1)
- # data-science (4)
- # datomic (5)
- # figwheel (1)
- # fulcro (10)
- # graalvm (15)
- # jobs (1)
- # juxt (6)
- # kaocha (2)
- # leiningen (5)
- # random (2)
- # shadow-cljs (25)
- # sql (5)
- # tools-deps (113)
- # vim (3)
- # yada (14)
@benzap the Could not locate clojure/core__init.class or clojure/core.clj on classpath
error is due to a change they made in the defaults of the first GraalVM release. You now need to specify a flag (for Clojure apps) --initialize-at-build-time
one issue with compiling 1.10 apps is 1.10 depends on a version of clojure.spec that uses locking
, and locking
doesn’t play well with native-image
at the moment, but… you can “patch” calls to it if you really want
I haven't used clojure.spec whatsoever. The original test involved 1.9, i'll try 1.10 and see if it works. Was having issues gettingit working without the fallback
here’s one way to do that https://github.com/taylorwood/clojurl/compare/locking-fix
@taylor maybe it would be cool to have a lib which bundles the compiled .class file and patches a selection of functions in clojure which uses locking using alter-var-root
this would certainly be convenient, but I think I’d rather it be less convenient for people to clobber clojure.core stuff, or at least I’d feel bad about it 😄
that's why I suggested to hide the alter-var-roots behind functions so people can apply these patches selectively, only when compiling to a binary
[clj-native/locking-patch "0.0.1"]
+ (require '[clj-native.locking-patch :as lp]) (lp/apply-locking-patch!)
so the patches can be selectively applied (e.g. only when compiling a binary and not when running your tool with the JVM)
Hello! Does anyone have some experience of using java.time with native-image compilation? I have a case where a non-english time string can't be parsed in the compiled binary. In particular
(let [pattern (DateTimeFormatter/ofPattern "y-M-d[ ][cccc][ccc][ ]H:m" Locale/GERMAN)]
(LocalDateTime/parse "2018-12-03 Mo 02:17" pattern))
throws java.time.format.DateTimeParseException: Text '2018-12-03 Mo 02:17' could not be parsed at index 11
but works with JVM 8/11. I assume that language support is stripped during compilation. Any way of enabling it again?