Fork me on GitHub
#tools-deps
<
2019-09-09
>
cfleming00:09:01

@seancorfield Ah, yes, thanks - I actually include that already in option #1

cfleming00:09:38

Although Cursive doesn’t yet support CLJ_CONFIG - that’s on my TODO list

cfleming00:09:11

I’ve edited the list above to make that clear.

cfleming00:09:00

Those files include the same non-whitespace non-comment content logic.

Alex Miller (Clojure team)00:09:26

did you look at the clojure script? you can see everything included in the hash now

Alex Miller (Clojure team)00:09:08

seems like matching that is best for matching behavior

seancorfield00:09:09

@alexmiller Did you say CLJ_CONFIG support might go away? Is there an alternative in mind where a (large) project/monorepo may want a "base" deps.edn file and then to have a separate deps.edn for each subproject?

seancorfield00:09:59

Ah, then I perhaps misunderstood you 🙂

Alex Miller (Clojure team)00:09:01

more likely to add something to insert more

seancorfield00:09:52

OK. Having four deps.edn files being considered would be fine too. System, user, (project/repo -- new!), (sub)project/current dir.

seancorfield00:09:22

(I mostly don't care about the first two in this case -- I really care about the "third" and fourth 🙂 )

cfleming00:09:03

I did look at the script, but a while ago. IIRC it doesn’t include deps file contents, only the config paths, and definitely not the contents of transitive local roots.

cfleming00:09:29

At least, I couldn’t see where the deps file contents were taken into account.

Alex Miller (Clojure team)00:09:57

yeah it's just the paths and aliases and the -Sdeps contents

cfleming00:09:38

Actually, does the -nt test take the file timestamps into account too? My google-bash-fu is failing me.

cfleming00:09:12

Right, that was what I suspected, but Google wasn’t very helpful.

Alex Miller (Clojure team)00:09:14

so the "stale" calculation is separate from the hash

cfleming00:09:07

In my case I don’t need a location (i.e. what you’re using the hash for), I just need the staleness test.

Alex Miller (Clojure team)00:09:46

so yeah, that's largely timestamp based

cfleming00:09:50

Ok, thanks. In my case it’s relatively easy to do the full transitive contents check, so I’ll stick with that.

Alex Miller (Clojure team)00:09:51

well, and assuming the hash finds there is a cp to use

cfleming00:09:41

Actually, one other question I had: since the system deps file is now read from a resource, am I correct in thinking that for recent versions I only need to pass the user config, and not both?

cfleming00:09:27

I looked at the code a while back, and it looked like the resource will always be put first in the list, so if I also pass the system deps file then that will override the one from the resource, but will presumably be the same?

cfleming00:09:40

Is there any way to tell from e.g. -Sdescribe whether I need to pass the system file or not? The path still appears in the config-files list.

cfleming00:09:03

If not I can just check the version and choose based on that.

seancorfield00:09:54

@cfleming Looks like you could check :install-dir against the first path in :config-files -- but I will note that t.d.a. has an API for getting the deps.edn files that returns just the user + project level ones (because it has the system one baked in).

cfleming01:09:27

Interesting. It’s potentially tricky to call that API ahead of time when delegating to the CLI.

cfleming01:09:40

I’ll take a look at that though, thanks.

Alex Miller (Clojure team)02:09:04

it wouldn't hurt to include both

cfleming03:09:40

Is there a reason that t.d.a and tools.gitlibs print progress information (“Downloading: xxx” and “Checking out: xxx”) to stderr?

Alex Miller (Clojure team)03:09:46

so you can shunt it off if you don't want to see it

Alex Miller (Clojure team)03:09:03

normally it's silent on stdout unless you do something that expects a printed result, like -Stree or -Spath etc

cfleming04:09:09

Ah, ok, thanks.