Ok - I tried to run my project with only deps.edn
and clj
and the problem I encountered is that I need to leverage the javac
task in boot
in order to precompile the java source within protobuf
. I went back and wrote a boot
task to only compile
the requisite namespace and commit!
the fileset and this looked good. Unfortunately, I subsequently received the same error when trying to compose in the hoplon
task as well as the cljs
task. I'm going to try and add these tasks to my aot-prob
example to see if it breaks down there. I'm suspicious that as I'm trying to glob the server and client code into the same boot pipeline with deps.edn
for both clj
and cljs
deps - there's some cljs unfriendly require
in the clj transitive deps that breaks down in the cljs pipe.
@flyboarder - Ok, I figured it out. I just went back to a root index.html
that adds the main.js
and invokes a function exposed in my hoplon cljs
that loads the generated html into a div.
@mattyulrich yep thats pretty much how to do it
I'm seeing something weird when re-evaluating namespaces in the repl. Does the following make sense?
(ns foo)
(println "0")
(require 'foo :reload)
prints 0
(ns foo)
(println "1")
(require 'foo :reload)
prints 0
(ns foo)
(println "2")
(require 'foo :reload)
prints the previous value 1
Etc, always one step delay. This seems to happens in boot only (e.g. not with the clj repl)Hmm, one week later, I think it's because of this https://github.com/boot-clj/boot/wiki/Boot-Troubleshooting#why-isnt-require-working-in-my-pod
But for some reason I don't have this issue when i run a require in a clj
session
Ok never, mind it something else.
In my reloading code, my require call was too quick.. I had to add (Thread/sleep 25)
to catch the latest changes. No idea why this isn't the case with clj
Sounds like you might want to use aliases to separate the server and client concerns at the deps.edn
level and then supply the alias when using boot
...?
Also, re: javac
-- I'd either wrap the use of clj
in a shell/make script to handle compiling of the Java code or write a small Clojure script to do it and run that as part of your clj
command(s).
@mattyulrich I recommend not using the hoplon task and just manually include hoplon as a library - there is little difference