Alrighty, everything is up and running, but one thing is still weird. I ’d love to use my CIDER setup, and it kinda works but something times out:
[nREPL] Starting server via /usr/local/bin/clojure -Sdeps \{\:deps\ \{nrepl/nrepl\ \{\:mvn/version\ \"1.3.1\"\}\ cider/cider-nrepl\ \{\:mvn/version\ \"0.52.1\"\}\ cider/piggieback\ \{\:mvn/version\ \"0.5.3\"\}\}\ \:aliases\ \{\:cider/nrepl\ \{\:main-opts\ \[\"-m\"\ \"nrepl.cmdline\"\ \"--middleware\"\ \"\[cider.nrepl/cider-middleware\,cider.piggieback/wrap-cljs-repl\]\"\]\}\}\} -M:dev:cider/nrepl
[nREPL] server started on 63319
[nREPL] Establishing direct connection to localhost:63319 ...
[nREPL] Direct connection to localhost:63319 established
[nREPL] Establishing direct connection to localhost:63319 ...
[nREPL] Direct connection to localhost:63319 established
Connected! Hack and be merry!
error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op eval code (require 'shadow.cljs.devtools.api)) after 10 secs
error in process filter: Sync nREPL request timed out (op eval code (require 'shadow.cljs.devtools.api)) after 10 secsany pointers would be greatly appreciated 🙂
do i need cider.nrepl/cider-middleware if want to connect to the shadow-cljs repl, if i run npx shadow-cljs watch app in a separate terminal?
thats usually injected automatically when cider.nrepl is on the classpath
if you start the cider nrepl server then you need to add the shadow-cljs middleware instead
no clue if any of this is still accurate https://shadow-cljs.github.io/docs/UsersGuide.html#_using_deps_edn_with_custom_repl_intialization
https://shadow-cljs.github.io/docs/UsersGuide.html#_embedded_nrepl_server
got it working! For me it was not clear i should start a shadow-cljs repl (which auto matically also makes a clj repl) rather than a clojure-cli one with a sibling.
I see in the docs that "`:preloads` are only applied to development builds and will not be applied to release builds." What would be the best way to run a piece of code before everything else on a release build then? We're trying to call
uix.core/set-optimizations-enabled!
before any other CLJS gets run on our release build.oh, I can just use :init-fn
that appears to be a macro, so setting it in :init-fn is likely "too late", since that is in a namespace that is compile last
you can use :entries [your.tweaks in the build config. in the your.tweaks ns call the thing. if nothing else depends on that ns it should be "first", as in before any of your other application code
but looking at the code it appears to be enabled by default anyway?
https://github.com/pitch-io/uix/blob/master/core/src/uix/core.clj#L18
Hey! sorry missed your response. The issue is that we need to set optimizations-enabled? to false instead of the default true