-
Notifications
You must be signed in to change notification settings - Fork 470
Dune gives the wrong version when installed from source #12804
Description
Reported by @voodoos
After running
opam pin dune --dev-repo... when I print the version of Dune it says:3.12.0-2842-g6b7bdfeThis messes up with vscode detection of pkg features that relies on the version number being >= to 3.20
@voodoos also identified the source of the problem, which is that installing from source in this way, dune uses git describe at https://github.com/ocaml/dune/blob/main/boot/duneboot.ml#L1240-L1241
and since the current release process is not tagging main, this produces a misleading version.
It would be better that we do not include a version string at all, if we cannot print something accurate. However, moving the release process to use trunk based development should help alleviate a chunk of this pain.
An alternative is that we record the current version number in a file in the repo, and increment it as part of the release process. This is not an uncommon practice and I've had it work well in the past.