JuliaRegistries / RegistryCI.jl

Continuous integration (CI) tools for Julia package registries, including registry consistency testing, automatic merging (automerge) of pull requests, and automatic TagBot triggers
https://juliaregistries.github.io/RegistryCI.jl/stable
Other
31 stars 30 forks source link

Version numbers containing a build number #437

Closed plut closed 2 years ago

plut commented 2 years ago

Version numbers containing a build number (of the form v0.0.0+0) are always rejected by AutoMerge/guidelines.jl:

    if _has_prerelease_andor_build_data(new_version)
        return false,
        "Version number is not allowed to contain prerelease or build data",
        :invalid
    end

However, BinaryBuilder.jl does create version numbers including build numbers (example), and I see no explicit rule against such a format in the automatic merging guidelines (the rule really says nothing about build numbers).

Is the interdiction of build numbers on purpose? I would argue that allowing a build number bump is useful at least in the case of JLLs. Case in point, my JLL is a C++ -> C -> Julia double-wrapper. When I update the C code (e.g. exposing new functionality from the C++ library), I want to somehow bump the JLL package (so that pkg>up makes the new functionality available!), but there is also a tradition that the JLL version number should always track that of the original (in that case, C++) library — so, in that case, the only possible bump goes in the build number.

I also opened a matching issue in BinaryBuilder.jl since this happens on the interaction of those two packages.

DilumAluthge commented 2 years ago

This is intentional. For PRs made by the @jlbuild bot on behalf of Yggdrasil, we have a hardcoded exception to this rule. We only make this exception because Yggdrasil makes heavy use of build numbers.

Therefore, if you are using Yggdrasil, your JLL package is allowed to use build numbers and make build number bumps.

All other packages are expected to adhere to on the guidelines.

DilumAluthge commented 2 years ago

We should add a note to the documentation that version numbers are not permitted to include build numbers or be prerelease version numbers.

plut commented 2 years ago

This looks like build numbers are forbidden except when they are useful. Should not the exemption be expanded to all JLL builds however, instead of restricting it to a particular (if important) source? Right now this makes it gratuitously hard to test a JLL before inclusion in Yggdrasil (which is what I'm trying to do here).

giordano commented 2 years ago

Right now this makes it gratuitously hard to test a JLL before inclusion in Yggdrasil (which is what I'm trying to do here).

What does that mean? Why are you registering a JLL outside of Yggdrasil if you plan to move it to Yggdrasil?