This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
shadow-cljs reload issue
hi everybody, I started to work on a hobby project
and I thought I’ll try to solve it in clojurescript
I started with deps.edn
but when I needed to add npm dependencies I quickly realized that it is not really working, so I switched to shadow-cljs
the reloading worked with the standard clojure repl with deps.edn
but with shadow-cljs for some reason it does not
I am using the node-repl
and the way I am trying to reload my namespace:
(require 'announcement-notifier.parser :reload)
but the reloading simply does not work
this would be a CLI application
I guess I am doing something wrong, even though I was following the user guide (but that is 4 years old, so I guess it could be outdated)
nope, it evaluates the previous version all the time
I change something in the namespace, but I need to restart the whole repl to see the results
dunno. it should work fine but haven't tried it in forever. most editors issue a load-file
request and :reload
is rarely used
I am using doom-emacs but the cider has other issues 🙂
did you actually save the file before the require? and maybe give it a sec or so? could be that just the file on disk isn't updated before the require tries to read it?
that is a usual mistake, yes. 🙂 but I did
cider says the following error BTW:
WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it! (More information)
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 3.5.2 and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.Execution error (ExceptionInfo) at shadow.cljs.devtools.server.nrepl/shadow-cljs-repl (nrepl.clj:33).
shadow-cljs nREPL initialization failure!
Your nREPL client sent a wrong parameter. A keyword specifying the build-id is expected.
Instead got a #cljs.repl.node.NodeEnv{:host "localhost", :port 49500, :path nil, :socket #object[clojure.lang.Atom 0x36bfdec3 {:status :ready, :val nil}], :proc #object[clojure.lang.Atom 0x67298a26 {:status :ready, :val nil}], :state #object[clojure.lang.Atom 0x1a203ab9 {:status :ready, :val {:listeners 0}}], :debug-port nil}
and also a different error in the cider-error
buffer:
clojure.lang.ExceptionInfo: shadow-cljs nREPL initialization failure!
Your nREPL client sent a wrong parameter. A keyword specifying the build-id is expected.
Instead got a #cljs.repl.node.NodeEnv{:host "localhost", :port 49500, :path nil, :socket #object[clojure.lang.Atom 0x36bfdec3 {:status :ready, :val nil}], :proc #object[clojure.lang.Atom 0x67298a26 {:status :ready, :val nil}], :state #object[clojure.lang.Atom 0x1a203ab9 {:status :ready, :val {:listeners 0}}], :debug-port nil}
{}
can't comment on cider config issues but you need to configure it to use shadow-cljs
thanks, that is fine. if the REPL would start working that would be enough for me
feel free to open an issue with exact steps to reproduce. can't look into it right now and will forget otherwise
I’ll try to create a super-simple repro repo then
thank you anyways
thank you, will do!
should I create a shadow-cljs issue on GitHub?
oh, I just realized that you mentioned this already
Team,
I'm practicing CLJS. And stuck in using antd
react component. Posted my question https://stackoverflow.com/questions/73014241/converting-antd-formitem-to-reagent-hiccup. Any help along wtih rationale would be helpful.
Thanks a lot for taking time @U2FRKM4TW. Seems like that's still not working. Replied to your comment.
I checked the issue because I have used antd with reagent and as @U2FRKM4TW mentioned, it's very likely that the importing is the issue. If you are importing Icon from antd then I believe you are passing wrong params to it. Check out https://ant.design/components/icon/#Custom-SVG-Icon