Fork me on GitHub
#tools-deps
<
2021-10-30
>
cfleming04:10:25

This basically just adds new conditions to the classpath caching logic, correct? This is all in the script?

borkdude09:10:31

It seems to also be in tools.deps since that writes the manifest file given a filename via --manifest-file

borkdude09:10:15

@alexmiller While porting the changes to deps.clj, I noticed that invoking -Stree after the classpath has been cached, has no effect:

$ clojure -Stree
org.clojure/clojure 1.10.1
  . org.clojure/spec.alpha 0.2.176
  . org.clojure/core.specs.alpha 0.2.44
$ clojure -Stree
... nothing ...

Alex Miller (Clojure team)13:10:35

I forgot that that was why the staleness check is in there!

Alex Miller (Clojure team)13:10:44

I'll have to roll that part back

borkdude14:10:17

No worries. I already rolled it back in deps.clj and figured you either have to pre-cache the tree or just leave it like this: I think the latter would be fine.

Alex Miller (Clojure team)14:10:56

Well for now, I will just roll back that part of the change

Alex Miller (Clojure team)14:10:06

Thx for the heads up!

πŸ‘ 1
borkdude14:10:41

Perhaps you can cache the tree once it has already been computed in a file in .cpcache

borkdude14:10:01

To me personally this is not super important. The manifest checks I'm very happy to have found out about.

lilactown15:10:17

is there a way to consume a subproject of a monorepo via git deps?

lilactown15:10:15

i.e.

project/
  sub-project-A/
    deps.edn
  sub-project-B/
    deps.edn
can I have an external project depend on sub-project-A via git deps?

borkdude15:10:44

@lilactown yes: :deps/root "sub-project-A"

πŸ‘€ 1
borkdude15:10:10

you can even refer to the same git repo multiple times with different roots and shas

lilactown15:10:35

ah neat. so this would perhaps be the full thing:

{:deps {town.lilac/project-A {:git/url "..." :git/sha "..." :deps/root "sub-project-A"}}}

lilactown15:10:51

OK. in that case, I have more questions πŸ˜„ now I want to support this in my monorepo project

lilactown15:10:40

for development purposes I have sub-project-A depend on sub-project-B via :local/root "../sub-project-B" I'm guessing that won't work for people trying to consume it via git deps like this, right?

borkdude15:10:19

I'm not sure if local/root works relatively within a library

borkdude15:10:45

but that's easy to test and see what -Spath returns when you use that library

lilactown15:10:10

OK i'll have to test it more

lilactown16:10:57

I'm developing project right now locally so it'll be awhile before I worry about consumers using it via git deps. glad to hear it's likely I won't need to futz too much with the config for them πŸ˜„

Alex Miller (Clojure team)16:10:34

There are limits if you get to comparing the same β€œlib” from within a git dep as that local lib does not retain context with the root git dep

Alex Miller (Clojure team)16:10:07

Clojure CLI prerelease 1.10.3.1013 is now available β€’ Undo: -Stree no longer forces cache recompute (from last prerelease)

❀️ 3