Fork me on GitHub
#clojurescript
<
2017-10-15
>
qle-guen08:10:35

hello, I'm using figwheel for a node.js server. When figwheel detects file changes, it says it loaded the right files, but it doesn't actually restart -main

qle-guen08:10:20

the (println "restarting") at the start of my -main function isn't showing

dominicm08:10:56

@qle-guen have you set on-jsload?

qle-guen08:10:20

@dominicm I never heard of that.

qle-guen08:10:56

doesn't seem like I would need that in a node.js environment

qle-guen08:10:09

I got (set! *main-cli-fn* -main)

dominicm09:10:37

I am not sure if figwheel will call that automatically

qle-guen09:10:12

well it's called the first time, but not when it reloads

qle-guen09:10:47

I don't know, it's from the leiningen template, it should work fine

dominicm09:10:56

yes, that's done by main-cli-fn

dominicm09:10:18

depending on what you're doing in main, you may or may not want it to be reloaded automatically. A safe default is not to I'd think.

qle-guen10:10:41

@dominicm so if main isn't reloading, what is?

qle-guen10:10:51

I'm confused

qle-guen10:10:05

isn't it the very purpose of figwheel?

dominicm10:10:54

the code itself being reloaded.

dominicm10:10:06

re-defining functions & such.

qle-guen10:10:14

no I definitely need to restart main

qle-guen11:10:22

Ok I'm finally using nodemon for that. Unexpectedly fast.

tomjkidd16:10:23

Anybody know how to intercept an onChange handler from a rum-component? I’m trying to create a mixin for validating input, and I have a Text component that I’m trying to “wrap” with extra functionality, but I can’t figure out if I have a way to get at the function.

rgdelato16:10:48

sorry for the repeat question since I'm pretty sure I've asked this before, but what are our options for auto-gen CSS classnames in CLJS-land? I'm aware of Roman's cljss, theller's shadow.markup and interop hacks like my own styled-classnames, but I thought there were others as well

tatut16:10:55

like stylefy

rgdelato16:10:01

just read through the README. yep, that's an example of one!

rgdelato16:10:12

do you have any experience using it?

tatut16:10:03

yes, a little

tatut16:10:17

it’s nice for reagent apps

wilkerlucio17:10:43

hello people, I'm trying to write a cljs library that needs to provide some externs

wilkerlucio17:10:58

but when I try to compile I'm always getting this:

wilkerlucio17:10:02

SEVERE: ERROR - Duplicate extern input: /Users/wilkerlucio/Development/oge-public/src/com/wsscode/oge/vendor/externs.js

Oct 15, 2017 3:56:17 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 1 error(s), 0 warning(s)
ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: /Users/wilkerlucio/Development/oge-public/src/com/wsscode/oge/vendor/externs.js at (unknown source) line (unknown line) : (unknown column)

wilkerlucio17:10:29

what does that error mean? I'm using deps.cljs, where I set the foreign-libs and the externs

wilkerlucio17:10:37

if I don't set the externs it compiles, but breaks on advanced

wilkerlucio17:10:54

when I add the path for the externs.js, which is just this:

wilkerlucio17:10:03

var parinferCodeMirror = {
  "init": function() {}
};

wilkerlucio17:10:11

the compilation breaks with the previous error

wilkerlucio17:10:40

can someone help me on how to properly setup the externs?

wilkerlucio17:10:05

this is my deps.cljs:

wilkerlucio17:10:17

{:foreign-libs [{:file     "com/wsscode/oge/ui/oge-mode.js"
                 :provides ["codemirror.oge"]
                 :requires ["cljsjs.codemirror"]}

                {:file     "com/wsscode/oge/vendor/parinfer.js"
                 :provides ["parinfer"]}

                {:file     "com/wsscode/oge/vendor/parinfer-codemirror.js"
                 :provides ["codemirror.parinfer"]
                 :requires ["parinfer" "cljsjs.codemirror"]}

                {:file     "com/wsscode/oge/vendor/d3.flameGraph.min.js"
                 :provides ["d3.flamegraph"]
                 :requires ["cljsjs.d3" "cljsjs.d3-tip"]}]
 :externs ["com/wsscode/oge/vendor/externs.js"]}

anmonteiro17:10:34

@wilkerlucio there’s a bug somewhere in JIRA to dedup externs

wilkerlucio18:10:49

humm, do we have some workaround for it?

anmonteiro18:10:03

Not that I’m aware

anmonteiro18:10:53

Do you have the cljsjs parinfer in your dependencies?

anmonteiro18:10:15

You’re probably unnecessarily duplicating some externs?

wilkerlucio18:10:30

no, I don't have that one

wilkerlucio18:10:34

it happens when I try to add my own externs

wilkerlucio18:10:39

otherwise it works fine

wilkerlucio18:10:08

I'll probably just change my calls to gobj/get things to get it going

wilkerlucio18:10:22

@anmonteiro and great talk at conj 🙂

flyboarder21:10:50

Hello, I recently relocated to Calgary, Alberta just poking around to see if there are any Clojurians who may want to do a Meetup sometime?