This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-19
Channels
- # aws-lambda (4)
- # beginners (62)
- # cider (20)
- # cljs-dev (9)
- # cljsrn (13)
- # clojars (3)
- # clojure (105)
- # clojure-brasil (1)
- # clojure-denver (1)
- # clojure-finland (4)
- # clojure-italy (23)
- # clojure-norway (1)
- # clojure-spec (6)
- # clojure-uk (56)
- # clojurescript (41)
- # cursive (10)
- # datomic (25)
- # emacs (23)
- # figwheel (2)
- # fulcro (133)
- # graphql (12)
- # hoplon (32)
- # instaparse (13)
- # keechma (1)
- # lein-figwheel (1)
- # luminus (1)
- # lumo (1)
- # nyc (2)
- # off-topic (34)
- # om (2)
- # onyx (10)
- # pedestal (8)
- # portkey (1)
- # re-frame (10)
- # reagent (26)
- # ring (8)
- # shadow-cljs (77)
- # spacemacs (4)
- # sql (8)
- # tools-deps (15)
- # vim (9)
The example works beautifully, and with the skeleton project.clj cursive picks everything up just fin
but when I try to use semantic-ui-react I get a "Uncaught ReferenceError: require is not defined"
@thheller Yesterday's problem shadow-cljs watch app
slow appear again: it takes a long delay before each of two Cache write: xxx/xxx.cljs
, but the times are not reported.
@emccue you are using ancient versions in the project.clj
. definitely upgrade all of them before continuing.
@cmal not really. each build has its own cache directory so they don't interfere with each other
I will keep one eye on this problem, and try to figure out what happens when it becomes slow.
currently the cache-write only logs when it completed, not when it started so I assume that the cache write itself is just slow since its not timed
can you check how large the .shadow-cljs/builds/app1/dev/ana/your/ns.cljs.cache.transit.json
is?
are you maybe running low on disk space? the OS might get into real trouble with the FS then
I will expand the timing log for cache reads/writes so get more accurate infos about that
How can I use alternative artifacts providing the same namespaces and API in dev and production, e.g. day8.re-frame/tracing and /tracing-stubs?
In leiningen it's generally done different :dependencies in each profile but that doesn't seem possible in shadow-cljs. Am I missing something?
@clojurians.net I think this approach is pretty terrible and yes with just standard shadow-cljs this is not possible
I will look into what exactly the re-frame trace stuff is doing and see if there isn't an alternative way
There's also https://github.com/philoskim/debux-stubs I'm not a great fan of it either, but it strikes me as the most reliable way to make sure that tracing/debugging code doesn't end up in a production build. It is theoretically possible to leverage Closure's dead code elimination for that, but I believe there have been issues with it in the past and it's quite a bit more messy and error prone.
devcards
does this via :devcards true
. this seems more suitable since its just a compiler options.
Yeah that does sound cleaner. In the meantime, for projects that do it the other way, I'm guessing this would be the way to go: lein with-profile +<dev/prod> run -m shadow.cljs.devtools.cli ...
@emccue how come you picked that particular version? is it still used in an example somewhere?
Is it possible to use preloads with :target npm-module
?
@colindresj no since there is no clearly defined entry they should be preloaded for
@thheller According to the shadow-cljs docs, i should be able to copy the some fulcro source file, place it in my own project matching the directory structure of where it would’ve been were it in fulcro, make some change, and it would be using that instead of the actual lib. It seems this file is being ignored. Are there any known gotchas about this? I’m specifically trying to work on fulcro.client.primitives.cljc
.
I’ll be going off to bed now. Dropping this message hoping to catch you during your day, because timezones.
@levitanong you mean fulcro/client/primitives.cljc
That’s what I thought @thheller. Any idea how I might integrate https://github.com/Day8/re-frame-10x into a storybook build?
@colindresj not sure what a storybook build is, but there’s an example of this usage on https://github.com/jacekschae/conduit
Storybook’s is a kind of like a react component dev environment @danielcompton. It’s a JS lib though, so I’ve been using the npm-module
shadow target to get my cljs code to work with it, but now want to include re-frame-10x and I’m having a little trouble
I tried just requiring the compiled re_frame_10x.preload
namespace, but it I get some react rendering errors when doing that, something about vbox
not returning a valid component
@colindresj I don't remember if it was possible to influence which files storybook loads. IIRC it is just looking for files with a regexp
Yeah, that’s what I did
And namespace-wise everything seems good, but then I run into that react rendering errror, so I feel like something’s up
Yeah, and just for testing I removed it and got the 10x warning telling me to set closure defines
So, I think that part’s good
That’s what I’m thinking, or vice versa
For reference, this is my error @danielcompton Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of day8.re_frame_10x.utils.re_com.v_box
@colindresj have you chosen the right version of re-frame which matches your React version?
If you can't get it working, open an issue with a reproduction
Ok, will do. Thanks