This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-14
Channels
- # announcements (13)
- # aws (2)
- # babashka (17)
- # beginners (80)
- # biff (10)
- # cljs-dev (51)
- # cljsrn (6)
- # clojure (42)
- # clojure-australia (9)
- # clojure-boston (2)
- # clojure-europe (17)
- # clojure-sweden (3)
- # clojure-uk (53)
- # clojurescript (44)
- # code-reviews (2)
- # core-async (5)
- # cryogen (3)
- # cursive (32)
- # datahike (1)
- # datomic (11)
- # events (1)
- # fulcro (22)
- # helix (3)
- # honeysql (3)
- # leiningen (4)
- # lsp (30)
- # luminus (13)
- # malli (5)
- # off-topic (115)
- # other-languages (5)
- # pathom (10)
- # polylith (23)
- # re-frame (24)
- # reagent (10)
- # releases (2)
- # shadow-cljs (124)
My coworker and I are experiencing this bug: https://github.com/thheller/shadow-cljs/issues/877
We’ve tried deleting .shadow-cljs, target and compiled js. We’ve upgraded to shadow-cljs 2.13.0 as well
We’ve tried running a new shell as well
Any ideas. Thheller expains some incompatibility with version of CLJS and shadow. We’re not specifying CLJS in our deps as afaik, shadow-cljs pull them in with the correct version.
I had to update any deps using goog.isBoolean.
I started getting this error
Execution error (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (BuiltinClassLoader.java:581).
jdk.vm.ci.services.Services
after upgrading from version 2.12.5 to 2.13.0.
I start the watch process with npx shadow-cljs watch :main
.
Is there something that I need to change in shadow-cljs.edn or the way that I'm starting Shadow CLJS in watch mode?no clue, never seen that error before. did you by any chance change your JVM installation at the same time?
Didn't change my JVM. I'm using openjdk version "15.0.1" 2020-10-20 on macOS.
But I also tried with openjdk version "11.0.10" 2021-01-19 without luck.
It's loooong file, but this might help
{:clojure.main/message
"Execution error (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (BuiltinClassLoader.java:606).\njdk.vm.ci.services.Services\n",
:clojure.main/triage
{:clojure.error/class java.lang.ClassNotFoundException,
:clojure.error/line 606,
:clojure.error/cause "jdk.vm.ci.services.Services",
:clojure.error/symbol
jdk.internal.loader.BuiltinClassLoader/loadClass,
:clojure.error/source "BuiltinClassLoader.java",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type java.util.ServiceConfigurationError,
:message
"org.graalvm.polyglot.impl.AbstractPolyglotImpl: Provider com.oracle.truffle.polyglot.PolyglotImpl could not be instantiated",
:at [java.util.ServiceLoader fail "ServiceLoader.java" 584]}
{:type java.lang.NoClassDefFoundError,
:message "jdk/vm/ci/services/Services",
:at [org.graalvm.libgraal.LibGraal <clinit> "LibGraal.java" 46]}
{:type java.lang.ClassNotFoundException,
:message "jdk.vm.ci.services.Services",
:at
[jdk.internal.loader.BuiltinClassLoader
loadClass
"BuiltinClassLoader.java"
606]}],
:trace
[[jdk.internal.loader.BuiltinClassLoader
loadClass
"BuiltinClassLoader.java"
606]
[jdk.internal.loader.ClassLoaders$AppClassLoader
loadClass
"ClassLoaders.java"
168]
[java.lang.ClassLoader loadClass "ClassLoader.java" 522]
[org.graalvm.libgraal.LibGraal <clinit> "LibGraal.java" 46]
[org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalTruffleRuntimeAccess
getPriority
"LibGraalTruffleRuntimeAccess.java"
44]
[com.oracle.truffle.api.Truffle
selectTruffleRuntimeAccess
"Truffle.java"
89]
[com.oracle.truffle.api.Truffle access$000 "Truffle.java" 57]
[com.oracle.truffle.api.Truffle$1 run "Truffle.java" 122]
[com.oracle.truffle.api.Truffle$1 run "Truffle.java" 107]
[java.security.AccessController
doPrivileged
"AccessController.java"
312]
[com.oracle.truffle.api.Truffle initRuntime "Truffle.java" 107]
[com.oracle.truffle.api.Truffle <clinit> "Truffle.java" 62]
[com.oracle.truffle.api.impl.Accessor getTVMCI "Accessor.java" 1092]
[com.oracle.truffle.api.impl.Accessor
access$000
"Accessor.java"
117]
[com.oracle.truffle.api.impl.Accessor$Constants
<clinit>
"Accessor.java"
974]
[com.oracle.truffle.api.impl.Accessor
nodeSupport
"Accessor.java"
1025]
[com.oracle.truffle.api.LanguageAccessor
<clinit>
"LanguageAccessor.java"
79]
[com.oracle.truffle.api.TruffleLogger$LoggerCache
<clinit>
"TruffleLogger.java"
957]
[com.oracle.truffle.api.TruffleLogger
getLogger
"TruffleLogger.java"
154]
[com.oracle.truffle.api.TruffleLogger
getLogger
"TruffleLogger.java"
138]
[com.oracle.truffle.polyglot.PolyglotContextImpl
<clinit>
"PolyglotContextImpl.java"
101]
[com.oracle.truffle.polyglot.HostException
<init>
"HostException.java"
58]
[com.oracle.truffle.polyglot.PolyglotImpl
<clinit>
"PolyglotImpl.java"
92]
[jdk.internal.reflect.NativeConstructorAccessorImpl
newInstance0
"NativeConstructorAccessorImpl.java"
-2]
[jdk.internal.reflect.NativeConstructorAccessorImpl
newInstance
"NativeConstructorAccessorImpl.java"
64]
[jdk.internal.reflect.DelegatingConstructorAccessorImpl
newInstance
"DelegatingConstructorAccessorImpl.java"
45]
[java.lang.reflect.Constructor
newInstanceWithCaller
"Constructor.java"
500]
[java.lang.reflect.Constructor newInstance "Constructor.java" 481]
[java.util.ServiceLoader$ProviderImpl
newInstance
"ServiceLoader.java"
782]
[java.util.ServiceLoader$ProviderImpl get "ServiceLoader.java" 724]
[java.util.ServiceLoader$3 next "ServiceLoader.java" 1396]
[org.graalvm.polyglot.Engine$1
searchServiceLoader
"Engine.java"
747]
[org.graalvm.polyglot.Engine$1 run "Engine.java" 733]
[org.graalvm.polyglot.Engine$1 run "Engine.java" 707]
[java.security.AccessController
doPrivileged
"AccessController.java"
312]
[org.graalvm.polyglot.Engine initEngineImpl "Engine.java" 707]
[org.graalvm.polyglot.Engine access$000 "Engine.java" 106]
[org.graalvm.polyglot.Engine$ImplHolder <clinit> "Engine.java" 115]
[org.graalvm.polyglot.Engine getImpl "Engine.java" 304]
[org.graalvm.polyglot.HostAccess$Builder
targetTypeMapping
"HostAccess.java"
913]
[com.oracle.truffle.js.scriptengine.GraalJSScriptEngine
createNashornHostAccess
"GraalJSScriptEngine.java"
104]
[com.oracle.truffle.js.scriptengine.GraalJSScriptEngine
<clinit>
"GraalJSScriptEngine.java"
99]
[com.oracle.truffle.js.scriptengine.GraalJSEngineFactory
getScriptEngine
"GraalJSEngineFactory.java"
180]
[com.oracle.truffle.js.scriptengine.GraalJSEngineFactory
getScriptEngine
"GraalJSEngineFactory.java"
57]
[javax.script.ScriptEngineManager
getEngineByName
"ScriptEngineManager.java"
241]
[shadow.cljs.devtools.server.npm_deps$make_engine
invokeStatic
"npm_deps.clj"
16]
[shadow.cljs.devtools.server.npm_deps$make_engine
invoke
"npm_deps.clj"
11]
[shadow.cljs.devtools.server.npm_deps$fn__17754$fn__17755
invoke
"npm_deps.clj"
28]
[clojure.lang.Delay deref "Delay.java" 42]
[clojure.core$deref invokeStatic "core.clj" 2324]
[clojure.core$deref invoke "core.clj" 2310]
[shadow.cljs.devtools.server.npm_deps$fn__17754$fn__17757
invoke
"npm_deps.clj"
34]
[shadow.cljs.devtools.server.npm_deps$is_installed_QMARK_
invokeStatic
"npm_deps.clj"
201]
[shadow.cljs.devtools.server.npm_deps$is_installed_QMARK_
invoke
"npm_deps.clj"
195]
[shadow.cljs.devtools.server.npm_deps$main$fn__17849
invoke
"npm_deps.clj"
221]
[clojure.core$complement$fn__5686 invoke "core.clj" 1443]
[clojure.core$filter$fn__5911 invoke "core.clj" 2825]
[clojure.lang.LazySeq sval "LazySeq.java" 42]
[clojure.lang.LazySeq seq "LazySeq.java" 51]
[clojure.lang.RT seq "RT.java" 535]
[clojure.core$seq__5419 invokeStatic "core.clj" 139]
[clojure.core$seq__5419 invoke "core.clj" 139]
[shadow.cljs.devtools.server.npm_deps$main
invokeStatic
"npm_deps.clj"
223]
[shadow.cljs.devtools.server.npm_deps$main
invoke
"npm_deps.clj"
210]
[shadow.cljs.devtools.cli_actual$main
invokeStatic
"cli_actual.clj"
141]
[shadow.cljs.devtools.cli_actual$main doInvoke "cli_actual.clj" 132]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 671]
[clojure.core$apply invoke "core.clj" 662]
[shadow.cljs.devtools.cli_actual$_main
invokeStatic
"cli_actual.clj"
219]
[shadow.cljs.devtools.cli_actual$_main
doInvoke
"cli_actual.clj"
217]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$apply invoke "core.clj" 662]
[shadow.cljs.devtools.cli$_main invokeStatic "cli.clj" 75]
[shadow.cljs.devtools.cli$_main doInvoke "cli.clj" 67]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.main$main_opt invokeStatic "main.clj" 514]
[clojure.main$main_opt invoke "main.clj" 510]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause "jdk.vm.ci.services.Services"}}
It was generated by the Clojure CLI.
yeah dunno. the graal-js engine has been in use for a while now (definitely long before 2.12.5) so I don't know why you'd be getting that error now
always helps to sort out your dependency conflicts if you use project.clj or deps.edn
I'm on 2.12.5, so let me try to upgrade to 2.12.6 and then 2.12.7 just to see when it happens.
I just tried upgrading to 2.12.6 and I get the same error. I'm wondering what my be wrong with my setup.
something JVM/classpath related, can't say more without more information about your overall setup
Sorry for the long output, but this is what I get with -Stree
org.clojure/data.json 2.2.3
org.clojure/clojure 1.10.3
. org.clojure/spec.alpha 0.2.194
. org.clojure/core.specs.alpha 0.2.56
org.clojure/tools.logging 1.1.0
expound/expound 0.8.9
compojure/compojure 1.6.2
. org.clojure/tools.macro 0.1.5
. clout/clout 2.2.1
. instaparse/instaparse 1.4.8
. medley/medley 1.3.0
X ring/ring-core 1.8.1 :use-top
X ring/ring-codec 1.1.2 :superseded
X commons-codec/commons-codec 1.11 :parent-omitted
org.slf4j/jcl-over-slf4j 1.7.30
X org.slf4j/slf4j-api 1.7.30 :use-top
com.google.cloud/google-cloud-logging-logback 0.119.0-alpha
X ch.qos.logback/logback-classic 1.2.3 :use-top
. ch.qos.logback/logback-core 1.2.3
. com.google.cloud/google-cloud-logging 2.0.1
. com.google.guava/failureaccess 1.0.1
. com.google.guava/listenablefuture 9999.0-empty-to-avoid-conflict-with-guava
. com.google.code.findbugs/jsr305 3.0.2
. org.checkerframework/checker-compat-qual 2.5.5
. com.google.errorprone/error_prone_annotations 2.4.0
. com.google.j2objc/j2objc-annotations 1.3
. io.grpc/grpc-api 1.34.0
. io.grpc/grpc-context 1.34.0
. org.codehaus.mojo/animal-sniffer-annotations 1.19
. io.grpc/grpc-stub 1.34.0
. io.grpc/grpc-protobuf 1.34.0
. io.grpc/grpc-protobuf-lite 1.34.0
. javax.annotation/javax.annotation-api 1.3.2
. com.google.auto.value/auto-value-annotations 1.7.4
. com.google.protobuf/protobuf-java 3.14.0
. com.google.protobuf/protobuf-java-util 3.14.0
. com.google.code.gson/gson 2.8.6
. com.google.api.grpc/proto-google-common-protos 2.0.1
. com.google.api.grpc/proto-google-cloud-logging-v2 0.85.1
. com.google.api/gax 1.60.1
. io.opencensus/opencensus-api 0.24.0
. com.google.api/gax-grpc 1.60.1
. io.grpc/grpc-auth 1.34.0
. com.google.auth/google-auth-library-credentials 0.22.0
. io.grpc/grpc-netty-shaded 1.34.0
. io.grpc/grpc-alts 1.34.0
. io.grpc/grpc-grpclb 1.34.0
X org.apache.commons/commons-lang3 3.5 :superseded
. org.conscrypt/conscrypt-openjdk-uber 2.5.1
. org.threeten/threetenbp 1.5.0
. com.google.cloud/google-cloud-core-grpc 1.94.0
. com.google.http-client/google-http-client-jackson2 1.38.0
. com.fasterxml.jackson.core/jackson-core 2.12.0
. com.google.http-client/google-http-client 1.38.0
. org.apache.httpcomponents/httpclient 4.5.13
. commons-logging/commons-logging 1.2
X commons-codec/commons-codec 1.11 :superseded
X org.apache.httpcomponents/httpcore 4.4.13 :superseded
. io.opencensus/opencensus-contrib-http-util 0.24.0
. io.grpc/grpc-core 1.34.0
. com.google.android/annotations 4.1.1.4
. io.perfmark/perfmark-api 0.19.0
. com.google.api.grpc/proto-google-iam-v1 1.0.3
X org.slf4j/slf4j-api 1.7.30 :use-top
. com.google.api/api-common 1.10.1
. com.google.cloud/google-cloud-core 1.94.0
. com.google.auth/google-auth-library-oauth2-http 0.22.0
X com.google.guava/guava 30.0-android :use-top
org.apache.logging.log4j/log4j-to-slf4j 2.14.1
X org.slf4j/slf4j-api 1.7.25 :use-top
. org.apache.logging.log4j/log4j-api 2.14.1
com.cognitect/anomalies 0.1.12
ring-cors/ring-cors 0.1.13
ring/ring-defaults 0.3.2
X ring/ring-core 1.6.3 :use-top
. ring/ring-ssl 0.3.0
X ring/ring-core 1.6.0 :use-top
. ring/ring-headers 0.3.0
X ring/ring-core 1.6.0 :use-top
. ring/ring-anti-forgery 1.3.0
. crypto-random/crypto-random 1.2.0
. crypto-equality/crypto-equality 1.0.0
X hiccup/hiccup 1.0.5 :use-top
. javax.servlet/javax.servlet-api 3.1.0
com.cognitect/transit-cljs 0.8.269
. com.cognitect/transit-js 0.8.874
thheller/shadow-cljs 2.12.6
X org.clojure/data.json 2.2.1 :use-top
X org.clojure/tools.cli 1.0.194 :superseded
. org.clojure/tools.reader 1.3.5
. nrepl/nrepl 0.8.3
. cider/piggieback 0.5.2
X com.cognitect/transit-clj 1.0.324 :use-top
X com.cognitect/transit-cljs 0.8.264 :use-top
. org.clojure/core.async 1.3.610
. org.clojure/tools.analyzer.jvm 1.1.0
. org.clojure/tools.analyzer 1.0.0
. org.clojure/core.memoize 1.0.236
. org.clojure/core.cache 1.0.207
. org.clojure/data.priority-map 1.0.0
X org.ow2.asm/asm 5.2 :superseded
X org.clojure/tools.reader 1.3.2 :older-version
X org.clojure/clojurescript 1.10.844 :use-top
. com.google.javascript/closure-compiler-unshaded v20210302
. org.clojure/google-closure-library 0.0-20201211-3e6c510d
. org.clojure/google-closure-library-third-party 0.0-20201211-3e6c510d
. org.clojure/google-closure-library-third-party 0.0-20201211-3e6c510d
. thheller/shadow-util 0.7.0
X hiccup/hiccup 1.0.5 :use-top
. thheller/shadow-client 1.3.3
X org.clojure/core.async 0.3.443 :older-version
X hiccup/hiccup 1.0.5 :use-top
. thheller/shadow-undertow 0.1.0
. org.clojure/core.async 1.3.610
. io.undertow/undertow-core 2.2.4.Final
. org.jboss.logging/jboss-logging 3.4.1.Final
. org.jboss.xnio/xnio-api 3.8.0.Final
. org.wildfly.common/wildfly-common 1.5.2.Final
. org.wildfly.client/wildfly-client-config 1.0.1.Final
X org.jboss.logging/jboss-logging 3.3.1.Final :older-version
X org.wildfly.common/wildfly-common 1.2.0.Final :older-version
. org.jboss.xnio/xnio-nio 3.8.0.Final
. org.jboss.xnio/xnio-api 3.8.0.Final
X org.jboss.threads/jboss-threads 2.3.3.Final :older-version
. org.jboss.threads/jboss-threads 3.1.0.Final
. org.jboss.logging/jboss-logging 3.4.1.Final
X hiccup/hiccup 1.0.5 :use-top
X ring/ring-core 1.9.2 :use-top
. org.graalvm.js/js 21.0.0.2
. org.graalvm.regex/regex 21.0.0.2
. org.graalvm.truffle/truffle-api 21.0.0.2
. org.graalvm.truffle/truffle-api 21.0.0.2
. org.graalvm.sdk/graal-sdk 21.0.0.2
. org.graalvm.sdk/graal-sdk 21.0.0.2
. com.ibm.icu/icu4j 67.1
. org.graalvm.js/js-scriptengine 21.0.0.2
. org.graalvm.sdk/graal-sdk 21.0.0.2
X expound/expound 0.8.5 :use-top
X fipp/fipp 0.6.23 :use-top
. com.bhauman/cljs-test-display 0.1.1
. com.wsscode/pathom 2.2.31
. com.wsscode/spec-inspec 1.0.0-alpha2
. spec-coerce/spec-coerce 1.0.0-alpha6
. com.wsscode/spec-inspec 1.0.0-alpha2
. edn-query-language/eql 0.0.9
X org.clojure/test.check 0.10.0-alpha3 :older-version
X org.clojure/spec.alpha 0.2.176 :older-version
X org.clojure/core.specs.alpha 0.2.44 :older-version
X org.clojure/core.async 0.4.474 :older-version
X org.clojure/test.check 0.10.0-alpha3 :older-version
. org.clojure/test.check 1.1.0
. thheller/shadow-cljsjs 0.0.21
org.clojure/clojurescript 1.10.844
X org.clojure/data.json 0.2.6 :use-top
X org.clojure/tools.reader 1.3.3 :older-version
X com.cognitect/transit-clj 0.8.309 :use-top
com.stuartsierra/component 1.0.0
. com.stuartsierra/dependency 1.0.0
fipp/fipp 0.6.23
. org.clojure/core.rrb-vector 0.1.1
aero/aero 1.1.6
org.slf4j/jul-to-slf4j 1.7.30
X org.slf4j/slf4j-api 1.7.30 :use-top
cljs-ajax/cljs-ajax 0.8.3
. cheshire/cheshire 5.10.0
X com.fasterxml.jackson.core/jackson-core 2.10.2 :older-version
. com.fasterxml.jackson.dataformat/jackson-dataformat-smile 2.10.2
X com.fasterxml.jackson.core/jackson-core 2.10.2 :older-version
. com.fasterxml.jackson.dataformat/jackson-dataformat-cbor 2.10.2
X com.fasterxml.jackson.core/jackson-core 2.10.2 :older-version
. tigris/tigris 0.1.2
X com.cognitect/transit-clj 1.0.324 :use-top
X com.cognitect/transit-cljs 0.8.264 :use-top
. org.apache.httpcomponents/httpasyncclient 4.1.4
X org.apache.httpcomponents/httpcore 4.4.10 :older-version
. org.apache.httpcomponents/httpcore-nio 4.4.10
X org.apache.httpcomponents/httpcore 4.4.10 :older-version
X org.apache.httpcomponents/httpclient 4.5.6 :older-version
. commons-logging/commons-logging 1.2
. org.apache.httpcomponents/httpcore 4.4.14 :newer-version
com.brunobonacci/mulog 0.6.5
. amalloy/ring-buffer 1.3.1
zprint/zprint 1.1.2
. rewrite-cljs/rewrite-cljs 0.4.5
X org.clojure/tools.reader 1.3.2 :older-version
X borkdude/edamame 0.0.11-alpha.28 :superseded
X org.clojure/tools.reader 1.3.4 :older-version
X borkdude/sci 0.2.1-alpha.1 :superseded
X borkdude/sci.impl.reflector 0.0.1 :parent-omitted
X borkdude/edamame 0.0.11-alpha.27 :parent-omitted
. rewrite-clj/rewrite-clj 0.6.1
X org.clojure/tools.reader 1.2.2 :older-version
hiccup/hiccup 1.0.5
org.apache.commons/commons-text 1.9
. org.apache.commons/commons-lang3 3.11 :newer-version
com.google.guava/guava 30.0-jre
. com.google.guava/failureaccess 1.0.1
. com.google.guava/listenablefuture 9999.0-empty-to-avoid-conflict-with-guava
. com.google.code.findbugs/jsr305 3.0.2
. org.checkerframework/checker-qual 3.5.0
X com.google.errorprone/error_prone_annotations 2.3.4 :older-version
. com.google.j2objc/j2objc-annotations 1.3
datalevin/datalevin 0.4.31
. org.clojure/tools.cli 1.0.206 :newer-version
. borkdude/sci 0.2.4 :newer-version
. borkdude/sci.impl.reflector 0.0.1
. borkdude/edamame 0.0.11-alpha.29 :newer-version
X org.clojure/tools.reader 1.3.4 :older-version
X com.cognitect/transit-clj 1.0.324 :use-top
. nrepl/bencode 1.1.0
. com.taoensso/nippy 3.1.1
X org.clojure/tools.reader 1.3.4 :older-version
. com.taoensso/encore 3.9.2
X org.clojure/tools.reader 1.3.3 :older-version
. com.taoensso/truss 1.6.0
. org.iq80.snappy/snappy 0.4
. org.tukaani/xz 1.8
. org.lz4/lz4-java 1.7.1
. persistent-sorted-set/persistent-sorted-set 0.1.2
. org.graalvm.nativeimage/svm 21.0.0.2
. org.graalvm.nativeimage/svm-hosted-native-linux-amd64 21.0.0.2
. org.graalvm.nativeimage/svm-hosted-native-darwin-amd64 21.0.0.2
. org.graalvm.nativeimage/svm-hosted-native-windows-amd64 21.0.0.2
. org.graalvm.sdk/graal-sdk 21.0.0.2
. org.graalvm.nativeimage/objectfile 21.0.0.2
. org.graalvm.compiler/compiler 21.0.0.2
. org.graalvm.nativeimage/pointsto 21.0.0.2
. org.graalvm.compiler/compiler 21.0.0.2
. org.graalvm.truffle/truffle-nfi 21.0.0.2
. org.graalvm.truffle/truffle-api 21.0.0.2
. org.graalvm.truffle/truffle-nfi-native-linux-amd64 21.0.0.2
. org.graalvm.truffle/truffle-nfi-native-linux-aarch64 21.0.0.2
. org.graalvm.truffle/truffle-nfi-native-darwin-amd64 21.0.0.2
. org.graalvm.compiler/compiler 21.0.0.2
. org.graalvm.sdk/graal-sdk 21.0.0.2
. org.graalvm.truffle/truffle-api 21.0.0.2
. org.lmdbjava/lmdbjava 0.8.1
. com.github.jnr/jnr-constants 0.9.15
. com.github.jnr/jnr-ffi 2.1.15
. com.github.jnr/jffi 1.2.23
. com.github.jnr/jffi$native 1.2.23
. org.ow2.asm/asm 7.1 :newer-version
. org.ow2.asm/asm-commons 7.1
. org.ow2.asm/asm 7.1
. org.ow2.asm/asm-tree 7.1
. org.ow2.asm/asm-analysis 7.1
. org.ow2.asm/asm-analysis 7.1
. org.ow2.asm/asm-tree 7.1
. org.ow2.asm/asm-tree 7.1
. org.ow2.asm/asm 7.1
. org.ow2.asm/asm-util 7.1
. org.ow2.asm/asm 7.1
. org.ow2.asm/asm-tree 7.1
. org.ow2.asm/asm-analysis 7.1
. com.github.jnr/jnr-a64asm 1.0.0
. com.github.jnr/jnr-x86asm 1.0.2
binaryage/devtools 1.0.3
re-frame/re-frame 1.2.0
. reagent/reagent 1.0.0
X cljsjs/react 17.0.1-0 :excluded
X cljsjs/react-dom 17.0.1-0 :excluded
X cljsjs/react-dom-server 17.0.1-0 :excluded
. net.cgrand/macrovich 0.2.1
X org.clojure/tools.logging 1.1.0 :use-top
com.cognitect/transit-clj 1.0.324
. com.cognitect/transit-java 1.0.343
X com.fasterxml.jackson.core/jackson-core 2.8.7 :older-version
. org.msgpack/msgpack 0.6.12
. com.googlecode.json-simple/json-simple 1.1.1
. org.javassist/javassist 3.18.1-GA
X commons-codec/commons-codec 1.10 :older-version
. javax.xml.bind/jaxb-api 2.3.0
nano-id/nano-id 1.0.0
lambdaisland/glogi 1.0.106
org.slf4j/slf4j-api 1.7.30
metosin/reitit-frontend 0.5.13
. metosin/reitit-core 0.5.13
. meta-merge/meta-merge 1.0.0
ch.qos.logback/logback-classic 1.2.3
. ch.qos.logback/logback-core 1.2.3
X org.slf4j/slf4j-api 1.7.25 :use-top
ring/ring-mock 0.4.0
X cheshire/cheshire 5.8.1 :older-version
X ring/ring-codec 1.1.1 :older-version
org.slf4j/log4j-over-slf4j 1.7.30
X org.slf4j/slf4j-api 1.7.30 :use-top
ring/ring-core 1.9.3
. ring/ring-codec 1.1.3 :newer-version
. commons-codec/commons-codec 1.15 :newer-version
. commons-io/commons-io 2.6
. commons-fileupload/commons-fileupload 1.4
X commons-io/commons-io 2.2 :older-version
. crypto-random/crypto-random 1.2.0
X commons-codec/commons-codec 1.6 :older-version
. crypto-equality/crypto-equality 1.0.0
world.convex/convex /Users/pedro/Developer/convex-dev/convex-web/convex.jar
. org.apache.commons/commons-lang3 3.11
http-kit/http-kit 2.5.3
Let me try
@pedrorgirardi I suspect your error message has to do with deps in datalevin, it seems it pulls in GraalVM SVM: https://github.com/juji-io/datalevin/blob/4e699c5a45cc0013420b70afdf5dcb48199c25e1/project.clj#L35
Yeah, that's a good point. Let me see if I can simply ignore it because I'm embedding Datelevin in my app.
And @thheller, 2.12.4 works fine too.
I think he only needs those deps when he compiles a native image: https://github.com/juji-io/datalevin/blob/ab421c34b9abee61ef574a57fb1c75f9033fbba2/native/src/java/datalevin/ni/Lib.java so I think it's worth pointing that out to him and try to get him to move the dep to a profile
@pedrorgirardi you can try manually adding [org.graalvm.js/js "21.1.0"]
and [org.graalvm.js/js-scriptengine "21.1.0"]
. maybe those fix it too (newer versions than shadow-cljs currently uses)
Hm, I tried tried:
datalevin/datalevin {:mvn/version "0.4.31"
:exclusions [org.graalvm.nativeimage/svm]}
but Daletinv complains about a ClassNotFound.Will add the dependencies @thheller.
Yes @borkdude you right, that's what I have in my classpath
org.graalvm.nativeimage/svm 21.0.0.2
@huahaiy Please read this discussion when you are awake :) - there might be a way to exclude the graalvm specific deps in datalevin as a JVM lib
This is needed because I am using a GraalVM method to detect if we are running in GraalVM, which would use GraalVM specific binding for LMDB. Is there another reliable way to detect this?
bb -e '(clojure.pprint/pprint (into {} (System/getProperties)))'
{"babashka.version" "0.4.1-SNAPSHOT",
"org.graalvm.nativeimage.kind" "executable",
"path.separator" ":",
"user.dir" "/Users/borkdude/dre/DocSearch/app",
"java.vm.specification.vendor" "Oracle Corporation",
"java.vendor.url" " ",
"java.specification.name" "Java Platform API Specification",
"line.separator" "\n",
"java.vm.version" "GraalVM 21.0.0 Java 11",
"java.vendor" "Oracle Corporation",
"java.specification.vendor" "Oracle Corporation",
"java.vm.specification.version" "11",
"java.io.tmpdir" "/var/folders/2m/h3cvrr1x4296p315vbk7m32c0000gp/T/",
"java.class.path" "",
"java.vm.vendor" "Oracle Corporation",
"org.graalvm.nativeimage.imagecode" "runtime",
"java.vm.name" "Substrate VM",
"java.version" "11.0.10",
"os.arch" "amd64",
"user.home" "/Users/borkdude",
"java.specification.version" "11",
"java.ext.dirs" "",
"sun.jnu.encoding" "UTF-8",
"sun.arch.data.model" "64",
"java.class.version" "55.0",
"file.encoding" "UTF-8",
"os.name" "Mac OS X",
"os.version" "10.14.6",
"jdk.lang.Process.launchMechanism" "FORK",
"file.separator" "/",
"java.vm.specification.name" "Java Virtual Machine Specification",
"java.endorsed.dirs" "",
"java.library.path" "",
"user.name" "borkdude"}
@huahaiy You can also make a top-level variable that captures one of your own environment variables during graalvm compilation
@pedrorgirardi GraalVM dependencies are removed from Datalevin 0.4.34 JVM library
That’s great! Will upgrade to the latest version. Thank you @huahaiy .
And thank you once again for your help @borkdude . Really appreciated!
Will do.
this is one of those situations where I recommend keeping your CLJS setup separate from your CLJ setup. way too annoying to deal with dependency conflicts such as this
Tests are passing with org.graalvm.js/js {:mvn/version "21.1.0"}
, will try to upgrade Shadow CLJS now.
@thheller I think this shouldn't have happened in the first place, probably both dependencies should be opt-in
That's a good idea!
But this fixed it
org.graalvm.js/js {:mvn/version "20.1.0"}
org.graalvm.js/js-scriptengine {:mvn/version "20.1.0"}
daily fun: I am doing something wrong and hot reload results in an infinite loop eating up all my memory
Holding Code references in State
I am generating the UI, kinda a must to hold it in the state at some point.
that likely is an invalid reference. holding on to some state does not cause an infinite loop
it is an invalid reference according to some stack trace snippets, but I don't really understand what it says, and I am sure it's me doing the incorrect thing not some bug in the tools I use
Uncaught TypeError: Cannot read property 'cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3' of null
yes, thank you, I understand what you mean and it fits very well, I can easily imagine that react runs some piece of code that references to the old queue before the hot reload
> shadow-cljs
is rather strict about namespace references
dunno, without the linter I wouldn't know half my imports are missing : D
put on nil. I thought that because the page is reloading out of order, some react registered thing on the callstack sees the channel I am putting on as nil, because it was removed from under it. So I defined the channel with defonce not def.
but really, the bigger issue is that somehow the interaction between shadow-cljs hot reload and my react code results in a memory leak and kills my browser process
it started when I pust unsub and close into the return functions of my react useEffect hooks, before that I only got the usual memory leak message from react that i am trying to do something with unmounted state, and I thought I am fixing something, but actually managed to make it worse
and I think the use-layout-effect is wrong, looks like it is missing a wrapping (fn [] ...)
also you are always recur'ing, so there is never a check whether it should stop or not
my understanding was that inside go-loop, <! is blocking, if I close the channel, it should not call recur
I am following a dynamic export (https://shadow-cljs.github.io/docs/UsersGuide.html#_dynamic_exports) to emit code to be used as node libraries and one of my forms is a defmacro. I currently get an error when I compile
the code as Can't take the value of macro ...path-to-var
what do I need to do here?
I made the code available online https://github.com/wandersoncferreira/respondent/blob/c420359ca838c510d0183be3452c293d137cd9b2/src/respondent/core.cljc#L127 this is the macro I want to export
@iagwanderson: I believe you need a (:require-macros [respondent.core])
in a respondent/core.cljs file, it requires the macros from its own namespace. I haven't done it in a .cljc file, but I guess you can just add it to the top there as well for :cljs
.
I tried to add
#?(:cljs (:require-macros [cljs.core.async.macros :refer [go go-loop]]
[respondent.core :refer [behavior]]))
to the top and didnt work@iagwanderson https://code.thheller.com/blog/shadow-cljs/2019/10/12/clojurescript-macros.html missing the self-require as oliver said
I will read the post first.. interesting bit already: > > I strongly recommend writing your macros in 2 separate files until you feel comfortable with that. I still do it for 100% of my macros.
Thanks for help @oliver and @thheller... getting closer to the answer here.. I do not have the error while compiling, but when I run the node.js script using the library it gives me undefined
for the macro https://github.com/wandersoncferreira/respondent/blob/main/src/respondent/behavior.cljs
@thheller I might have found the issue. I believe the first implementation was already good. However, if I try to refer to my macro anywhere other than in the first position of a form I get the same error Can't take value of macro..
.. I tried two things 1) calling my macro inside #js {:behavior (behavior)}
export map and it worked! and 2) added (println (identity behavior))
to the code and got the same error Can't take value of macro..
.. maybe I cannot export macros ?
I need my ClojureScript SPA to know of URL that differs from when I develop (run locally) and when the app gets deployed into production. I've been scrolling through the documentation... but nothing stands out to me as useful. I assume this is a quite common need, so I've come to conclusion that I just don't have the right terminology to find it. Can anyone give pointers?
I did stumble over shadow-env
but it seemed overly complicated so I assumed there was a simpler (better?) way.
maybe let a single value point to a file path that gets read/included... then the file path points to an edn file?
hmmm :thinking_face: but it should all happen on build time.
Let's see if anyone else pitches in with ideas 😄
your question really is a little vague. there are about hundreds of ways to do this, it really depends on your app and how you want to do it. :closure-defines
would be the build-config driven variant. see also https://shadow-cljs.github.io/docs/UsersGuide.html#_release_specific_vs_development_configuration