Fork me on GitHub
#tools-deps
<
2019-06-05
>
sveri13:06:19

@alexmiller Hey, I just came back from a longer break and noticed tools-deps is finally available on windows, which is pretty awesome, thanks 🙂

sveri13:06:05

Yea, I just did and after I allowed myself to run unsigned scripts in the powershell installation worked and I can run it

sveri13:06:10

Just about to experiment with it finally

markx17:06:20

Hi all, why is sha required for a :git/url? Is it possible to automatically use master branch?

hiredman17:06:57

you can't cache a reference

hiredman17:06:41

clj startup performance is based building a classpath once and caching it for the same deps.edn file

markx17:06:27

Ah makes sense. It doesn’t have a record of the local version. I was just hoping to achieve some function like npm or pip or other package mangers.

seancorfield17:06:12

@markx If you really want to be able to add libraries from master, you can do something like this https://github.com/seancorfield/dot-clojure/blob/master/deps.edn#L106-L119

markx17:06:32

I still need to wire my brain to connect the repl and the cli tool. I understand the code but don’t know how to do it on cli.

markx17:06:00

What I really really want is something like clj install xxx then I can just run xxx from my shell.

markx17:06:55

What I really don’t like is to build or download a jar and manually put it into PATH.

lilactown17:06:12

hey markx. a thing I'm building might help

lilactown17:06:18

is this for installing libraries, or installing applications?

markx17:06:40

Ideally for both, but mostly for applications.

lilactown18:06:47

it doesn't have direct support for installing global aliases right now. but it does have a plum add command that adds a dependency to a local deps.edn

dominicm18:06:32

@U4YGF4NGM do you have a plan to preserve whitespace when you do this?

lilactown18:06:16

it should preserve whitespace

lilactown18:06:32

well, it formats it using cljfmt

lilactown18:06:19

which I suppose is not the same 😅

dominicm18:06:34

I would not use this, because that will lose comments.

lilactown18:06:54

no, it will preserve comments. that is why I moved to using cljfmt / rewrite-clj in the first place

lilactown18:06:06

go ahead and give it a shot

dominicm18:06:10

Oh, you're using rewrite-clj directly too :)

dominicm18:06:25

Good. That's what I was going to suggest if you didn't have an idea.

dominicm18:06:40

But I was hoping you'd found a novel approach I didn't think of :)

dominicm18:06:47

I'll look through the code to compare.

lilactown18:06:00

yep 😄 cljfmt is there for formatting, and then rewrite-clj for actually doing the addition: https://github.com/Lokeh/plum/blob/master/clj/src/plum/add.clj#L56

dominicm18:06:30

I had some users get quite annoyed that they lost their carefully aligned arguments when I first added this, just fyi

lilactown18:06:00

that makes sense. I wish there was a way to do preserving modifications of EDN better

dominicm18:06:12

I spent some time on it in ednup

dominicm18:06:30

The goal was to make a clojure map you could assoc without losing formatting

lilactown18:06:21

I wonder if we could format the modification and then assoc that using rewrite-clj to not mess with the rest of the file?

dominicm18:06:42

What I did in ednup was look at the previous key, and match the whitespace based on that

markx18:06:21

This is a nice tool. I read about it on clojureverse. IIUC, it provides cli commands to avoid manually editing the deps.edn file. But it doesn’t solve all my pains. I hope it can go one step further. Do you plan to support installing global aliases?

lilactown18:06:51

it could be added. if it would help you, create an issue on github.

lilactown18:06:02

I would also look over a PR if you're interested in contributing 😄

markx18:06:43

Yeah I’m interested. I’ll try. But don’t wait for me. 😛