Fork me on GitHub
#shadow-cljs
<
2020-10-29
>
thheller00:10:28

if you need a specific updated file you can just copy it onto your classpath

thheller00:10:33

doesn't need to come from the closure lib

David Pham10:10:46

I am using shadow-cljs inspector on localhost:9630, I have been noticing that a few tap> were not caught in the inspector is it normal?

thheller10:10:17

it should show all taps assuming the UI is actually open and connected. it will miss all if not connected/open

thheller10:10:14

well if you tap faster than it can accept it then there is some backpressure that will drop taps

thheller10:10:28

buts thats only if you tap like thousands per second

David Pham11:10:51

okay thanks!

amorokh13:10:21

is there a way to make shadow-cljs compile <build-id> produce the same output as a compile during shadow-cljs watch <build-id> does? (wrt to the CLOSURE_DEFINES )

thheller16:10:05

@amorokh watch and compile do set the same closure defines? in as far as that makes sense anyway, watch sets a couple more for REPL related stuff?

thheller16:10:25

as far as your settings from the build config they are the same?

amorokh19:10:41

@thheller I would like to produce an output that has those exact REPL stuff in CLOSURE_DEFINES , I am serving my SPA from a docker container and would like to serve a client that has shadow-cljs “enabled” (i.e. connects to a REPL)

thheller19:10:28

I don't get it. for the REPL to work you need a running watch? why do you want compile?

amorokh19:10:41

I might very well be be misunderstanding things here, please let me know if I do

amorokh19:10:33

what I want to accomplish is to build a docker image with my server that serves my client (SPA) and when I load the client in my browser I want it to connect to my shadown-cljs watch <build-id> process that I’m running locally

thheller19:10:35

would help if you describe what you want/expect.

thheller19:10:34

why not just load the output directly? even if just mounted into the docker process?

amorokh19:10:24

so I’m actually running the docker container in a VM somewhere else

thheller19:10:03

well whatever you want to do. you need to load the output shadow-cljs has created. however you get it there is up to you.

amorokh19:10:10

the environment that where the container is running is rather restrictive

amorokh19:10:59

yeah sure, but what I want is to be able to create the same output as the shadow-cljs watch creates

amorokh19:10:27

but maybe I can execute watch in the Dockerfile?

thheller19:10:30

yeah that is not possible. you need the output created by the running watch. it won't accept any other output.

thheller19:10:23

I don't know enough about your setup to make suggestions sorry

thheller19:10:24

you can just have shadow-cljs run locally and serve the generated JS

thheller19:10:43

and in the docker image HTML load <script src=":<port>/js/main.js"> or so

thheller19:10:16

but other than that I don't know

amorokh19:10:01

ok thanks a lot, I will read that

amorokh19:10:33

I might also reconsider how I build my docker image when in debug mode

amorokh19:10:22

thanks again for your swift replies, you’re doing great work with shadow-cljs

amorokh21:10:28

sorry to bother you again but I’m still having some issues, I thought that the [:http :host] settings in shadow-cljs.edn would instruct the client what shadow-cljs HTTP server to connect to to but it seems that it only instruct the HTTP server what ip/dns to listen to, am I missing something?

amorokh21:10:38

to me it seems that shadow-cljs in the client is always trying to connect to the server it was hosted from

thheller22:10:37

yes that is the default. :devtools-url controls where it connects to if its not the host

thheller22:10:19

to a lesser extent :devtools {:use-document-host false} if just localhost is ok

amorokh05:10:33

ah ok, many thanks again