reifyhealth / lein-git-down

A Leiningen plugin for resolving dependencies from Git
MIT License
82 stars 6 forks source link

Improve warnings for non-JVM cloned repositories #24

Closed vemv closed 5 years ago

vemv commented 5 years ago

Hey there,

as part of my testing, I added as a dependency a "non-JVM" one, i.e. a random repo without a Maven-compatible manifest.

These are the outputs for the first and second runs:

~/key (lein-git-down*) $ lein deps
Retrieving estiu/reputation/a003c483aa9f276de8cc35b3e5b98796b4e258c2/reputation-a003c483aa9f276de8cc35b3e5b98796b4e258c2.pom from private-github
Could not find known build tooling so generating simple pom. Transitive dependencies will NOT be resolved. (Hint: supported manifests: project.clj, pom.xml, and deps.edn)
Could not find remote git repository. Did you add the git coordinates to the `:git-down` key in project.clj? If so, you may not have permissions to read the repository if it is private.
Could not find remote git repository. Did you add the git coordinates to the `:git-down` key in project.clj? If so, you may not have permissions to read the repository if it is private.
Retrieving estiu/reputation/a003c483aa9f276de8cc35b3e5b98796b4e258c2/reputation-a003c483aa9f276de8cc35b3e5b98796b4e258c2.jar from private-github
Created /Users/vemv/.gitlibs/libs/estiu/reputation/a003c483aa9f276de8cc35b3e5b98796b4e258c2/target/reputation-a003c483aa9f276de8cc35b3e5b98796b4e258c2.jar
~/key (lein-git-down*) $ lein deps
Could not find remote git repository. Did you add the git coordinates to the `:git-down` key in project.clj? If so, you may not have permissions to read the repository if it is private.
Could not find remote git repository. Did you add the git coordinates to the `:git-down` key in project.clj? If so, you may not have permissions to read the repository if it is private.

It seems to me that the Could not find remote git repository message is misleading, it should say instead that a repo was found but it wasn't valid.

Such message is in fact there (Could not find known build tooling so generating simple pom), but maybe it should be the only one being displayed.

Else it seems as if there was a ssh config problem, which I was actually believing for a few minutes.

WDYT?

Cheers - Victor

manderson202 commented 5 years ago

I'm having trouble reproducing this one. I tried adding some non-JVM private repositories (eg: Ruby, JavaScript) and only received the "Retrieving..." and "Could not find..." messages on the initial lein deps and then no messages on the second. Any thoughts on how I can reproduce?

vemv commented 5 years ago

Hey there, sorry for the delay!

I can keep reproducing in a real, large project for which a custom ~/.lein profile is also quite essential.

OTOH, I cannot reproduce it in a minimal project.

For being able to track down the exact culplit, I would suggest that the following message:

Could not find remote git repository. Did you add the git coordinates to the :git-down key in project.clj? If so, you may not have permissions to read the repository if it is private.

...includes the actual repository that failed to be fetched.

manderson202 commented 5 years ago

@vemv just pushed 0.3.3 to Clojars with the updated warn message. Hopefully this helps track down the issue.

vemv commented 5 years ago

Ace, thank you!

This is the message I'm getting:

Could not find remote git repository at lein_git_down.git_wagon$git_uri@5772ec72.
Did you add the git coordinates to the `:git-down` key in project.clj?
If so, you may not have permissions to read the repository if it is private.

This is in a large project (+ lein profile) with no git deps at all so far. I certainly don't have something with 5772ec72 in its version, so sadly I still can't know the dep at fault

manderson202 commented 5 years ago

That's an error on our part. We'll get a fix in to print the actual missing URI. Sorry about that.

manderson202 commented 5 years ago

Ok, 0.3.4 should be in Clojars now.

vemv commented 5 years ago

Thanks!

I get better reports now. Turns out, my diagnostic ("non-JVM cloned repositories") was mislead.

I'll close this issue and open a cleaner one.