shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
thheller 2020-10-29T00:10:28.193900Z

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

thheller 2020-10-29T00:10:33.194100Z

doesn't need to come from the closure lib

AJ Jaro 2020-10-29T01:18:18.194200Z

@thheller This is in 2.11.4. I’ll try to make a reproducible case so we can investigate further

2020-10-29T10:04:46.196800Z

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?

thheller 2020-10-29T10:06:17.197600Z

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

thheller 2020-10-29T10:08:14.198100Z

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

thheller 2020-10-29T10:08:28.198500Z

buts thats only if you tap like thousands per second

2020-10-29T11:59:51.198800Z

okay thanks!

2020-10-29T13:47:21.200900Z

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 )

thheller 2020-10-29T16:10:05.201600Z

@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?

thheller 2020-10-29T16:10:25.202Z

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

2020-10-29T19:03:41.204900Z

@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)

thheller 2020-10-29T19:14:28.205400Z

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

2020-10-29T19:18:41.205900Z

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

2020-10-29T19:20:33.206100Z

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

thheller 2020-10-29T19:20:35.206300Z

would help if you describe what you want/expect.

2020-10-29T19:20:46.206500Z

🙂

thheller 2020-10-29T19:21:34.206700Z

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

2020-10-29T19:22:24.206900Z

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

thheller 2020-10-29T19:24:03.207100Z

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.

2020-10-29T19:24:10.207300Z

the environment that where the container is running is rather restrictive

2020-10-29T19:24:59.207500Z

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

2020-10-29T19:25:27.207700Z

but maybe I can execute watch in the Dockerfile?

thheller 2020-10-29T19:25:30.207900Z

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

thheller 2020-10-29T19:26:23.208100Z

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

thheller 2020-10-29T19:27:24.208300Z

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

thheller 2020-10-29T19:27:43.208500Z

and in the docker image HTML load &lt;script src="<http://localhost>:&lt;port&gt;/js/main.js"&gt; or so

thheller 2020-10-29T19:28:16.208700Z

but other than that I don't know

thheller 2020-10-29T19:28:40.208900Z

maybe https://shadow-cljs.github.io/docs/UsersGuide.html#proxy-support also works?

thheller 2020-10-29T19:29:03.209100Z

sorry that one https://shadow-cljs.github.io/docs/UsersGuide.html#dev-http-proxy

2020-10-29T19:30:01.209300Z

ok thanks a lot, I will read that

2020-10-29T19:30:33.209500Z

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

2020-10-29T19:31:22.209700Z

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

2020-10-29T21:35:28.210300Z

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?

2020-10-29T21:36:38.210500Z

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

thheller 2020-10-29T22:45:37.210800Z

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

thheller 2020-10-29T22:46:19.211Z

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