This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-05
Channels
- # announcements (13)
- # aws (1)
- # bangalore-clj (4)
- # beginners (66)
- # boot (11)
- # calva (27)
- # cider (27)
- # clj-kondo (76)
- # cljdoc (6)
- # cljs-dev (38)
- # clojars (3)
- # clojure (143)
- # clojure-dev (2)
- # clojure-europe (6)
- # clojure-greece (10)
- # clojure-italy (10)
- # clojure-nl (5)
- # clojure-norway (2)
- # clojure-sweden (1)
- # clojure-uk (19)
- # clojurescript (49)
- # cursive (13)
- # datomic (14)
- # duct (6)
- # figwheel-main (3)
- # fulcro (31)
- # funcool (7)
- # jobs (3)
- # keechma (142)
- # liberator (1)
- # off-topic (15)
- # om (2)
- # reagent (1)
- # reitit (2)
- # remote-jobs (1)
- # rewrite-clj (73)
- # shadow-cljs (21)
- # spacemacs (18)
- # sql (5)
- # tools-deps (10)
- # yada (1)
is there any way to wrap CORS to compojure-api ? i tried wrap-cors from ring-cors lib and seems didnt work.
I have one issue left with Cider/Figwheel that bothers me and I can't seem to find a solution googling for it, maybe someone can help me. When I start a Figwheel-REPL via Cider it does not open the page in the browser - and that leads to an nrepl sync request timeout unless I nil that variable. And then I still need to manually open the page after an unknown amount of time. Does anyone know what to do about that? The Cider-Docs for CLJS explicitly state "open a browser and go to the figwheel url", so it kind of seems like this is expected behaviour.
Okay, it says the same in the figwheel wiki. But I'd guess there must be something like a hook after Cider-REPL-initialization and a way for Emacs to open a tab in the browser ...
in the latest CIDER, when I run cider-jack-in-clojurescript
it does ask if I want to open a browser window
I am using Om and I've encountered quite a peculiar case. I had a component that wraps a reify
such as
(defn funny-view [funnies owner] (let [...] ... (reify om/IRenderState (render-state [...]...)
.
Inside the let
I had a list [my-list-of-jokes [:j1 :j2]]
and whenever I changed the state in the parent component, the list would replicate [:j1 :j2 :j1 :j2]
. I added some println
's as sanity checks in the let
and I noticed that they would output many times but println
's in the render
function would output the expected number of times. The replication would only occur once after initial page load and first update then after it would not happen. I know this was occurring because of the let wrapping and after moving that logic into the init-state
everything works as it should. I am just curious on the why it was happening. Any ideas?
@mario.cordova.862 there's an Om specific channel btw
sometimes when there'll be a warning like can't take the value of macro cljs.core/and
or can't take the value of macro cljs.core/or
if I write something like this:
(when (or x y) ;; x and y come from arguments
....)
i believe there's a bug in figwheel-main that is patched but perhaps not released yet?
can go to a snapshot version of figwheel-main or downgrade cljs: https://github.com/bhauman/figwheel-main/issues/165
https://github.com/bhauman/figwheel-core/pull/2 for better description and fix from @mfikes
i wonder if @bhauman is around and could cut a release? this has come up a bit in the past is the only reason i recognized it
Is there a way in ClojureScript to control the reader so that it would read the decimal types to something else than JavaScript number? Something like (cljs.reader/read-string "{:a 1.01M}") => {:a [:decimal "1.01"]}
?
custom reading is not really supported in Clojure and thus not supported in ClojureScript
you can of course probably hack around and figure out how to make it work - but there is not official / sanctioned way - and there won't be
Ok cool. Thanks
I am attempting to test using lein doo nashorn test
. I have a dependency to Firebase which I satisfy in the browser by simply importing the Firebase <script>
within my index.html
before running my compiled test.js
script. However, in Nashorn the index.html
is not being read from (it only runs a javascript file). I was wondering if there is a way to grab the Firebase script before running my test script in Nashorn?
I guess I could also wget
all the scripts I need, and then concat them to the front of my test.js
script... Seems dubious.
You know, maybe this is dumb, maybe I should just run javascript test from within my browser, seems odd not to have the immediate feedback on the cli though...
you can use a build that executes a specific runner ns to give you immediate feedback. I like using that in conjunction with https://github.com/bhauman/cljs-test-display
I think both figwheel and shadow-cljs have some amount of automation around setting that up
you can also use something like karma, which will execute your tests in a headless environment and give you output via the CLI. we use this for CI purposes
not sure how to set that up for figwheel, but shadow-cljs has a build target specifically for that
Thanks. So I also tried Karma, but the error messages are less than great so far. I mean they are there, but there is so much noise about the browser and all that, feels like it might only be appropriate for actual integration, not for allowing me to develop against it.
Finally, is shadow-cljs over-reaching for this problem? I kind of though shadow-cljs was for integrating external javascript that just wasn't going to play very well with the Clojurescript compilation process? My knowledge of this is light, so could be entirely wrong.
it does what a combination of leiningen and figwheel and clojurescript, or deps.edn and Clojure CLI and figwheel and clojurescript, do
e.g. managing dependencies, configuring builds, compiling code, hot loading changes during development