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

Update dependency lower bounds and test with CI #120

Merged
merged 11 commits into from
Feb 14, 2024
Merged

Update dependency lower bounds and test with CI #120

merged 11 commits into from
Feb 14, 2024

Conversation

sethaxen
Copy link
Member

As suggested by https://www.stochasticlifestyle.com/semantic-versioning-semver-is-flawed-and-downgrade-ci-is-required-to-fix-it/, this PR adds a CI step that downgrades all dependencies to their lower bounds before running CI.

This required bumping some lower bounds that were incompatible with other dependencies. Most of these are within the same version series by semver, the exception being that we drop support for SpecialFunctions 0.8, 0.9, 0.10. This should be fine though, since the current version is 2.x.x.

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (20ffbc2) 96.65% compared to head (eef39d2) 96.65%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #120   +/-   ##
=======================================
  Coverage   96.65%   96.65%           
=======================================
  Files          11       11           
  Lines         867      867           
=======================================
  Hits          838      838           
  Misses         29       29           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coveralls
Copy link

coveralls commented Feb 13, 2024

Pull Request Test Coverage Report for Build 7899028199

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.544%

Totals Coverage Status
Change from base Build 7746036385: 0.0%
Covered Lines: 838
Relevant Lines: 868

💛 - Coveralls

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the downgrade CI is a bit restrictive - it's not a problem if Pkg can't resolve all lower bounds at the same time, as long as for each lowest bound the oldest version of packages that it can be resolved with passes the tests, is it?

Nevertheless, I think the checks are helpful. The lower bounds of docs/Project.toml are not tested though, are they (just curious due to the update of docs/Project.toml)?

@sethaxen
Copy link
Member Author

IMO the downgrade CI is a bit restrictive - it's not a problem if Pkg can't resolve all lower bounds at the same time, as long as for each lowest bound the oldest version of packages that it can be resolved with passes the tests, is it?

Agreed, it's just that this would require too many checks. IMO the downgrade approach makes sense if the changes it requires are not too strict. If there's a dependency (e.g. SpecialFunctions) that we really don't want to downgrade, we could of course tell the action to skip it. But we wouldn't be able to test older versions of SpecialFunctions without lowering the lower bounds of Distributions and StatsFuns, and at that point, we wouldn't be able to simultaneously test these lower bounds.

Nevertheless, I think the checks are helpful. The lower bounds of docs/Project.toml are not tested though, are they (just curious due to the update of docs/Project.toml)?

No, and they would require some updates. The only change I made there was to match the lower bounds used for the package/test, since I think it generally makes sense to keep these consistent.

@sethaxen
Copy link
Member Author

Locally everything passes if I downgrade both Project.toml and test/Project.toml, but the action only downgrades Project.toml: cjdoris/julia-downgrade-compat-action#3

I'll troubleshoot.

EvoTrees recent versions use a method of `Tables.DataAPI.nrow` only defined in Tables v1.11.
@devmotion
Copy link
Member

Regarding test/Project.toml - could we switch back to an extras section in Project.toml? IIRC test/Project.toml was at some point useful to work around issues with test dependencies and the Pkg reaolver but maybe these problems are fixed?

@sethaxen
Copy link
Member Author

Regarding test/Project.toml - could we switch back to an extras section in Project.toml? IIRC test/Project.toml was at some point useful to work around issues with test dependencies and the Pkg reaolver but maybe these problems are fixed?

Done!

I checked locally, and to build docs with lower bounds, we would additionally need to change the following in Project.toml:

  • DataStructures = "0.18.3" to DataStructures = "0.18.13"
  • MLJBase = "0.20, 0.21, 1" to MLJBase = "0.21.11, 1"
  • MLJModelInterface = "1.6" to MLJModelInterface = "1.7"

And in docs/Project.toml:

  • MLJBase = "0.20, 0.21, 1" to MLJBase = "0.21.11, 1"
  • MLJIteration = "0.5, 0.6 to MLJIteration = "0.5.1, 0.6

MLJBase is the only important one of these, and since v1 is out, it doesn't seem like a problem to make the update. But we also won't be building the docs with downgraded versions yet. Perhaps in the future we could do it as a test when the github action supports it. So I'm neutral about making these changes.

@devmotion
Copy link
Member

I think I tend to view the doc environment as a "dynamic" environment rather than a package: version bounds are useful to avoid breakages due to a dependency (and CompatHelper notifies us about breaking releases) but we're only interested in building docs with the latest compatible releases of the dependencies and don't want to rebuild the docs with older versions. Hence I think we could generally remove any older semver-breaking versions in the docs, and we could even update it to the latest versions only (but IMO the latter is not neccessary).

@sethaxen
Copy link
Member Author

IIUC, that would mean at least bumping the docs versions as suggested in #120 (comment), but leaving Project.toml as is. I prefer this also.

This avoids an error that only manifests on ~0.14.7 when using a single thread
@sethaxen sethaxen merged commit 22220fc into main Feb 14, 2024
12 checks passed
@delete-merged-branch delete-merged-branch bot deleted the downgradeci branch February 14, 2024 11:25
@devmotion devmotion mentioned this pull request Feb 16, 2024
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