Does shadow infer externs for JS libraries required from a file system? Seems like methods got renamed, but there’s no warnings about failed externs inference
there is no inference for JS files, since that is only part of the CLJS compiler which they don't go through
makes sense, is there anything shadow/closure can do to warn about renamed symbols in JS files?
shadow-cljs check the-build
but that is very noisy
hello. Does the possibility exist to create a working setup whereby node would be running on something like say a raspi-zero that can run node, connected to a regular development system that can reasonably run JVM/Shadow/node, and be able to create a repl experience, or is that folly?
that is trivial if you use something like sshfs or so. something that makes the files from your PC available over on the pi
manual copy works too though
lets say :node-script
you have :output-to "out/script.js"
and :output-dir "out"
. you somehow make the out
directory available on the pi and run it there via node script.js
or so
then the only extra option you'll need is :devtools {:devtools-url "<http://your-computer-ip:9630>"}
in your build config
thats it
ok, let me see how far I get with that.
seems like this is pretty close to working. Had to stuff a 'ws' on the target device. So I'm running 'watch app' on the dev box, and running app with node on the target. It clearly gets a code reload whenever the watch decides to recompile.
I'm connected via calva, I guess to the watch on the dev box.
all of the 'evals' seem to be happening on the dev box though - is this expected?
gets rather opaque who I'm talking to...
eval happens whereever the process runs, so your pi
calva just talks to your dev box and the shadow-cljs process handles the messaging between the processes
https://shadow-cljs.github.io/docs/UsersGuide.html#repl-troubleshooting maybe that helps a little
I tried to validate that with a fs.writeFileSync, and I don't seem to see that behavior
how did you start the REPL though? if you juse use node-repl
that will run on the dev box
need to select the REPL for the build you created
(I'm writing off in the non-shared filesystem)
hmm
yes that seems the be the issue - much better
that is really nice - thank you!
about the only thing I would note is that on the target, there is an implied js dependency on 'ws', which isn't there. Actually I lied, it isn't an rpi, it's a custom board which doesn't have npm, but does have node.
best way to handle this is having a package.json in your out
directory
and having dependencies installed there
at least until you have a native module. But anyway, thanks for the pointers, this works fantastic.