Fork me on GitHub
#polylith
<
2021-08-01
>
tengstrand14:08:45

I’ve made a https://github.com/polyfy/polylith/commit/d7988580278c3123b55856e8dac4f5c757da6c11 to the issue-66 branch. Please try it out @seancorfield (and @furkan3ayraktar if you have time, even though you are on vacation) and if everything seems to work, this may be the last commit to the issue-66 branch before we merge it into master!

clojure-spin 5
😯 2
pithyless15:08:56

@U1G0HH87L I'm trying to boot poly from scratch using issue-66 today, and I think the last commit broke something:

Error building classpath. Manifest type not detected when finding deps for polyfy/polylith in coordinate {:git/url "", :deps/root "projects/poly", :git/sha "d7988580278c3123b55856e8dac4f5c757da6c11"}

pithyless15:08:57

for reference, clojure -M:poly info seems to work fine with af4d6796e13f58f87e5a08d31d4bff7ac7a4ce61

tengstrand16:08:31

Ok, thanks, will look into that!

tengstrand17:08:12

Can you check if this works for you @U05476190? Create a workspace, e.g. clojure -M:poly create w name:my-ws top-ns:se.example. Go into the my-ws directory. Change the shafor the poly alias in ./deps.end to af4d6796e13f58f87e5a08d31d4bff7ac7a4ce61 and execute clojure -M:poly info. When I do that I get this error: Error building classpath. Unable to fetch /Users/joakimtengstrand/.gitlibs/_repos/github.com/polyfy/polylith …and it doesn’t matter if I change to an older sha. I haven’t tested this for a while, because I mostly AOT compile the code so that I can use the poly command locally.

tengstrand17:08:50

I switched to another MacBook Pro, and I have no problems with this on that machine. One difference with the latest commit is that I use clojure.tools.deps.alpha/slurp-deps to read deps.edn files. That could maybe explain why the latest sha doesn’t work for you @U05476190 so I could commit a version where I revert that change. Then I need to look into why I have problems with one of my developer machines, but that seems to be another problem.

seancorfield17:08:51

Sounds like it's to do with the Clojure CLI version. :git/sha requires the most recent CLI.

seancorfield18:08:02

Use :sha instead and it should work with older versions.

tengstrand18:08:28

Okay, thanks. Will check that out later tonight, busy right now.

seancorfield18:08:31

All the basic stuff works for me with the latest commit.

seancorfield18:08:10

@U05476190 What does clojure -version show for you? If it's lower than 1.10.3.933 you're on an older CLI and will need to use :sha instead of :git/sha.

tengstrand19:08:46

I upgraded clojureto the latest version (`1.10.3.933`) + removed my ~/.gitlibs directory, and that fixed my environment problems (actually it was the removal of .gitlibs that fixed the problem). I have verified both the previous version that loads deps.edn files using t.d.a (version issue66.23 - d7988580278c3123b55856e8dac4f5c757da6c11) and the latest version (version issue-66.24 - 47091a06b7500dbe73daeb2342906bf83196157c) that doesn’t, and both seems to works for me.

pithyless20:08:53

I also was testing on 1.10.3.933 and can confirm d7988580278c3123b55856e8dac4f5c757da6c11 worked only after removing my ~/.gitlibs cache. Even more curious, removing ~/.gitlibs/libs/polyfy was not enough, so something else was causing the issue. sigh The problem, as usual, is some hidden #state.

pithyless20:08:17

Thanks for following up Joakim and Sean!

pithyless20:08:25

47091a06b7500dbe73daeb2342906bf83196157c also looks good; but you should probably also remove the the no longer used tda namespace @U1G0HH87L https://github.com/polyfy/polylith/blob/47091a06b7500dbe73daeb2342906bf83196157c/components/file/src/polylith/clj/core/file/core.clj#L4

tengstrand20:08:50

Okay, cool. My plan is to switch back to use t.d.a when reading deps.edn files, now when that doesn’t seem to be the problem. I will commit soon.

pithyless20:08:52

sounds good; you sent me down a small rabbit hole, I started wandering what tda/slurp-deps does (vs say clojure.edn/read-string) https://github.com/clojure/tools.deps.alpha/blob/master/src/main/clojure/clojure/tools/deps/alpha.clj#L93-L98

tengstrand20:08:38

Yes, I went down that rabbit hole too! I think it should be better long term to use that function.

seancorfield22:08:09

That latest commit looks good. I remember the out of sync ~/.gitlibs issue now! That was caused by an older CLI that didn't work correctly with SHAs that were not on the default branch. It was fixed but tended to leave ~/.gitlibs in an inconsistent state. So it will depend on exactly what sequence of CLI versions you used while interacting with the poly tool on the non-default branch.

tengstrand03:08:10

Ok, thanks for the info.