Specify build version of JLL package

If my package has a JLL dependency MyPkg_jll with version dependency MyPkg_jll="1.2.3" in the project file, then version v1.2.3+B will be installed, where B is the latest build version.

Now, if build_tarballs.jl of MyPkg_jll is updated and a new build version is released, then that will be automatically downloaded by all users before I have chance to run CI tests to see that it works on all platforms.

How can I specify the build version in the JLL dependency? Setting e.g. MyPkg_jll="1.2.3+4" under [[compat]] does not parse. I think it does what I want if I commit a bare bones Manifest.toml containing only

uuid = "..."
version = "1.2.3+4"

but is this really the preferred way of doing it?

Have you tried using different specifiers for the compatible version, e.g. equality like "=1.2.3"?
See here for more info: 6. Compatibility · Pkg.jl

I don’t know specifically if these also work for JLLs.

Tried now, but equality specifier for build version like "=1.2.3+4" does not work either.

Yeah, Julia (and Pkg, and the General registry) do not currently support build numbers in [compat] entries.

This became a bit of a problem recently for pandoc_crossref_jll because the upstream build number indicated which version of pandoc it was compiled against and that impacts compatibility with pandoc_jll. In the end, we reworked how pandoc-crossref version+build numbers map to pandoc_crossreful_jll version numbers so that we could specify things correctly in SemVer: [pandoc_crossref] Compat change requires version bump by omus · Pull Request #8896 · JuliaPackaging/Yggdrasil · GitHub