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

[BUG] Inconsistent r-speedglm version numbering: 0.3_5 instead 0.3.5 #152

Closed
brianmsm opened this issue Jun 19, 2023 · 8 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@brianmsm
Copy link

This is not an error directly associated with installing the package from the command line. However, the PKGBUILD configuration file does not follow the usual coding of _pkgver to request download on CRAN and pkgver to publish to repository so the versioning follows the archlinux guideline: https://wiki.archlinux.org/title/Arch_package_guidelines#Package_versioning

I see that in a previous commit those variables were removed to use only pkgver, although I'm not sure why: 25888a1

All other packages in this repository follow this proper versioning practice, e.g.: https://github.com/BioArchLinux/Packages/blob/master/BioArchLinux/r-lavaan/PKGBUILD

Desktop:

  • Desktop Enviroment: KDE
  • Linux Kernel: 6.3.8-zen1-1-zen
  • Package Version: speedglm 0.3_5

Additional context
Just to complement. Currently, speedglm versioning causes a conflict when trying to install under the bspm package: cran4linux/bspm#71

@brianmsm brianmsm added the bug Something isn't working label Jun 19, 2023
pekkarr added a commit that referenced this issue Jun 19, 2023
@pekkarr
Copy link
Member

pekkarr commented Jun 19, 2023

Thanks for reporting, it should get fixed when the package gets rebuilt in about an hour

@sukanka
Copy link
Member

sukanka commented Jun 20, 2023

@pekkarr plz note that according to arch wiki, dash in pkgver should be replaced with underscore instead of dot. see
https://wiki.archlinux.org/title/PKGBUILD#pkgver

@pekkarr
Copy link
Member

pekkarr commented Jun 20, 2023

dash in pkgver should be replaced with underscore instead of dot

On the other hand, the R package guidelines page has the following advice:

R allows packages to have colons and hyphens in their version, this is disallowed in PKGBUILDs. Convert these to a period or underscore.

Also almost all R packages in this repo and in AUR use dot as the replacement. I don't see any benefits to using underscores instead, so in my opinion we should continue using dots instead of underscores.

In addition to that, we are not only replacing hyphens but colons too, so replacing them both with a dot makes sense, because then we don't need different conversions for each of them and the same pkgver=${_pkgver//[:-]/.} definition works for both.

@sukanka
Copy link
Member

sukanka commented Jun 20, 2023

I suggest using underscore as we can get a one-to-one mapping between the R pkg version and pkgver in PKGBUILD.
the colon can be replaced with another symbol such as + (but this is not semantic.)

Also almost all R packages in this repo and in AUR use dot as the replacement.

Maybe they are all wrong? Most of them are maintained by us.


BTW, I'd like to add some examples from official repo,

@pekkarr
Copy link
Member

pekkarr commented Jun 21, 2023

Apparently colons aren't allowed in R package versions, as the Writing R Extensions guide states that

The mandatory ‘Version’ field gives the version of the package. This is a sequence of at least two (and usually three) non-negative integers separated by single ‘.’ or ‘-’ characters.

I also checked all packages in CRAN and Bioconductor, and none of them have a colon in version. So there's no need to have colon replacing code after all.

we can get a one-to-one mapping between the R pkg version and pkgver in PKGBUILD

What is the use case for this? Why would this be needed?

Maybe they are all wrong?

I don't think using either is wrong. The R package guidelines allow both, but for consistency we should choose one and use that in all R packages.

Most of them are maintained by us.

Even for the packages not maintained by us replacing with dot is far more common. I don't remember seeing any R package on AUR that uses underscore (except r-speedglm), probably because the templates in R package guidelines all use dot as the replacement.

I'd like to add some examples from official repo

Yeah, it seems that underscores are commonly used for replacing hyphens. However, dots are used too for that purpose. The most notable example of this is the official r package, that replaces hyphens in bundled R packages' versions with a dot when adding them to its provides array.

However, if we do decide to use underscores instead, that should be changed in all maintained R packages. Also the colon replacing code should be removed, probably at the same time if we switch to underscores.

@sukanka
Copy link
Member

sukanka commented Jun 22, 2023

Ok. Since the template in R packages guideline use dot for both hyphens and colon, let's keep this convention.

The most notable example of this is the official r package, that replaces hyphens in bundled R packages' versions with a dot when adding them to its provides array.

I have to mention that it is proposed by me.
https://bugs.archlinux.org/task/74850
So this does not persuade me.

But the template does.

@pekkarr
Copy link
Member

pekkarr commented Jun 23, 2023

Let's keep using dots then.

However, the R package guidelines aren't that accurate. They claim that upstream R package versions can contain colons, which is false. They also say to put packages in the LinkingTo field to depends, even though those should really go to makedepends (unless they're also in Depends or Imports).

@starsareintherose
Copy link
Member

Should this issue be closed?

@sukanka sukanka closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants