Fork me on GitHub
#shadow-cljs
<
2018-12-26
>
kurt-o-sys08:12:26

just wondering... just updated shadow-cljs and now, I seem to have a bunch of warnings:

------ WARNING #1 --------------------------------------------------------------
File: mranderson048/re_frame/v0v10v2/re_frame/events.cljc:61:11
--------------------------------------------------------------------------------
 58 |       (if *handling*
 59 |         (console :error "re-frame: while handling \"" *handling* "\", dispatch-sync was called for \"" event-v "\". You can't call dispatch-sync within an event handler.")
 60 |         (binding [*handling*  event-v]
 61 |           (trace/with-trace {:operation event-id
-----------------^--------------------------------------------------------------
Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.events/java
--------------------------------------------------------------------------------
 62 |                              :op-type   kind
 63 |                              :tags      {:event event-v}}
 64 |             (interceptor/execute event-v interceptors)))))))
 65 |
--------------------------------------------------------------------------------

------ WARNING #2 --------------------------------------------------------------
File: mranderson048/re_frame/v0v10v2/re_frame/subs.cljc:48:29
--------------------------------------------------------------------------------
 45 |   (let [cache-key [query-v dynv]]
 46 |     ;; when this reaction is no longer being used, remove it from the cache
 47 |     (add-on-dispose! r #(do (swap! query->reaction dissoc cache-key)
 48 |                             (trace/with-trace {:operation (first-in-vector query-v)
-----------------------------------^--------------------------------------------
Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.subs/java
--------------------------------------------------------------------------------
 49 |                                                :op-type   :sub/dispose
 50 |                                                :tags      {:query-v  query-v
 51 |                                                            :reaction (reagent-id r)}}
 52 |                               nil)))
--------------------------------------------------------------------------------

------ WARNING #3 --------------------------------------------------------------
File: mranderson048/re_frame/v0v10v2/re_frame/subs.cljc:111:4
--------------------------------------------------------------------------------
108 |   "
109 |
110 |   ([query]
111 |    (trace/with-trace {:operation (first-in-vector query)
----------^---------------------------------------------------------------------
Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.subs/java
--------------------------------------------------------------------------------
112 |                       :op-type   :sub/create
113 |                       :tags      {:query-v query}}
114 |      (if-let [cached (cache-lookup query)]
115 |        (do
--------------------------------------------------------------------------------

------ WARNING #4 --------------------------------------------------------------
File: mranderson048/re_frame/v0v10v2/re_frame/subs.cljc:129:4
Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.subs/java
--------------------------------------------------------------------------------

kurt-o-sys08:12:31

------ WARNING #5 --------------------------------------------------------------
File: mranderson048/re_frame/v0v10v2/re_frame/subs.cljc:305:34
Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.subs/java
--------------------------------------------------------------------------------

------ WARNING #6 --------------------------------------------------------------
File: mranderson048/re_frame/v0v10v2/re_frame/subs.cljc:320:34
Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.subs/java
--------------------------------------------------------------------------------

------ WARNING #7 --------------------------------------------------------------
File: mranderson048/re_frame/v0v10v2/re_frame/router.cljc:126:5
Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.router/java
--------------------------------------------------------------------------------

------ WARNING #8 --------------------------------------------------------------
File: zprint/focus.cljc:100:47
cljs.core/-, all arguments must be numbers, got [#{nil clj-nil} number] instead
--------------------------------------------------------------------------------

------ WARNING #9 --------------------------------------------------------------
File: com/rpl/specter.cljc:1275:19
Use of undeclared Var com.rpl.specter/java
--------------------------------------------------------------------------------

------ WARNING #10 -------------------------------------------------------------
File: com/rpl/specter.cljc:1288:19
Use of undeclared Var com.rpl.specter/java
--------------------------------------------------------------------------------

kurt-o-sys08:12:43

Am I missing something?

wombawomba12:12:21

I’m trying to use an NPM package that requires importing a CSS file. How can I do this with shadow-cljs? The readme for the package just says to do @import 'handsontable/dist/handsontable.full.css'; (https://github.com/handsontable/react-handsontable#handsontable-community-edition)

thheller16:12:15

@wombawomba CSS is not supported currently. you need to do that separately. I typically just use the node-sass CLI

wombawomba16:12:28

Alright. Do I need to run that as a separate process, or can I get it to run together with shadow-cljs somehow?

thheller16:12:52

separate for now

this.rob19:12:09

Is it possible to make shadow-cljs connect to a server running on a different host to localhost:9630 when running a build?

thheller19:12:18

@rs it defaults to connecting to whichever url you load it from

thheller19:12:10

so if you load it'll try to connect to you can override which url it connects to by setting :devtools {:devtools-url ""}

this.rob19:12:36

perfect, thanks!

this.rob19:12:37

hmm not sure i'm understanding how this is suppose to work correctly... I am starting a shadow-cljs process with shadow-cljs server start, which will then be available at . I'm then running a couple of builds on different hosts, using shadow-cljs watch buildA and shadow-cljs watch buildB. At the moment these two builds start their own, new shadow-cljs processes instead of using the one already available at .

this.rob19:12:59

What I'd like is for those two build commands to reuse the already started shadow-cljs process

thheller19:12:56

ah. you can't share a shadow-cljs server process between projects

thheller19:12:20

but if you have one shadow-cljs server process running both watch should be using it

thheller19:12:34

you can also just start shadow-cljs watch buildA buildB to run both

this.rob19:12:29

Ah I see. Would it be a bad idea to share the server process? Or just something that hasn't been implemented?

thheller20:12:20

I looked into it but dependency management is annoying enough as it is

thheller20:12:26

so I won't be implementing it anytime soon

this.rob21:12:23

I can see how running across different hosts would make that even more annoying 😄

this.rob21:12:30

on another note... I've replicated the code here exactly, but my server isn't starting / stopping on initial shadow-cljs watch script or after changing anything in the src file

this.rob21:12:14

it triggers a re-compile on change, but it doesn't seem to be running the :before-load-async and :after-load functions

thheller22:12:09

@rs devtools aren't enabled by default for :node-script since they keep the process alive which isn't always what you want (eg. when building CLI scripts). you can set :devtools {:enabled true ...}