Skip to content

Allow referring to current module version using _#43

Open
jaor wants to merge 2 commits intojcrossley3:masterfrom
bigmlcom:module-versions
Open

Allow referring to current module version using _#43
jaor wants to merge 2 commits intojcrossley3:masterfrom
bigmlcom:module-versions

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