Fork me on GitHub
#tools-deps
<
2019-10-16
>
Lone Ranger20:10:30

eya... do we have anything like for clj -A:new templates yet?

seancorfield20:10:21

@goomba clj -A:new can use all of the Leiningen and Boot templates (they'll just produce whatever they are designed to produce).

Lone Ranger20:10:29

whaaaaaaaaaaaaaaaaaaaaaat

seancorfield20:10:46

But I doubt there are any clj-specific templates out there (yet).

Lone Ranger20:10:03

psssshhhh I made one

Lone Ranger20:10:54

you made it easy enough even for a @goomba ™️ to figure out

seancorfield20:10:18

Oh, there are some ... https://clojars.org/search?q=clj-template look for /clj-template in the name.

Lone Ranger20:10:32

cool! 😄 (man I was dangerously close to getting "bing"ed again hahaha)

seancorfield20:10:08

The main issue is that clj -A:new can pull in templates from git or local deps (which lein/boot cannot) and those would never be discovered by

Lone Ranger20:10:34

cough this one appears to be missing a vote button 😅

practicalli-johnny09:10:06

Give the issue a thumbs up emoji, that votes for it

cfleming21:10:12

Is it new that -Sdescribe shows deps.edn at the end of :config-files, and not just the system and user deps?

Alex Miller (Clojure team)21:10:50

I think it's always been that way

Alex Miller (Clojure team)21:10:40

I don't remember changing anything about it at least

seancorfield21:10:44

@cfleming It only shows that if you're in a folder that has deps.edn in it.

cfleming21:10:50

Yeah, looking at the history of the script looks like it’s always been like that.

cfleming21:10:20

@seancorfield Oh, I see, you’re right.

cfleming21:10:42

@alexmiller that’s the source of the weird bug the other day where stijn was getting a spurious dep - he’s on linux, which starts IntelliJ in his home directory, and he had half a deps.edn file in his home dir.

Alex Miller (Clojure team)21:10:23

and by cool, I mean very confusing and not cool

cfleming21:10:27

I think that I usually run -Sdescribe without setting the CWD since I didn’t realise it was significant.

cfleming21:10:42

It’s a weird one, for sure.

cfleming21:10:49

Thanks 🙂

cfleming21:10:21

Any chance of ever getting that vector replaced by a map with actual names for the different paths?

cfleming21:10:07

It’s really ambiguous now - this has also caused confusion around the system file being bundled in t.d.a, too

cfleming21:10:54

I have a feeling I’ve asked for that previously, but I can’t remember the conclusion.

seancorfield21:10:43

It needs to be ordered -- that's how the files are merged -- and, for a while, the system one was removed from the list because it got built in (but I think it was restored, at least until tooling catches up with that change?).

seancorfield21:10:55

Well, it was restored, but I think that's why 🙂

seancorfield21:10:11

Lots of tooling depends on the vector / order so it couldn't change to be a map, but I guess one or more new keys could be added to the overall describe result.

cfleming22:10:10

Cursive, for one

Alex Miller (Clojure team)22:10:27

well that's the one I was aware of :)

Alex Miller (Clojure team)22:10:44

I was wondering what else was in the "lots"

cfleming22:10:52

Cursive doesn’t really depend on the order per se, but does want to understand which of the files are system/user config files and which are the project files.

seancorfield22:10:13

True, since the API changed, there should be fewer-to-none using the describe output now 🙂

seancorfield22:10:18

I've just seen several tool authors talk about reading that list to get at the raw deps.edn files instead -- although I keep telling them not to do that!

seancorfield22:10:12

depot just went through a major rewrite to "unify" its read/check behavior with its write behavior (it will update deps.edn to use the latest versions of artifacts).

seancorfield22:10:18

Prior to the rewrite, the read/check behavior used the built-in t.d.a. logic and looked at the resulting deps/versions -- but the write behavior read deps.edn files directly. Now it does it on both paths which completely broke our usage of the tool 😞

Alex Miller (Clojure team)22:10:55

I sent PRs to all the projects I could find using clj -Sdescribe output this summer and it actually emits a big ugly warning to stderr if you use it, which I have seen no one mention

Alex Miller (Clojure team)22:10:04

this is via the ctda.reader/clojure-env

seancorfield22:10:17

I think depot just reads the local deps.edn by default or the list of files you provide on the command-line otherwise. I don't think it even respects CLJ_CONFIG.

Alex Miller (Clojure team)22:10:44

I am actually working on a bunch of changes in this area right now

Alex Miller (Clojure team)22:10:29

we are naming the different deps files

Alex Miller (Clojure team)22:10:49

how that affects -Sdescribe output tbd (but not planning to break the existing)

Alex Miller (Clojure team)22:10:58

we may need to have a conversation @cfleming to make sure you stay in sync, but I need to work through it a little more first

cfleming22:10:54

@seancorfield Right, but you can still apply an ordering to the map elements (i.e. :system comes before :user comes before :project)

Alex Miller (Clojure team)22:10:33

the ordering can be independent (or more likely, fixed)

cfleming22:10:30

Anyway, I’m glad to hear changes are coming, much appreciated!

Alex Miller (Clojure team)22:10:17

do you call anything in clojure.tools.deps.alpha.script.make-classpath ?

cfleming22:10:52

I don’t think so, let me check…

cfleming22:10:12

No, I use c.t.d.a, c.t.d.a.reader and c.t.d.a.util.dir

Alex Miller (Clojure team)22:10:42

that should all be stable (well, I added ctda.reader/user-deps-location if that's useful)

Alex Miller (Clojure team)22:10:45

but I am adding some features that are changing the glue between the clojure script and tda (really all logic in make-classpath)

Alex Miller (Clojure team)22:10:25

so if you're replicating that logic, it will need to change

Alex Miller (Clojure team)22:10:43

but I should really go finish all that so I can get it in rather than talking here :)

cfleming22:10:49

Interesting, thanks. I don’t think that’s relevant to Cursive since IntelliJ doesn’t reliably receive env vars from the shell environment, but I do need to allow users to specify where their user deps.edn file is. I already allow that for users using t.d.a directly, but not for CLI users at the moment.

cfleming22:10:34

Speaking of which, what’s the state of play of CLI on Windows? I haven’t followed that.

Alex Miller (Clojure team)22:10:04

when you use t.d.a directly, there may be something additional you need to do

Alex Miller (Clojure team)22:10:57

I wouldn't say it's done :)

cfleming22:10:58

What is the additional thing I may need to do when using t.d.a?

seancorfield22:10:14

FYI, all I use in clj-new is

[clojure.tools.deps.alpha :as deps]
            [clojure.tools.deps.alpha.reader :refer [default-deps
                                                     read-deps]]
            [clojure.tools.deps.alpha.util.session :as session]
So I assume I'm safe @alexmiller?

Alex Miller (Clojure team)22:10:22

let me finish what I'm working on and then I can have things to point at

Alex Miller (Clojure team)22:10:57

I can't imagine clj-new is going to be affected by any of this

cfleming22:10:05

Ok, I shall await it with bated breath…

Alex Miller (Clojure team)22:10:19

actually it will be able to make use of some new stuff

Alex Miller (Clojure team)22:10:28

but I'm going to go work on it :)