This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-08
Channels
- # aws (3)
- # beginners (126)
- # boot (19)
- # cider (31)
- # cljs-dev (324)
- # clojure (96)
- # clojure-boston (2)
- # clojure-denver (9)
- # clojure-dusseldorf (2)
- # clojure-greece (4)
- # clojure-italy (5)
- # clojure-losangeles (1)
- # clojure-spec (18)
- # clojure-uk (59)
- # clojurebridge (1)
- # clojurescript (184)
- # community-development (29)
- # cursive (2)
- # datascript (2)
- # datomic (5)
- # emacs (1)
- # figwheel (6)
- # fulcro (270)
- # hoplon (2)
- # jobs (1)
- # jobs-discuss (1)
- # keyboards (2)
- # leiningen (2)
- # london-clojurians (2)
- # luminus (10)
- # mount (1)
- # off-topic (26)
- # onyx (8)
- # other-languages (1)
- # parinfer (1)
- # protorepl (6)
- # re-frame (23)
- # reagent (61)
- # reitit (5)
- # shadow-cljs (100)
- # spacemacs (3)
- # sql (19)
- # unrepl (90)
- # vim (25)
@thheller regarding testing I was really wanting to check that I couldn’t ‘program’ that behaviour in some way from the available tools
the chokidar
thing works well enough and just just an yarn add chokidar-cli --dev
away
@raymcdermott what do you usually use to do this? maybe I can steal some ideas.
yeah same here. I do that all the time for CLJ. probably not doing many tests for CLJS since I can't do it there
what I can offer you is that I just add a simple option that just runs node when a build completes
@raymcdermott in 2.2.6
you can do
{:target :node-test
:autorun true
:output-to "out/demo-test-node/script.js"}
you can use :ns-regexp "some.ns-test"
to only run the test ns you care about (instead of all -test
)
there is some backstory to testing https://github.com/thheller/shadow-cljs/issues/57. so I had the autorun
thing before but removed it because it didn't make sense in many other testing scenarios (eg. browser-test, karma). but now that they are different targets it really makes sense for :node-test
the thing I'm working on is a gui that lets you select which test-ns or singular test you care about
oh wait shadow-cljs watch script
would not be enough. shadow-cljs watch script test
would. or second shadow-cljs watch test
process
what also works is making a REPL command in Cursive for (shadow.cljs.devtools.api/compile :test)
@raymcdermott btw :optimizations
only applies to release
builds. so :none
is actually invalid. :none
is enforced for watch
and compile
always so you do not need to set it to :none
ever.
shadow-cljs - error ENOENT: no such file or directory, open '.shadow-cljs/logging.properties'
if I only use semantic-ui (seems to work well with the default compiler) would you still recommend going with shadow-cljs for the project ?
@thheller we previous discussed not embedding shadow into a running project, If I used something like https://github.com/RutledgePaulV/clj-embed except without the isolation (you can access cljs/clj files from the parent classloader) do you see any reason why this would be ill advised?
its perfectly fine to embed shadow in a project. I just don't recommend doing so since you are then in charge of resolving conflicts and such and the tool can't help you with that.
clj-embed you might as well start a new JVM since you'll be paying the full startup cost for the isolation
The benefit is simpler running for developers, without the conflicts. The startup cost isn't what I'm avoiding, it's the complex "start this, then that". Hmm, I will have to ensure that piggieback is happy to work cross-classloader. I'm not certain it will be.
start one thing for clojure and another thing for clojurescript seems perfectly reasonable
Sorry, I was referring to being able to access the parent classloader. I know clojure.lang.RT must be isolated.
I think we're misunderstanding each other. I'm referring to having clj-embed have an embedded version of clojure, but being able to access files on the classpath of the parent, so that cljs compilation can happen as normal.
It doesn't, but the code is relatively short, and changing that is simply switching a flag.
if you expose the parent classloader you have to deal with the same conflicts you'd have when just embedding
The different version of immutant isn't loaded into the nested container, as the local one gets priority.
Essentially, the idea is to minimize friction to running the project. Having the cljs load with cider's jack-in is very useful for emacs users who are used to that. Same for ProtoREPL's "Start REPL" etc.
I honestly don't know what a good approach for all of this is. All tools seem to treat CLJS like CLJ but it just isn't the same. Things work differently in almost all aspects.