Fork me on GitHub
#tools-deps
<
2018-06-09
>
cfleming02:06:03

@ghadi Local deps are definitely not transitive at the moment - I haven’t tested git deps.

cfleming03:06:41

Actually, I might be going nuts - I can’t reproduce what I was seeing yesterday.

cfleming03:06:50

I wonder if this was a caching problem:

cfleming03:06:11

~/d/t/test-project (master)> tree .
.
├── deps.edn
└── sub-project
    ├── deps.edn
    └── sub-sub-project
        └── deps.edn

2 directories, 3 files
~/d/t/test-project (master)> cat deps.edn
{:deps {org.clojure/data.json {:git/url ""
                               :sha "13e9d244678be7b235bb24a10310f9d147ea088d"}
        test/sub-project {:local/root "sub-project"}}}
~/d/t/test-project (master)> cat sub-project/deps.edn
{:deps {org.clojure/data.json {:git/url ""
                               :sha "0f06ca5eb08726e74b2dab8654923894b7ace6af"}
        test/sub-sub-project {:local/root "sub-sub-project"}}}
~/d/t/test-project (master)> cat sub-project/sub-sub-project/deps.edn
{:deps {}}
~/d/t/test-project (master)> clojure -Spath
Error building classpath. Manifest type not detected when finding deps for test/sub-sub-project in coordinate #:local{:root "sub-sub-project"}
~/d/t/test-project (master)> clojure -Spath -C:test
test:src:/Users/colin/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/Users/colin/.gitlibs/libs/org.clojure/data.json/13e9d244678be7b235bb24a10310f9d147ea088d/src/main/clojure:/Users/colin/dev/tools.deps.alpha/test-project/sub-project/src:/Users/colin/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/Users/colin/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar

cfleming03:06:49

Here the first classpath with no alias gives an error that the manifest is not supplied.

cfleming03:06:06

The second doesn’t give that error, but returns an incorrect classpath.

cfleming03:06:40

I add the manifests:

cfleming03:06:45

~/d/t/test-project (master)> tree .
.
├── deps.edn
└── sub-project
    ├── deps.edn
    └── sub-sub-project
        └── deps.edn

2 directories, 3 files
~/d/t/test-project (master)> cat deps.edn
{:deps {org.clojure/data.json {:git/url ""
                               :sha     "13e9d244678be7b235bb24a10310f9d147ea088d"}
        test/sub-project      {:local/root    "sub-project"
                               :deps/manifest :deps}}}
~/d/t/test-project (master)> cat sub-project/deps.edn
{:deps {org.clojure/data.json {:git/url ""
                               :sha     "0f06ca5eb08726e74b2dab8654923894b7ace6af"}
        test/sub-sub-project  {:local/root    "sub-sub-project"
                               :deps/manifest :deps}}}
~/d/t/test-project (master)> cat sub-project/sub-sub-project/deps.edn
{:deps {}}

cfleming03:06:15

And then both work:

cfleming03:06:19

~/d/t/test-project (master)> clojure -Spath
src:/Users/colin/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/Users/colin/.gitlibs/libs/org.clojure/data.json/13e9d244678be7b235bb24a10310f9d147ea088d/src/main/clojure:/Users/colin/dev/tools.deps.alpha/test-project/sub-project/src:/Users/colin/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/Users/colin/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar:/Users/colin/dev/tools.deps.alpha/test-project/sub-sub-project/src
~/d/t/test-project (master)> clojure -Spath -C:test
test:src:/Users/colin/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/Users/colin/.gitlibs/libs/org.clojure/data.json/13e9d244678be7b235bb24a10310f9d147ea088d/src/main/clojure:/Users/colin/dev/tools.deps.alpha/test-project/sub-project/src:/Users/colin/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/Users/colin/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar:/Users/colin/dev/tools.deps.alpha/test-project/sub-sub-project/src

cfleming03:06:26

Then if I remove the manifest, I get the error with both:

cfleming03:06:31

~/d/t/test-project (master)> cat deps.edn
{:deps {org.clojure/data.json {:git/url ""
                               :sha     "13e9d244678be7b235bb24a10310f9d147ea088d"}
        test/sub-project      {:local/root    "sub-project"}}}
~/d/t/test-project (master)> cat sub-project/deps.edn
{:deps {org.clojure/data.json {:git/url ""
                               :sha     "0f06ca5eb08726e74b2dab8654923894b7ace6af"}
        test/sub-sub-project  {:local/root    "sub-sub-project"}}}
~/d/t/test-project (master)> clojure -Spath
Error building classpath. Manifest type not detected when finding deps for test/sub-sub-project in coordinate #:local{:root "sub-sub-project"}
~/d/t/test-project (master)> clojure -Spath -C:test
Error building classpath. Manifest type not detected when finding deps for test/sub-sub-project in coordinate #:local{:root "sub-sub-project"}

alexmiller04:06:35

too tired to read all that atm but there is a known issue that the caching will not notice when local dep project classpaths change, so you need to -Sforce to recompute. not sure if that’s what you’re seeing. I have a plan to fix that just haven’t had time to work on it yet.

alexmiller04:06:39

if you think there’s a bug, please feel free to drop it in a ticket so I can look at it later as this will get lost

gfredericks19:06:59

what's the right way to call clojure with a script going to stdin? it works okay with no args, but prints a bunch of repl prompts I don't want

alexmiller21:06:52

We don’t have that level of repl control with clojure.main

alexmiller21:06:31

Well, maybe the repls not involved there?

gfredericks21:06:48

$ echo '(println 42)' | clojure
Clojure 1.9.0
user=> 42
nil
user=> 
is what I'm referring to

alexmiller21:06:54

Isn’t there a - option you can pass?

gfredericks21:06:18

there is, that's probably all I need

richiardiandrea21:06:11

Oh awesome didn't know that either 😃