You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it looks like the fallback version is only used when pdm-backend completely fails reading anything from the SCM, i.e. the project is not a Git repository. When the project is a Git repository, but doesn't have any tags, pdm-backend will infer a version like 0.1.devN+gHASH.dDATE.
I'm in a situation where uv refuses to solve my dependencies, because my current project dev-depends on a library that depends on back the current project, and since the current project version is computed as 0.1.etc (because it doesn't have Git tags1) , it's not compatible with what the library requires, and uv fails. See astral-sh/uv#8148. I think uv should not fail, or have a config flag to ignore the current project version.
In the meantime, I'm trying to use the fallback version, but since my project is a Git repo, the fallback version doesn't seem to be used. That's also what I gather from reading the code:
scm_version=get_version_from_scm(
context.root, tag_regex=tag_regex, tag_filter=tag_filter
)
ifscm_versionisNone: # <-- probably false, and branch is not enterediffallback_versionisnotNone:
version=fallback_version
Do you think it would be feasible to use the fallback version if no tags were found, even though the project is a proper Git repository?
Footnotes
It doesn't have Git tags for various reasons. For example it could be a contributor fork, and GitHub doesn't copy tags when creating a fork. ↩
The text was updated successfully, but these errors were encountered:
Currently, it looks like the fallback version is only used when pdm-backend completely fails reading anything from the SCM, i.e. the project is not a Git repository. When the project is a Git repository, but doesn't have any tags, pdm-backend will infer a version like
0.1.devN+gHASH.dDATE
.I'm in a situation where uv refuses to solve my dependencies, because my current project dev-depends on a library that depends on back the current project, and since the current project version is computed as 0.1.etc (because it doesn't have Git tags1) , it's not compatible with what the library requires, and uv fails. See astral-sh/uv#8148. I think uv should not fail, or have a config flag to ignore the current project version.
In the meantime, I'm trying to use the fallback version, but since my project is a Git repo, the fallback version doesn't seem to be used. That's also what I gather from reading the code:
Do you think it would be feasible to use the fallback version if no tags were found, even though the project is a proper Git repository?
Footnotes
It doesn't have Git tags for various reasons. For example it could be a contributor fork, and GitHub doesn't copy tags when creating a fork. ↩
The text was updated successfully, but these errors were encountered: