Hello, this is probably a very obvious and basic question, I just would like to see it specified unambiguously so I don’t have to guess.
I’m doing some research into pinning dependencies across a variety of my Elixir projects (to keep all repos on the same version). I use asdf
and I will be specifying the pinned version in a file called .tool-versions
in the root project directory of the repo.
I’m trying to figure out whether I should, as a best practice, be pinning a patch version (e.g. 25.3.2
) or the branch version (e.g. 25.3.2.10
).
Here is a relevant line from the documentation:
In general, versions can have more than three parts. The versions are then only partially ordered. Such versions are only used when branching off from another branch. When an extra part (out of the normal three parts) is added to a version number, a new branch of versions is made. The new branch has a linear order against the base version. However, versions on different branches have no order, and therefore one can only conclude that they all include what is included in their closest common ancestor. When branching multiple times from the same base version, 0 parts are added between the base version and the least significant 1 part until a unique version is found. Versions that have an order can be compared as described in the previous paragraph.
Since the branch versions are not a linear succession of each other (but are only guaranteed to have the specified patch version (e.g. 25.3.2
) as a common ancestor), that means that all I’m doing is pinning an unnecessarily-specific bugfix as a dependency, right?
The version 6.0.2.1 will include all changes in 6.0.2. However, 6.0.3 will most likely not include all changes in 6.0.2.1 (note that these versions have no order)
Reading this, I’m totally at a loss. Please tell me what makes more sense: Pin the patch, or pin the branched version?
Thanks