boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
dave 2018-06-26T13:40:49.000180Z

ah, i found the issue: https://github.com/boot-clj/boot/issues/676

borkdude 2018-06-26T14:18:54.000099Z

I run into an issue with boot 2.8.0 where I’m loading a file from the resource to create queries with hugsql.

(<http://clojure.java.io/resource|clojure.java.io/resource> "dre/db/html/query.sql")
This resolves to file:/Users/Borkdude/.boot/cache/tmp/Users/Borkdude/dre/DocSearch/app/gpu/-ueasqk/dre/db/html/query.sql, but when I change the file in my resources dir, the changes are not seen by hugsql. This cached file remains the same…

dominicm 2018-06-26T14:23:55.001076Z

@borkdude what happens if you re-run io/resource?

martinklepsch 2018-06-26T14:25:06.000587Z

@borkdude the classpath is static unless you use watch (in which case it gets updated). Using watch requires you to use a separate process for the repl client however..

borkdude 2018-06-26T14:25:31.000127Z

we are already using watch, this workflow always worked until 2.8.0

borkdude 2018-06-26T14:26:00.000863Z

I’m going to try what dominicm asked

dominicm 2018-06-26T14:27:24.000961Z

Hmm, odd that it used to work. I suspect that there's probably something more here then, I've not been tracking commits to boot very closely recently, so there could be some good ideas on how to debug this in the changelog.

borkdude 2018-06-26T14:29:09.000370Z

First time:

file:/Users/Borkdude/.boot/cache/tmp/Users/Borkdude/dre/DocSearch/app/h2a/-ueasqk/dre/db/html/query.sql
After edit:
file:/Users/Borkdude/.boot/cache/tmp/Users/Borkdude/dre/DocSearch/app/h2a/-ueasqk/dre/db/html/query.sql

borkdude 2018-06-26T14:29:28.000174Z

(same cached file)

borkdude 2018-06-26T14:31:40.000351Z

I’m going to try to reproduce this in a stripped down project

borkdude 2018-06-26T14:31:46.000450Z

and then file an issue

borkdude 2018-06-26T14:53:06.000322Z

hmm, tested in both versions with stripped down project and when I slurp the edited file I see the edits… so, don’t know what’s going on in my project 🙂

borkdude 2018-06-26T14:53:46.000156Z

the file path doesn’t change though, in neither version

borkdude 2018-06-26T14:54:05.001022Z

but that doesn’t matter to me, as long as the edits are visible

borkdude 2018-06-26T14:59:01.000304Z

hmm, in my project I don’t see differences with slurp in 2.8.0, but I do with 2.7.2

borkdude 2018-06-26T15:30:10.000595Z

This should be true

(= (slurp (<http://clojure.java.io/resource|clojure.java.io/resource> "dre/db/html/query.sql"))
   (slurp (io/file "src/dre/db/html" "query.sql")))

dominicm 2018-06-26T16:19:10.000046Z

is it on any version?

borkdude 2018-06-26T16:23:20.000902Z

no, only on 2.8.0

borkdude 2018-06-26T16:23:31.000428Z

but I can’t reproduce it in a similar project

borkdude 2018-06-26T16:24:03.000725Z

cljs reloading is working fine

borkdude 2018-06-26T16:52:25.000301Z

I’m one step closer to the solution, commented out some composed tasks and now it works..

borkdude 2018-06-26T20:11:37.000015Z

ok, found the issue, when I comment out this task then it works:

(deftask include-assets []
  (comp
   (sift :add-jar {'cljsjs/c3 #"cljsjs/c3/common/c3.min.css"})
   (sift :move {#"cljsjs/c3/common/c3.min.css"
                "public/css/vendor/c3/c3.min.css"})))
Not sure if anyone can make sense out of that.

borkdude 2018-06-26T20:20:47.000327Z

it’s the (sift :move ...) that is causing this

dominicm 2018-06-26T20:21:38.000319Z

Did that change in the latest release?

dominicm 2018-06-26T20:22:50.000008Z

https://github.com/boot-clj/boot/pull/680

2018-06-26T21:08:29.000245Z

@borkdude thanks for finding that, can you please post your findings on a github issue if you haven't yet? it sounds like we should consider reverting the change

2018-06-26T21:09:38.000456Z

also if you could elaborate a little on your workflow there, that would be supremely helpful

borkdude 2018-06-26T21:10:10.000120Z

https://github.com/boot-clj/boot/issues/704

borkdude 2018-06-26T21:13:32.000016Z

I updated that issue with why I need this to work

2018-06-26T21:13:44.000104Z

that's great, thank you

borkdude 2018-06-26T21:24:46.000224Z

I can imagine this would also break some people’s workflows when they were relying on evaluating clojure on save, like some reloaded workflows do?

borkdude 2018-06-26T21:25:28.000404Z

personally I only evaluate manually (C-c C-k, or C-x C-e)

borkdude 2018-06-26T21:50:37.000257Z

Fwiw, I had to change a bunch of stuff in our build.boots (we have 10 of them) related to using the newest s3-private-wagon which only works with boot 2.8.0, so reverting that is a bit painful. I’d rather not go back to 2.7.2 now, but I might if there isn’t a good workaround for this.

2018-06-26T21:58:25.000218Z

@borkdude perhaps i should just push 2.8.1 with the revert, and then we can discuss workflows and whether we want the change? without any pressure

borkdude 2018-06-26T22:01:01.000674Z

seems like a good decision to me, considering it wasn’t known that this type of workflow would break?

borkdude 2018-06-26T22:04:43.000628Z

and if there is a good alternative it can at least be announced as breaking in 2.8.2