This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-07
Channels
- # adventofcode (114)
- # announcements (3)
- # aws (5)
- # babashka (62)
- # beginners (111)
- # calva (4)
- # cider (20)
- # clara (5)
- # clj-kondo (1)
- # cljs-dev (9)
- # clojure (255)
- # clojure-europe (75)
- # clojure-italy (10)
- # clojure-nl (3)
- # clojure-norway (5)
- # clojure-uk (6)
- # clojuredesign-podcast (5)
- # clojurescript (34)
- # community-development (28)
- # conjure (1)
- # cursive (3)
- # data-science (1)
- # datavis (1)
- # datomic (4)
- # figwheel-main (1)
- # fulcro (14)
- # graalvm (1)
- # graphql (8)
- # integrant (4)
- # introduce-yourself (2)
- # jobs (2)
- # juxt (4)
- # kaocha (2)
- # malli (6)
- # membrane-term (53)
- # mount (2)
- # nextjournal (2)
- # off-topic (27)
- # pathom (11)
- # polylith (3)
- # portal (11)
- # reagent (4)
- # reitit (4)
- # remote-jobs (1)
- # reveal (14)
- # shadow-cljs (22)
- # tools-deps (24)
- # vim (6)
- # xtdb (19)
I get
-> build target: :browser stage: :flush
invalid :module-hash-names value :duude
{:tag :shadow.build.targets.browser/module-hash-names, :module-hash-names :duude}
ExceptionInfo: invalid :module-hash-names value :duude
shadow.build.targets.browser/hash-optimized-module (browser.clj:411)
shadow.build.targets.browser/hash-optimized-module (browser.clj:389)
shadow.build.targets.browser/hash-optimized-modules/fn--39881/fn--39882 (browser.clj:421)
?also for the cli arguments themselves order doesn't matter. they are all applied before the build is started.
I’m making an internal library project in a monorepo. We’re using deps.edn for dependencies and the library is then a local dependency. When working on it I find it the most convenient to use it from an app, so I can end-to-end test manually as I work. Is there a way I can make shadow-cljs auto-run the tests for the library while working like this? It rebuilds the app as I change stuff in the library implementation, but I can’t figure out how to make the same thing happen with the library tests…
@pez I assume putting a shadow-cljs.edn into the lib and running the tests there is not the answer you are looking for?
Well, that’s what I am doing now. It works. I was thinking it would be more convenient for my use case if the test-runner for the the “using” project would just pick up the tests of the library and run them as well. I might have misconfigured something when trying because only changes to the implementation of the library triggers shadow to rebuild, changes to the tests don’t…
(The misconfiguration is about my attempts to get the tests to run unified in the using app. I have the library tests auto-loaded with the separate test watcher way of doing things.)
I assume you are talking about a regular :node-test
or :browser-test
setup in the main project running as a watch
?
Yes, :node-test
. I have this:
main-project/shadow-cljs.edn
:
{:builds
{:app {,,,}
:test {:target :node-test, :output-to "target/test/test.js"
:autorun true}}
:deps {:aliases [:dev :test]}}
main-project/deps.edn
:
:deps {,,,
library/library {:local/root "../library"}
,,,}
library/deps.edn
:
{:paths ["src"]
:aliases {:test {:extra-paths ["test"]
:extra-deps {thheller/shadow-cljs {:mvn/version "2.16.7"}}}}}
(The extra-deps is for the separate test runner use case).since they are in the test
folder which is not on the classpath when loading in the main project since that doesn't activate the :test
alias
I would expect that it only activates those aliases for the project but not for any :local/root
dependencies
I have one more clue. In one of my “using” apps tests are in test/cljs
and trying this from there gives me a ExceptionInfo: Resource does not have expected namespace
error from shadow-cljs.