Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow referring to current module version using _ #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jaor
Copy link

@jaor jaor commented Jul 5, 2019

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 added 2 commits July 5, 2019 18:32
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

```clojure
["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.
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.

1 participant