deps-modules icon indicating copy to clipboard operation
deps-modules copied to clipboard

Intra-module dependencies

Open gravieure opened this issue 2 years ago • 1 comments

Hello, thanks for releasing this stuff; it looks really nice!

I'm looking into using deps-modules for library code, so dependencies can be managed, but applications can depend on a subset of the overall functionality. I'm wondering if there's a way to express intra-module dependencies with this tool.

Maven's module support lets you use ${project.groupId} and ${project.version} in your dependency to express that one module depends on another.

Is there a way to do this with deps-modules? Without a variable to refer to the current version of the project, modules can only depend on a previous version, not the current one, which requires a lot of manual updates and is prone to dependency diamonds.

gravieure avatar Sep 25 '23 14:09 gravieure

Sorry for the late reply, I just noticed the issue.

To answer your question: I am not sure.

deps-modules only do basic templating from some values found in a deps file to coordinates in another. So you can selectively only have a dependency "inherit" from some-of or all the values defined at the root, but that's about it. That means that if you express what you want with tools.deps alone, propagating that to multiple clj modules should be possible, but that's about it.

mpenet avatar Nov 06 '23 13:11 mpenet