ah, i found the issue: https://github.com/boot-clj/boot/issues/676
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…@borkdude what happens if you re-run io/resource
?
@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..
we are already using watch, this workflow always worked until 2.8.0
I’m going to try what dominicm asked
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.
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
(same cached file)
I’m going to try to reproduce this in a stripped down project
and then file an issue
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 🙂
the file path doesn’t change though, in neither version
but that doesn’t matter to me, as long as the edits are visible
hmm, in my project I don’t see differences with slurp in 2.8.0, but I do with 2.7.2
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")))
is it on any version?
no, only on 2.8.0
but I can’t reproduce it in a similar project
cljs reloading is working fine
I’m one step closer to the solution, commented out some composed tasks and now it works..
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.it’s the (sift :move ...)
that is causing this
Did that change in the latest release?
https://github.com/borkdude/boot-sift-issue/blob/master/src/issue/core.clj
@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
also if you could elaborate a little on your workflow there, that would be supremely helpful
I updated that issue with why I need this to work
that's great, thank you
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?
personally I only evaluate manually (C-c C-k, or C-x C-e)
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.
@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
seems like a good decision to me, considering it wasn’t known that this type of workflow would break?
and if there is a good alternative it can at least be announced as breaking in 2.8.2