Fork me on GitHub

Hey all. I was wondering if it is possible to use together with shadow-cljs? I'm getting errors running lein doo about React components from node_modules being not found, so I'm suspecting it's not


no, its a leiningen plugin that directly uses the cljs compiler


Okay, thanks!


Is there some kind of lein plugin that'll make the whole testing thing - build the JS and run it with pre-configured runner? So that one does not have to run bunch of npx commands (well, actually 2, but still 😅 )


well there is :target :karma that a few people use


I'm using karma as well, but to run tests I've made shell script which does

npx shadow-cljs compile test
npx karma start --single-run
Is there a way to achieve similar outcome from within lein ?..


Sorry for such noobish questions 😅


What I mean is it'd be great to have a single entrypoint (a single command) to kick off the test run


I mean there are gazillion tools to solve that issue? Just a Makefile or npm "scripts" or whatever


or even just lein


or even just npx shadow-cljs compile test && npx karma start --single-run


Right. I ended up writing bb.edn to solve it with babashka 😊 Thanks for the pointers!

❤️ 1
Roman Liutikov12:07:10

getting the following error in 2.19.5, is that known?

Syntax error compiling at (shadow/build/data.clj:360:5).
No such var: ana/get-data-readers


Hmm, also on 2.19.4.


Including [org.clojure/tools.analyzer "1.1.0"] on the clojure side of deps (in project.clj) solves it for me.


I'm guessing you are using deps.edn or project.clj? make sure you have the proper matching clojurescript versions?


should be 1.11.60


ana is cljs.analyzer. dujnno why adding tools.analyzer would do anything


Ohhh, huh. Wild.


I run shadow-cljs watch app --debug and get runtime error in console without lineNumber and filename, is it possible to configure shadow-cljs to see it?


Added some compiler options, but it doesn't help

:dev        {:closure-defines  {"re_frame.trace.trace_enabled_QMARK_" true}
                             :compiler-options {:source-map   true
                                                :pseudo-names true
                                                :pretty-print true}


expand the arrow before "Uncaught" not the one before cljs$core$ExceptionInfo


that should have the proper stacktrace?


pseudo-names and --debug only applies to release builds, does nothing for watch


It seems that there is only reitit router


typically that error suggests that you are either not passing an argument you are supposed to pass


or the wrong type


s.chatAt suggests it expects a string somewhere


but you are maybe passing something else or just nil. looking at the code may suggest what might be wrong


I found the error in re-frame event handler, but I want to configure error message, if it possible, to easy find such errors


well there is no config for error messages. this is all there is.

Patrick Brown14:07:21

Accidentally posted this in CLJS, but it belongs here. Sorry for the xpost. Howdy! Is there a simple way to do conditional code evaluation based on build id and not target? I’d like to evaluate code differently for different builds that have the same target… Something like. (:require #?(:build-1 [] :other-build [])) Where both namespaces contain the same vars, but different logic, yet both are for the same target env. It’s not the end of the world if I can’t, just curious.

Patrick Brown20:07:57

Oh, I get it! reader-features is open to anything. Cool feature!


hello, I have a project that is a library, I would like to make sure all the cljs and cljc files compile file, using the :target :browser I have to use the :entries to find the namespaces, but I would like for shadow to find all cljs and cljc files and try to compile all of then, what kind of build setup I can use to make this?


I guess if you only want to compile all and don't actually care about the output :npm-module is best? you can set a :ns-regexp "your.library" or whatever which will end up including all namespaces matching that?


the test targets can also do that

Patrick Brown16:07:09

FIX: Not a shadow issue. This error is caused by running ‘amplify pull’ using AWS Amplify. Check your includes, make sure you’ve pulled and that the pulled file is in the correct location in relation to your require. I’m having issues with my shadow config. I’m using version “2.19.5” with all the important deps matching clojars as outlined in I’m getting this error while running release. [:main] Compiling ... Execution error (AssertionError) at (resolve.clj:205). Assert failed: (map? rc) My instincts tell me it has something to do with webpack. But I’m lost. I remember having the same error once before and the solve being super simple, small, and dumb. But for the life of me I can’t remember what it was. Any help is BIG THANKS! CHEERS!


sorry, can't remember ever seeing this before