Fork me on GitHub
#shadow-cljs
<
2022-06-07
>
dumrat09:06:47

shadow-cljs does not update page when my public/index.html is changed. Do I need to do something to get it to hot reload?

thheller09:06:27

html is not looked at or reloaded. you have to do that yourself. as in press f5 😉

dumrat09:06:10

oh ok. Got it.

pinkfrog14:06:47

Shadow automatically installs these packages. what’s the potential cause?

thheller16:06:08

@i your CLJS dependencies declaring them as dependencies via :npm-deps in deps.cljs files. you can skip the installation by setting :npm-deps {:install false} in shadow-cljs.edn

pinkfrog23:06:22

Possible to pinpint which library has such deps?

thheller09:06:50

well something using markdown I guess. in shadow-cljs clj-repl you can call (shadow.cljs.devtools.server.npm-deps/get-deps-from-classpath). that should tell you where it comes from

ag22:06:10

can someone help me figure out this thing? I have some cljs tests :target :karma. They are running fine locally, but for whatever reason npx shadow-cljs compile :test failing on GitHub Actions. Here's some log output:

##[group]Run npx shadow-cljs compile :test
 shell: /usr/bin/bash -e {0}
 env:
   JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/18.0.1-10/x64
   CLOJURE_INSTALL_DIR: /opt/hostedtoolcache/ClojureToolsDeps/latest.0.0-3-6/x64/lib/clojure
 ##[endgroup]
 shadow-cljs - config: /home/runner/work/iroh-front-end/iroh-front-end/shadow-cljs.edn
 shadow-cljs - starting via "clojure"
 WARNING: Use of :main-opts with -A is deprecated. Use -M instead.
 Unknown option: "-m"
 Unknown option: "--npm"
 
 USAGE:
 
 clj -m cognitect.test-runner <options>
 
   -d, --dir DIRNAME            Name of the directory containing tests. Defaults to "test".
   -n, --namespace SYMBOL       Symbol indicating a specific namespace to test.
   -r, --namespace-regex REGEX  Regex for namespaces to test.
   -v, --var SYMBOL             Symbol indicating the fully qualified name of a specific test.
   -i, --include KEYWORD        Run only tests that have this metadata keyword.
   -e, --exclude KEYWORD        Exclude tests with this metadata keyword.
   -H, --test-help              Display this help message
Clojure version is the same (via DeLaGuardo/[email protected]); shadow-cljs version is the same (`2.19.1`) - both in deps.edn and in package.json. jdk version is the same; node version is the same. Why is it failing?

ag00:06:08

I think I solved it. I moved shadow-cljs dependency to an alias, as described here: https://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn

thheller06:06:56

looks like :test has something like :main-opts ["cognitect.test-runner"] so can't use that with shadow-cljs and needs its own alias yes

thheller06:06:17

also should probably upgrade the tools.deps version. seems rather out of date.