griffinbank / rules_clojure

Apache License 2.0
53 stars 8 forks source link

Issue with repository with many deps.edn files #23

Open kyle-hiller-nh opened 1 year ago

kyle-hiller-nh commented 1 year ago

Hello

I'm trying to test this library out for migrating a Clojure monorepo into a polyglot monorepo. I am personally not a Clojure dev and have limited experience with the tooling. Our structure is such that we have many directories containing deps.edn files

dir1/ 
    src/
    deps.edn
dir2/
    src/
    deps.edn

the deps.edn inside dir2 will look something like

{
    :paths
    ["src"]
    :deps
    {
     ...
     local-library { :local/root ../dir1/, :deps/manifest :deps }
    }
}

What I'm assuming its doing is that it's saying is that it is fetching the dependency from dir1 and specifying that the manifest file is from the :deps key stored in dir1, including that in the repository :local/root and then naming it local-library.

However, when I try to set up my clojure_tools_deps and gen_srcs to point at dir2, it gives me the following error:

Could not find metadata deps-ancient:deps-ancient/maven-metadata.xml in local

I'm guessing this is something to do with it not being able to recursively traverse the deps.edn so some transitive dependency specified in the dir1 library is missing?

Any advice on how to resolve this or corrections to my assumptions here would be helpful! This looks great and exactly like what we need.

arohner commented 1 year ago

Hey, sorry for the slow response, I missed the original email notification.

It looks like this will require implementing support for :local/root, which we haven't done yet. I have no immediate plans to implement it, so I think you'd have to build it if you'd like that to work.