This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-18
Channels
- # adventofcode (9)
- # alda (2)
- # babashka (89)
- # beginners (86)
- # bristol-clojurians (1)
- # calva (54)
- # chestnut (2)
- # cider (18)
- # clj-kondo (19)
- # clojure (160)
- # clojure-brasil (2)
- # clojure-europe (6)
- # clojure-italy (8)
- # clojure-nl (46)
- # clojure-spec (52)
- # clojure-uk (45)
- # clojured (4)
- # clojuredesign-podcast (11)
- # clojurescript (15)
- # core-async (50)
- # datomic (41)
- # devops (3)
- # emacs (10)
- # fulcro (95)
- # graalvm (11)
- # graphql (3)
- # kaocha (1)
- # luminus (1)
- # malli (4)
- # off-topic (13)
- # overtone (3)
- # pathom (8)
- # re-frame (13)
- # reitit (10)
- # shadow-cljs (83)
- # spacemacs (2)
- # specter (9)
- # tools-deps (3)
- # vim (2)
Just wasn’t sure what it was for. Saw it mentioned in the guide and saw it in a few projects
I have an autotest build config that looks like this:
:test
{:target :node-test
:output-to "target/test/node-tests.js"
:autorun true
:ns-regexp "-test$"}
However shadow-cljs watch test
doesn’t actually run the tests:
~/d/c/lambda (master)> shadow-cljs watch test
shadow-cljs - config: /Users/colin/dev/cursive-site/lambda/shadow-cljs.edn cli version: 2.8.77 node: v12.1.0
shadow-cljs - connected to server
shadow-cljs - watching build :test
[:test] Configuring build.
[:test] Compiling ...
[:test] Build completed. (115 files, 13 compiled, 0 warnings, 7.68s)
If I ctrl-c the watch process and manually run the test script, the tests execute correctly. Is there something I’m missing here? Should I be able to watch
two builds from the same project simultaneously in separate terminals?
Oh, actually here’s what’s happening: I have another build from the same project I’m watching in another terminal. The tests are being run in that terminal, not the test one.
hey, anyone got any tips or pointers on setting up intellij with shadow-cljs. I use emacs, but I have a co-worker on Intellij just trying to get him up and running.
Do we need to make a dummy project.clj or something along those lines?
Hi, did you ha a look at that section in the docs ? 😄 https://shadow-cljs.github.io/docs/UsersGuide.html#_editor_integration
if you use cursive you’ll find guides in the docs here https://cursive-ide.com/userguide/leiningen.html
Another option is just to use lein w/ lein-shadow: https://gitlab.com/nikperic/lein-shadow https://github.com/day8/re-frame/blob/master/project.clj
shadow-cljs is an outstanding compiler etc to use as a library, but lein is just a much more robust build tool and you also get wider compatibility (e.g. Cursive).
I absolutely disagree. leiningen does jack shit for CLJS. it only makes sense for CLJ. it isn't even great for hybrid projects. a big chunk of problems people report are due to "mixing" CLJ and CLJS projects.
It turns out that it was actually working for my colleague off the bat, and he hadn’t realised! We were so sure we would have to do something fiddly 😄 😄 😄
@danieleneal you can run shadow-cljs pom
and import the generated pom.xml
in intellij for the project
ah great, thank you @thheller 🙂
We’ve got one unusually big file in the build report. It’s not especially interesting, as far as I can tell. Is this a red herring (like there’s always going to be one ‘big’ file, it’s just whichever file includes the big bits of cljs.core first) or something worth investigating - and if worth investigating - what’s the best way of diagnosing the culprit?
I’ll clean everything out and try again
might be a glitch
the actual js file looks small
I did shadow-cljs release app
then shadow-cljs run shadow.cljs.build-report app report.html
I don’t think I switched off advance, but then I didn’t switch it on - it usually defaults to advanced - perhaps I need to run the build report differently
this is my first time digging in with it
cool, yep good
I am bundling a couple of big json file, but they’re in a different files not the one that is marked as big in the report, and not required by that file
I’m on 2.8.67, gonna try updating
I’m on react native, so at the moment, in release, I’ve got one big index.js.
ah cool, good idea
look under output.js in that json file?
in .shadow-cljs/builds/the-build/dev/ana/my/file theres a json file with an output js key which has the relevant compiled js
but it’s only 20kb
it’s not advanced though
oh wait sorry I was looking under /release/ana
I wasn’t able to try the browser build route, I think I’d need to change some of my requires as lots are still using the old (js/require) style
but build reports are only really meant to browser builds anyways so maybe its just a bug
ah ok. I’ll see if I can get the browser build working
yeah, I know the core.async macros can make a lot of code, so I try to avoid them; we haven’t got any custom macros
yeah, my guess is that perhaps one of my inlined chunk sof data is showing up in the report as in a different file, maybe I’ll try taking that out and seeing if that makes it smaller
or just run shadow-cljs release app --pseudo-names
and try to figure it out from there
ah yeah - the catalog.cljs (which contains the big inlined file) is big in the js but small in optimized, but the pause_orders is big in optimized but small in js column
thanks for your help - looks like it’s ok bigness that is supposed to be there 🙂 just perhaps ended up in an odd place somehow
hi i'm trying to use shadow-cljs with expo and next.js. expo actually has built in support for next.js so, since shadow supports expo, wanted to see if I could make it work with nextjs too but running into namespace "good.math.Long" already declared
issue: https://github.com/thheller/shadow-cljs/issues/621
ideally i'd like to take advantage of nextjs web optimizations and ease of deployments
but wanted to ask, is it even recommended using them together? has anyone successfully gotten it working?