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

Allow referring to current module version using _

Open jaor opened this issue 6 years ago • 0 comments

Sometimes in projects you want the internal dependencies of a module to always refer to the current version of that module. Having to edit :versions in the parent every time a submodule version changes is a solution, but one can forget to do so and also it's a bit against the idea of self-discovery. This little patch makes available the versions of all modules to versionize, so that one can write

["module-a" "_"]

as a dep in "module-b" to refer to the current version of "module-a" in the project, without having to list "module-a" explictly in :versions.

The patch is ugly in that it uses mutation to hook into versionize, but modifying the actual versions maps in the project object in a way that it's seen in substasks doesn't seem possible without touching the project.clj. Just a suggestion more than a fully fledged PR.

jaor avatar Jul 05 '19 18:07 jaor