Fork me on GitHub
#clojurescript
<
2017-03-13
>
akiroz08:03:10

hey guys, I've just ran into this really strange problem where I'm building in :optimizations :none and one of my 3rd party modules isn't loaded on Firefox (linux, 51). The module is compiled, it's declared in cljs_deps.js and it works perfectly in chromium.... Looking at Firefox's network tab, this module was never even requested by the browser... Any ideas? I've been looking into this problem for hours now.

akiroz08:03:34

ok, I was just being stupid... it was a google analytics module and my browser plugin blocked it (facepalm) which in turn crashed the whole app because of undefined stuff.

credmp10:03:45

@superstructor sorry, had to leave with family business, I am running the same CLJS version. I did a lein ancient upgrade on the project, the library that initiates the failure is the reagent one. I am thinking it is actually a react change that was done...

superstructor10:03:20

@credmp it may be relevant to know that I exclude react/react-dom from reagent dep as it is included for us in Material-UI 0.17.0 (via cljs-react-material-ui) which we also use.

credmp10:03:01

mmm I will give that a try, perhaps there is something in de react changes that introduces it

credmp10:03:32

The setup I have is quite straightforward (standard), so probably more people will run into it as they update

hkjels13:03:43

What is the equivalent to resolve in ClojureScript?

dnolen14:03:07

@hkjels doesn’t exist, there are no real vars

hkjels14:03:15

@dnolen OK. Then how do I pass a function to a macro written in cljc

dnolen14:03:00

you cannot pass ClojureScript runtime fns to ClojureScript macros written in Clojure

hkjels14:03:29

That makes sense

joshkh14:03:42

speaking of cljs and macros, what's the difference between :require-macros and :refer-macros?

hkjels14:03:55

I just now realize that what I’m trying to do might be possible without a macro in the first place

joshkh14:03:10

(:require [dommy.core :refer-macros [sel1]]) vs (:require-macros [cljs.core.async.macros :refer [go]])

dnolen14:03:35

@joshkh the former is sugar for the later

joshkh14:03:02

oh, fantastic, thanks dnolen

hkjels14:03:45

kind of weird that it’s not just :refer like in clojure. [somelib :refer [macro] instead of [somelib #?(clj :refer :cljs :refer-macros) [macro]]

not-raspberry15:03:59

Has anyone used some app-oriented UI toolkits, e.g. cljsjs/material-ui?

not-raspberry15:03:02

I'm looking for something to replace bootstrap with.

not-raspberry15:03:50

I'm no designer, I only want components to build app-ui, not impressive html5 "experiences".

rauh15:03:01

@not-raspberry I'm using getmdl from google right now and I really like it. Works and looks great on mobile and desktop.

zak16:03:47

@not-raspberry I'm currently building something using cljs-react-material-ui

qqq17:03:03

what's the best editor for "being able to be extended in clojurescript" ?

hkjels17:03:47

@qqq there's lighttable

thheller17:03:56

@qqq playing with https://github.com/Microsoft/monaco-editor at the moment, seems ok so far

thheller17:03:01

only did the basics though

thheller17:03:38

CodeMirror works as well, you will be writing a bunch of native JS interop no matter what

mruzekw18:03:21

Has anyone ever encountered a RangeError maximum call stack exceeded involving core.async and figwheel?

thheller18:03:56

given that it is doing a topo sort it might be a circular dependency?

mruzekw18:03:30

I’ve checked, but I’ll check again

credmp18:03:54

@superstructor I tracked down the problem. In https://github.com/reagent-project/reagent/issues/275 there is a mention of the rename of ReactDOM to React.DOM. So reagent upgraded to 15.4, in lein deps :tree I noticed that devcartswas pulling in an older version. I added an :exclusions for it and the problem was fixed.

mruzekw18:03:14

I’ve checked for circular dependencies, have found none. I even rollback to a working commit and I’m still getting the error

shaun-mahood18:03:45

@mruzekw: What versions of figwheel and core.async are you using? Every time I’ve run into weird problems with figwheel some combination of versions, lein clean or computer restart have fixed them for me - but that’s on Windows so restart is kind of assumed 🙂

mruzekw18:03:03

[lein-figwheel “0.5.9”] [figwheel-sidecar “0.5.9”]

mruzekw18:03:04

[org.clojure/clojurescript "1.9.473" :scope "provided"]

mruzekw18:03:13

I’ll try your suggestion

shaun-mahood18:03:18

Core async version?

mruzekw19:03:32

I thought that came bundled with CLJS

shaun-mahood19:03:46

Compare it to what comes with lein new figwheel, it includes core.async specifically. Might be the problem if it’s missing and needs to be there.

mruzekw19:03:39

Well, did lein clean, restarted both server and figwheel, reapplied stashed changes, and all is well again

mruzekw19:03:44

Wish I knew what happened

shaun-mahood19:03:22

@mruzekw: I know the feeling 🙂

grav20:03:38

@darwin thanks re: :print