Fork me on GitHub
#tools-deps
<
2019-01-11
>
hiredman00:01:13

maven has different plugins for talking to repos, but the most common transport for talking to repos is http, so a maven repo can just be directory containing files on a webserver

hiredman00:01:25

the directory tree structure in that case is actually the same structure as ~/.m2, so you can upload your m2 to s3, make it publicly accessible, then use it as a maven repo

hiredman00:01:25

the complicated part of maven is parsing and understanding pom files

hiredman00:01:13

(for example this is the clojars maven repo https://clojars.org/repo/)

eval202012:01:58

Is dependency resolution in any way influenced by the contents of /.m2? Ie I’m considering caching /.m2 on CI but was wondering whether CI-runs without a local repository might actually yield helpful early warnings/errors (eg library updates that cause problems).

jeroenvandijk12:01:42

Not caching would tell you if a dependency suddenly disappeared (which shouldn't happen for at least clojars), but otherwise I cannot think of a reason to do it. If the library is present locally it will not do an additional fetch unless you use -SNAPSHOT versions, which is probably not desirable anyway. Having said that i'm curious for other answers to this question

eval202012:01:39

that’s indeed what I would expect. I see there’s also .cpcache/ which seems to contain the actual result of resolution.

jeroenvandijk13:01:27

Actually now I come to think about git deps, where force pushes and deletion of repo's are a possibility. This might be a valid concern

jeroenvandijk13:01:07

But git deps don't really interact with ~/.m2 deps i think

eval202015:01:21

indeed - these end up in ~/.gitlibs and it seems you can’t set this path (as opposed to mvn/local-repo) so not easily cacheable on gitlab-ci.

mhcat16:01:20

depending on your CI solution, you could add a full dependency pull to a step which depends on tests passing, so you don't waste time on it as part of your regular feedback cycle

mike_ananev13:01:39

@alexmiller Hi. Is there any updates with cli tools for Windows? very expected feature

borkdude15:01:02

@mike1452 how is the WSL support in Windows nowadays?

seancorfield16:01:03

clj/`deps.edn` works really well on WSL. The problem you then get is editor integration of you use a windows editor with your repl running on Linux.

seancorfield16:01:12

(You can't "load file" from windows because Linux won't understand the path the editor sends to it)

seancorfield16:01:51

There are workarounds but it's a less than ideal process. I tend to select-all + evaluate (and I have symlinks set up in WSL so the file paths match windows, modulo the drive colon prefix).

timgilbert20:01:07

Say, anyone executing their applications via clojure inside of docker images? Want to share any findings? I'm wondering how to handle caching (ie, whether to clojure -Sforce -Spath to download deps to the image, then cache them for faster startup)

mike_ananev21:01:22

@borkdude corporate windows policies prohibits using WSL. so, half of our team, with BYOD devices, using clj cli tools, and another half with corporate PCs (Windows OS only) should use leiningen, which is available for Windows and allowed in our network . it is very inconvenient. we are still waiting for the windows version of Clj cli tools. Well, "First rule of Open Source, never ask when something will be done". And it is sad. 😞

duncanmak21:01:22

hmm, interesting

duncanmak21:01:36

what is making clj Unix-dependent?

hiredman21:01:51

it needs a powershell port I guess, which is an issue lein had a long for time, basically the people writing the tools don't use windows much and don't use powershell, so it is difficult for them to do the port or review it

dottedmag21:01:56

I had to port a bunch of shell code to PS recently, and it was not so difficult, but annoying as hell. Favourite tidbits: 1) downloading a file with a progress indicator enabled is awfully slow (it looks like this indicator gets updated for every byte, and terminal on Windows is quite slow), and this progress indicator is enabled by default; 2) extracting a file from Zip using PS standard library cmdlet is ~10 times slower than directly invoking .NET code this cmdlet is wrapping.

dottedmag21:01:02

OTOH one does not have to worry about differences between supported grep options or check if the tool is called shasum or sha256sum.

Alex Miller (Clojure team)22:01:46

I have a not quite working port of clj to powershell. In the journal I just posted I asked people interested in actually working on dev to ping me here. If someone(s) are interested in really digging in, let me know and I will do what I can to guide.

ajoberstar03:01:39

@alexmiller I've got some PowerShell experience and would be interested in helping this along. What still needs to be done?