Fork me on GitHub
#luminus
<
2018-02-14
>
eoliphant17:02:33

hi, quick question, luminus projects are using struct as the default validation approach. Anyone have pros/cons on using it vs spec. I know ‘user friendly messages’ is at least one of the spec issues

timo09:02:57

@U380J7PAQ I was about to ask the same question. did you find anything about it?

feihong20:02:59

@kaosko should i file a bug report for this? basically, when i create a brand new project using lein new luminus demo +re-frame, then add resources/externs.js, the uberjar build fails to produce a functional app.js. and this is the recommended way of doing it in the [luminus docs](http://www.luminusweb.net/docs/clojurescript.html).

feihong20:02:48

@kaosko i forgot to mention that the build is bad whether or not i add resources/externs.js to the :externs section of the uberjar config

feihong21:02:57

@kaosko i just noticed now in the build output that lein actually complains if you name the file externs.js. the error message is:

WARNING: 1 error(s), 0 warning(s)
ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: /Users/fhsu/reference/buggy/resources/externs.js at (unknown source) line (unknown line) : (unknown column)

feihong21:02:25

the error message goes away if you rename externs.js to something else

kaosko23:02:12

@feihong.hsu perhaps resources/externs.js is the output for source externs. mine is at :externs ["resources/public/js/externs.js" "react/externs/react.js"] and works fine

yogthos23:02:54

Yeah I the compiler doesn't handle having multiple externs with the same name gracefully, and looks like there's a dependency that has externs.js

yogthos23:02:27

As a note, cljs compiler can do externs inference now as well, so you might be able to just use that

yogthos23:02:14

As a rule I tend to use the actual js library as the extern, instead of writing them by hand