I just updated shadow-cljs and I can't connect to it from the phone, I've been using --config-merge '{:local-ip,"192.168.0.73"}' , but that doesn't seem to work anymore. Is it still possible to force an IP in some way in the config?
@franquito if you updated to the latest version specifying a IP shouldn't be necessary at all anymore?
The thing is I'm using WSL2 in Windows to run the shadow server, and that runs in another network
that shouldn't matter anymore
hmm or I guess it might? can you try running shadow-cljs clj-repl
Yes
and then (shadow/get-server-addrs)?
that should contain a connectable IP? but I guess in WSL2 it might not contain one you can actually connect to?
Exactly! The phone is connected to other network
(the same that the Windows machine uses)
shadow.user=> (shadow/get-server-addrs)
("172.26.0.1" "172.18.247.215")hmm so which error do you get with and without config-merge?
☝️ those are addresses for the network shared by windows and WSL2
The error is the same, regardless of what I put on config-merge
Could not find shadow-cljs host address, tried 172.26.0.1,172.18.247.215hmmm that can't be right
hmm dunno why config-merge doesn't trigger
The thing that puzzles me is you say forcing :local-ip should still work 🤔
right
but you can put {:local-ip "192.168.0.73"} in ~/.shadow-cljs/config.edn
I changed the whole ip selection logic maybe I missed something about config-merge
:local-ip is also supported directly in shadow-cljs.edn as well
but ~/.shadow-cljs/config.edn is user specific so might be better fit if you work on stuff with multiple people
Oh, ok, let me check if it picks that one up
thanks!
https://github.com/thheller/shadow-cljs/issues/968 can't check right now but maybe later
If :local-ip config is found, then it should appear in (shadow/get-server-addrs)?
(shadow/get-configured-server-addr)
but I think adding it will require a shadow-cljs restart
(shadow/get-configured-server-addr) that one returns the correct IP!
then it should be used but as a I said it might only apply to the build after a restart
oh, using ~/.shadow-cljs/config.edn works
but that being said forcing one should still work just fine in that way