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 · 1 comment · May be fixed by #368
Open

pkg_ref alters semantic versioning of source packages #364

Gotfrid opened this issue Feb 20, 2025 · 1 comment · May be fixed by #368
Labels
Difficulty: Low No foreseable design or implementation challenges

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

@emilliman5
Copy link
Collaborator

This looks benign to me as well. Please feel free to create a PR, I would be happy to review it.

@emilliman5 emilliman5 added the Difficulty: Low No foreseable design or implementation challenges label Mar 11, 2025
@llrs-roche llrs-roche linked a pull request Mar 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Low No foreseable design or implementation challenges
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants