Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBetter warning when there is a classpath conflict for org.clojure/clojure #672
Comments
|
An another workaround is to make exclusions in dependencies, as I've described here https://stackoverflow.com/questions/43018876/classpath-conflict-org-clojure-clojure-version-1-7-0-already-loaded-not-loadin/48282148#48282148 But it's better to resolve this warning by inclusion of proper version of Clojure. And in case you forget to include Clojure in app dependency list, you may end up with the bug, when uber jar is compiled successfully, but application can not find its entry point when launched. I spend almost a day figuring out this bug. Hope it helps someone. |
|
@mprokopov Would you be interested in providing a PR for this? |
|
@martinklepsch I think this is good idea to provide some hints in warning message to resolve this issue for an end user, but this warning could easily be other than org.clojure/clojure. Inclusion of dependency in top dependency tree seems to be proper resolution for any library with such warning. Is it reasonable to advice user to include dependency in a such way? Maybe it's just worth to be noted in README/FAQ for boot. |
|
I think While having multiple Also note that the code checks for Clojure specifically and then warns "NOT loading" whereas with regular libraries it warns "ALSO loading: boot/boot/core/src/boot/core.clj Lines 240 to 248 in cb923ee Besides a warning we could also just add the version of Clojure to the list of So — following suggestion:
Does that sound good to you? |
|
@mprokopov hey again! Just wanted to check what you think about my suggestion and if you’d be interested to help with this? |
|
Hi again! I think it's better just to make this warning a bit better with explanation you suggested:
But it would be not so good, if this full warning message will be displayed several times. How do you think @martinklepsch, is it enough just to update boot wiki FAQ with your suggestion? |
The warning will only get printed three times if you call |
|
I would also mention that |
|
I agree with @martinklepsch , shadow-cljs is patching their dependencies and warning the user that setting the clojure version has no effect and to remove it. I think this is the correct way to reason about it. This prevents the user from creating a conflict to begin with. We could do the same, patch the version in the dependencies with whats in |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

If you specify a Clojure version in
boot.propertiesand don't specify the same Clojure version in your:dependenciesyou will get a warning like the one above.Not sure if this is worth it but we could provide some more context for the specific case of Clojure:
What do you think?