Skip to content

Transitive dependency issue#11

Open
msamec wants to merge 1 commit into
mainfrom
feature/update-pom.xml
Open

Transitive dependency issue#11
msamec wants to merge 1 commit into
mainfrom
feature/update-pom.xml

Conversation

@msamec

@msamec msamec commented May 10, 2022

Copy link
Copy Markdown
Contributor

Problem

Since this package is neither on maven or clojar it has to be fetched from git directly. Since I only use Lein, fetching directly from git is not supported out of the box, so I'm using this plugin https://github.com/reifyhealth/lein-git-down to fetch git dependencies. This plugin supports transitive dependency (as can be seen here https://github.com/reifyhealth/lein-git-down#transitive-dependencies) but it seems like if it loads pom.xml without dependencies defined, it will not look for dependencies in deps.edn.

That wouldn't be a problem in it self but I also use nl.mediquest/duct.module.reitit "1.0.3" package which for this particular verions uses metosin/malli "0.2.1". And since the transitive dependency is not working, funicular uses version 0.2.1 which is problem as minimum verions for this package to work is 0.3.0

Solution

Update pom.xml to match deps.edn with simple clojure -Spom

How to reproduce

Create Lein project and add following into project.clj

:dependencies [
   ...
   [com.verybigthings/funicular "6e8226ff1469436e89743a5281c25033d9076fb8"]
   ...
]
:plugins[
   ...
   [reifyhealth/lein-git-down "0.4.1"]
   ...
]
:git-down {
   ...
   com.verybigthings/funicular {:coordinates verybigthings/funicular}
   ...
}

Then add funicular and create simple route that has input-schema :any and it will throw error

Execution error (ExceptionInfo) at malli.core/-fail! (core.cljc:79).
:malli.core/invalid-schema {:schema :any}

How to test

Just point funicular to use this commit and the error will disappear.

:dependencies [
   ...
   [com.verybigthings/funicular "17cb7f240f5cad88596f539a399fb074e3f9d9ff"]
   ...
]

@msamec msamec requested review from neektza and retro May 10, 2022 07:21
@neektza

neektza commented May 12, 2022

Copy link
Copy Markdown
Contributor

@msamec @retro does this mean we would also have to run clojure -Spom whenever we update Funicular deps?

@msamec

msamec commented May 12, 2022

Copy link
Copy Markdown
Contributor Author

@msamec @retro does this mean we would also have to run clojure -Spom whenever we update Funicular deps?

Another solution would be to remove pom.xml altogether. I just updated the file because I wasn't sure why was it there in the first place so I didn't want to delete it. If we delete it, that should also solve the above issue because the plugin mentioned will look at deps.edn for dependencies.

As far as I can see Maven is not used as build tool here but just Cli tools so my guess is this can be removed but I guess @retro will know more why this file is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants