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
Meson does not allow strings like X.Y.Z+META
to be used as the library version
#10565
Comments
Some projects use metadata when versioning, such as the OBS build system. When trying to pass a version from such projects to the meson build script and use it as a dynamic library version, an error is thrown that the version should look like X.Y.Z. However, Semantic Versioning 2.0 assumes the use of metadata in the version, see: https://semver.org/#spec-item-10 This commit adds support for metadata in dynamic library versions. Fixes an issue: mesonbuild#10565
X.Y.Z+<branch>.<date>.<commit>
to be used as the library versionX.Y.Z+META
to be used as the library version
It doesn't assume it, it permits it. :) And I honestly don't think I've ever seen this in a library version before. :) Considering e.g. the libtool versioning convention, I wouldn't even assume library versions follow a 3-part semver, let alone one with optional metadata, regardless of what project versions do.
I wouldn't say that's difficult. Or common. If someone is replacing a plus with a period, then they are specifically trying to handle this uncommon use case. It will always trigger the assert and fail, but if the version is used for something other than a library version, you could handle the library version much more simply: use |
Some projects use metadata when versioning, such as the OBS build system. When trying to pass a version from such projects to the meson build script and use it as a dynamic library version, an error is thrown that the version should look like X.Y.Z. However, Semantic Versioning 2.0 assumes the use of metadata in the version, see: https://semver.org/#spec-item-10 This commit adds support for metadata in dynamic library versions. Fixes an issue: mesonbuild#10565
Some projects use metadata when versioning, such as the OBS build system. When trying to pass a version from such projects to the meson build script and use it as a dynamic library version, an error is thrown that the version should look like X.Y.Z. However, Semantic Versioning 2.0 assumes the use of metadata in the version, see: https://semver.org/#spec-item-10 This commit adds support for metadata in dynamic library versions. Fixes an issue: mesonbuild#10565
Some projects use metadata when versioning, such as the OBS build system. When trying to pass a version from such projects to the meson build script and use it as a dynamic library version, an error is thrown that the version should look like X.Y.Z. However, Semantic Versioning 2.0 permits the use of metadata in the version, see: https://semver.org/#spec-item-10 This commit adds support for metadata in dynamic library versions. Fixes an issue: mesonbuild#10565
Some projects use metadata when versioning, such as the Sailfish OS build system. When trying to pass a version from such projects to the meson build script and use it as a dynamic library version, an error is thrown that the version should look like X.Y.Z. However, Semantic Versioning 2.0 permits the use of metadata in the version, see: https://semver.org/#spec-item-10 This commit adds support for metadata in dynamic library versions. Fixes an issue: mesonbuild#10565
Describe the bug
I am passing the version using the meson options from the rpm spec file.
When using the Sailfish OS build system, the version has metadata at the end, which also gets into the meson build script.
Previously, I used
cmake
, which allowed you to specify strings of this format as the version of the library.Meson
throws an error that the version must beX.Y.Z
. However,Semantic Versioning 2.0
assumes the use of metadata in the version, see this.This makes it difficult to write meson scripts, as it is very common to write something like this:
To Reproduce
Expected behavior
Behavior similar to
cmake
: output librarylibexample.so.0.1.0+master.20220705111300.6e4b184
system parameters
meson --version
: 0.62.2ninja --version
if it's a Ninja build: 1.10.0The text was updated successfully, but these errors were encountered: