Fork me on GitHub
#boot
<
2019-01-03
>
mattyulrich12:01:36

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.

seancorfield19:01:28

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

seancorfield19:01:58

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

flyboarder20:01:18

@ I recommend not using the hoplon task and just manually include hoplon as a library - there is little difference

mattyulrich03:01:44

@ - I'll give these ideas a shot.. first trying to distill my problem some more.

mattyulrich03:01:19

@ - Thanks for the suggestion, I hadn't tried using hoplon this way yet; will be one less hurdle to overcome.

mattyulrich05:01:28

@ - I've tried removing the hoplon task and changed my .hl to a plain .cljs with the ^{:hoplon/page "index.html"} metadata in the namespace (per the doc) - I don't see the compiled html anywhere in my boot fileset. Do I have to do something beyond just invoking the cljs task?

mattyulrich14:01:26

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

flyboarder19:01:58

@ yep thats pretty much how to do it

jeroenvandijk14:01:44

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)

jeroenvandijk14:01:44

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)

jeroenvandijk12:01:37

But for some reason I don't have this issue when i run a require in a clj session

jeroenvandijk13:01:13

Ok never, mind it something else.

jeroenvandijk13:01:50

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