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

pkg_ref alters semantic versioning of source packages #364

Open
Gotfrid opened this issue Feb 20, 2025 · 0 comments
Open

pkg_ref alters semantic versioning of source packages #364

Gotfrid opened this issue Feb 20, 2025 · 0 comments

Comments

@Gotfrid
Copy link
Contributor

Gotfrid commented Feb 20, 2025

Some packages on CRAN follow x.y-z semantic versioning convention, for example sf, abind.

riskmetric::pkg_ref changes the semantics to be x.y.z due to the usage of base::package_version() specifically when working with the source packages.

I think it is conceptually not ideal, because later it is not possible to join assessment data with the original package DESCRIPTION meta info.

I am opening this issue to understand better why the line of code linked above is necessary, and why can't we use a string representation of the version. I am definitely missing some broader context here.

My initial thought was version comparisons, but it works fine with the standard library function:

version_old <- "1.1-1"
version_new <- "1.1-2"
utils::compareVersion(version_new, version_old)

cc @llrs-roche

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant