CompatHelper.jl icon indicating copy to clipboard operation
CompatHelper.jl copied to clipboard

Allow `strict_version` entries

Open ven-k opened this issue 2 years ago • 6 comments

  • strict_version helps to restrict the version bumps to exact "= major.minor.patch" .
  • This is useful when you depend on packages that don't always follow the semver and you want automated test+bump for each release.
  • Only the Entries of format PkgName = "= a.m.x" are bumped to PkgName = "= b.n.y", whenever bump_compat_containing_equality_specifier=true and strict_version=true, while the rest go through usual bump.

ven-k avatar Apr 18 '22 12:04 ven-k

Waiting for status to be reported - which status is being expected here?

ven-k avatar Apr 21 '22 09:04 ven-k

bors try

mattBrzezinski avatar Apr 21 '22 14:04 mattBrzezinski

I might be misunderstanding this feature, but I don't think this makes sense to include in CompatHelper.

The goal of CompatHelper is to notify package authors about breaking releases of upstream dependencies.

For your use case, what I think you should be doing is:

  1. Check your Manifest.toml file into source control.
  2. When you run your test suite, run it with Pkg.test(; allow_reresolve = false), which enforces that the versions in your manifest file must be used during the test suite.

DilumAluthge avatar Apr 21 '22 18:04 DilumAluthge

I want the versions in MyPkg to be bumped but something like PkgA = "= 0.3.0" be bumped to PkgA = "= 0.3.1" or PkgA = "= 0.4.0" ... i. e retain the {equals sign MAJOR.Minor.patch} in Project.toml compat entry

Currently If I've PkgA = "= 0.3.0" & bump_compat_containing_equality_specifier=true, it bumps to PkgA = "0.4" & drops = sign.

For your use case... Check your Manifest.toml file into source control

I want MyPkg to be imported and used in a MegaPkg and these strict versions be maintained for PkgA, when MegaPkg's Manifest is being resolved. Picking the PackageSpec from (MyPkg)Manifest+add while resolving becomes an added task, adding these troublesome packages each time gets out of hand when there are too many such instances.

So currently, its a trade-off between equals sign in the compat or automatic bumps. I want both.

ven-k avatar Apr 25 '22 10:04 ven-k