Fork me on GitHub
#shadow-cljs
<
2019-07-29
>
anmonteiro00:07:07

I thought :closure-warnings was a thing

anmonteiro00:07:10

but not warnings

anmonteiro00:07:43

interesting how that doesn’t let you treat some warnings as errors

anmonteiro00:07:52

seems like a useful feature that could even be implemented upstream

thheller08:07:09

yeah :compiler-options {:warnings {:undeclared-var false}} would disable that warning

thheller08:07:45

currently it is just a boolean but adding :error to throw instead of warning would be pretty straightforward. just not sure if it breaks other places that only expect a boolean

hulunote10:07:07

I want import shadow-cljs compiled js in the react jsx file

hulunote10:07:20

but i get this Error

knubie15:07:49

I’m having some trouble with the closure-defines feature

knubie15:07:39

when i add something like {:closure-defines {my-app/FOO true}}, then try to use it somewhere, the compiler returns: Use of undeclared Var my-app/FOO

knubie15:07:26

I think I must be missing a step, or misunderstanding how it works

thheller15:07:04

(ns ) (goog-define FOO false)

thheller15:07:21

would be configured by :closure-defines { true}

knubie15:07:37

Even with (ns ) (goog-define FOO false) I still get that compilation error

thheller15:07:06

how do you use it then?

knubie15:07:16

I’m using it in a different namespace

thheller15:07:32

and that namespace has a (:require [ ...])?

thheller15:07:38

can't use it without a proper require

knubie15:07:44

ah, that’s probably it

knubie15:07:42

love shadow-cljs, I try to promote it whenever I can

👍 8
Karol Wójcik16:07:36

Do you know some of clojurescript cljs.test pretty printer with colorful expected actual structures which works seamlessly with shadow-cljs?

thheller19:07:23

@karol.wojcik I do not but let me know if you find one

Karol Wójcik20:07:37

@thheller Maybe you have some ideas how to integrate any of javascript frameworks with clojurescript? I'm trying to find a one which allows to call the test by it's name, because I doubt it can work another way.

thheller20:07:57

not a clue. I don't write a whole lot of tests 😛

kasuko20:07:46

I'm getting a strange error when I run npx shadow-cljs compile dev

kasuko20:07:53

shadow-cljs - config: /Users/victor/Ericsson/code/cenx/apps/frontend/eric-cenx-ui/shadow-cljs.edn  cli version: 2.8.41  node: v12.7.0
Execution error - invalid arguments to shadow.cljs.devtools.api/loading at (api.clj:1)

kasuko20:07:46

I only have a single build

thheller20:07:49

that is indeed weird given that var doesn't exist

kasuko20:07:56

{:dev {:target :browser
        :output-dir "resources/public/js/compiled/"
        :asset-path "/js/compiled"
        :modules {:app {:entries [epiphany.core]}}}}

thheller20:07:47

does npx shadow-cljs clj-repl work?

kasuko20:07:51

Then it outputs the above report

kasuko20:07:15

Nope, clj-repl does the same thing

wilkerlucio20:07:43

I just got an error that I found a bit bizarre, this is what I see:

------ ERROR -------------------------------------------------------------------
 File: /.../common/ui/layout.cljs:572:26
--------------------------------------------------------------------------------
 569 | 
 570 | (def css-button
 571 |   {:background-color "transparent"
 572 |    :border           "1px solid #c49dc9"
--------------------------------^-----------------------------------------------
.../common/ui/layout.cljs [line 572, col 26] Invalid number: 1px.

wilkerlucio20:07:49

does that makes sense to anyone?

thheller20:07:45

@wilkerlucio verify that " is actually ". I seen all sorts of weird stuff when copying " from skype or some other office crap

wilkerlucio20:07:09

yes, and that line wasn't changed on my branch

wilkerlucio20:07:16

but still causing the build to fail somehow

wilkerlucio20:07:35

ouch, I maybe have found it

wilkerlucio20:07:16

no, still not working, that was other string changed, but still a valid "

thheller20:07:23

@kasuko I'm guessing this is some sort of dependency conflict. make sure you have the "correct" core.async versions and so on

kasuko20:07:03

Yep that was exactly it. I am converting an old project from leiningen to shadow-cljs and it had an old version of core.async

thheller20:07:42

make sure there are no other unicode chars hidden in there

wilkerlucio20:07:46

and works on my machine, but not on ci -.-

wilkerlucio20:07:06

ok, I'll keep debugging, that was some github merged suggestions, may have to do with it

kasuko20:07:03

Yep that was exactly it. I am converting an old project from leiningen to shadow-cljs and it had an old version of core.async

thheller20:07:04

not really any other ideas. the error you get is directly from tools.reader so before any analysis/compilation happens

wilkerlucio20:07:29

yeah, was something weird, after I pull and push it got back working :man-shrugging: