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

Allow strict_version entries #411

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ven-k
Copy link

@ven-k ven-k commented Apr 18, 2022

  • 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 ven-k marked this pull request as draft April 18, 2022 12:28
- bump_compat_containing_equality_specifier and strict_version should be true
@ven-k ven-k marked this pull request as ready for review April 18, 2022 13:16
@ven-k
Copy link
Author

ven-k commented Apr 21, 2022

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

@mattBrzezinski
Copy link
Member

bors try

bors bot added a commit that referenced this pull request Apr 21, 2022
@DilumAluthge
Copy link
Member

DilumAluthge commented Apr 21, 2022

EDIT: I've since changed my opinion on this PR.

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 DilumAluthge marked this pull request as draft April 21, 2022 18:51
@ven-k
Copy link
Author

ven-k commented Apr 25, 2022

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.

@DilumAluthge
Copy link
Member

It's been a couple years since this PR was first opened. When it was first opened, I was opposed to this feature. Since then, however, I've been thinking about it some more, and now I'm in favor of adding this feature.

It does look like we'll have to rebase and fix a lot of merge conflicts, or recreate the branch from scratch.

@DilumAluthge DilumAluthge marked this pull request as ready for review May 20, 2024 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants