Open charles-dyfis-net opened 6 years ago
I tried moving to a new upstream Aether (now "Apache Maven Resolver", since the ASF took over maintainership but hasn't been granted the trademark). No change in behavior, but might be useful if we need to communicate with the library's authors; will be submitting another PR.
It appears likely that this is an issue reading :repositories
from project.clj, not an issue with the actual Aether code, as this can be resolved perfectly well in a REPL when manually configuring the redhat
repository:
(require 'webnf.dwn.deps.aether)
(in-ns 'webnf.dwn.deps.aether)
(repo-for [["com.googlecode" "jsendnsca-core" "1.3.1"]]
(aether-config :include-optionals false
:include-scopes #{"compile"}
:repositories (assoc default-repositories
"redhat" "https://maven.repository.redhat.com/ga/")))
...does not generate the warning unless the "redhat" entry is removed.
Ed: And not even a bug, but just an unimplemented feature; apparently I saw the logic in question in a competing project and confused it with this one.
yep, reading repositories from leiningen is TBD
additionally, the set of base repositories should probably be matched to leiningen's. I'll see what i can do ...
I'm halfway through an attempt to do that myself (updated lein.reader to extract the content, haven't yet plumbed that data through) -- should I drop it to avoid duplicating effort?
No worries, I was just about to document a quick workaround. Haven't even touched lein.reader yet ..
(It is interesting that leiningen and Maven don't require the "redhat" repo to be configured before they're able to download jsendnsca-core
as a dependency of cljr-nsca
-- I'm guessing the POM for [cljr-nsca "0.0.3"]
specifies a repository URL to search for its dependencies but haven't yet validated as much).
OK, I see, how I missed that wenn porting pomegranate.aether
, since dwn doesn't use maven's resolve-everything call, but implements its own most-recent-discoverable-wins resolution algorithm, geared towards determinism.
So, in deps.aether
, we'd need to augment the passed in repositories with the per-dependency repositories [1], pass them down the tree, and record all discovered repositories in the final repo.edn
, for deps.expander
to use.
Given the following
project.clj
:Running
dwn gen-repo ./project.nix
emits the error:This still happens when requiring
jsendnsca-core
directly, and explicitly including the repository in which it's hosted:See the POM at https://maven.repository.redhat.com/ga/com/googlecode/jsendnsca-core/1.3.1/jsendnsca-core-1.3.1.pom, and the entry at https://mvnrepository.com/artifact/com.googlecode/jsendnsca-core/1.3.1