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

Git tags are not valid semvers #2409

Closed
jaques-sam opened this issue Sep 29, 2020 · 6 comments
Closed

Git tags are not valid semvers #2409

jaques-sam opened this issue Sep 29, 2020 · 6 comments
Labels
solution: invalid the issue is not related to the library

Comments

@jaques-sam
Copy link

Impossible to use conan version ranges because the git tags are not valid semver because of the 'v' prefix.
See https://docs.conan.io/en/latest/versioning/version_ranges.html.

Steps to reproduce:

  1. Specify "nlohmann_json/[~=v3.9]@clickshare/stable" in
  2. Error upon build is:
    ERROR: Version range '~=v3.9' from requirement 'nlohmann_json/[~=v3.9]@project/stable' required by '...' could not be resolved in local cache
@jaques-sam
Copy link
Author

It seems the documentation is not up-to-date as it says use nlohmann_json. I found in an earlier bug report to use jsonformoderncpp from vthiery. Anyway that works for me but the latest version is 3.7.3.

@nlohmann
Copy link
Owner

The Page you linked do not mention git tags. This page (https://git-scm.com/book/en/v2/Git-Basics-Tagging) describes that adding a v-prefix is common practice. I am not sure why this is a problem with Conan.

@jaques-sam
Copy link
Author

You're right, it's mainly git tagging which is not compatible with semver. Looks like only the v is the problem 🙄.

@nlohmann
Copy link
Owner

I don't really see a problem.

@t-b
Copy link
Contributor

t-b commented Sep 30, 2020

Looking at https://semver.org/ I find

No, “v1.2.3” is not a semantic version. However, prefixing a semantic version with a “v” is a common way (in English) to indicate it is a version number. Abbreviating “version” as “v” is often seen with version control. Example: git tag v1.2.3 -m "Release version 1.2.3", in which case “v1.2.3” is a tag name and the semantic version is “1.2.3”.

so IMHO it is conan's job to support v prefixes.

@nlohmann
Copy link
Owner

Closing this issue as it is not related to this library.

@nlohmann nlohmann added the solution: invalid the issue is not related to the library label Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: invalid the issue is not related to the library
Projects
None yet
Development

No branches or pull requests

3 participants