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

[release-0.13.x] fix(CI): Add Cargo.lock.msrv for CI tests #496

Merged
merged 2 commits into from
Nov 7, 2023

Commits on Nov 6, 2023

  1. Commit a Cargo.lock.minimal that works with our MSRV

    This is not so trivial.  In theory,
        cargo +nightly update -Z minimal-versions generate-lockfile
    ought to work.
    
    However, there are rather many places in our dependency tree where
    some crate A depends on crate B, version V, but it actually doesn't
    build with version V, but requires something considerably newer.
    There seemed to be particular problems in the parts of the dependency
    graph near "pest".  My attempts at starting with the minimal versions
    and upgrading crates as needed, were not successful.
    
    However, I was able to converge reasonably quickly from the other end:
    starting with the lockfile generated by 1.59, using recent versions,
    and then repeatedly downgrading crates whose (actual, or declared)
    MSRV was too high.
    
    I used the following recipe on 2023-10-24 to generates this lockfile:
        Bump Tokio dependency to 1.29 in Cargo.toml
        cargo +1.59 generate-lockfile
        cargo +nightly update -Z minimal-versions -p linux-raw-sys
        cargo +nightly update -Z minimal-versions -p tokio
        cargo +nightly update -Z minimal-versions -p rustix
        cargo +nightly update -Z minimal-versions -p tempfile
        cargo +nightly update -Z minimal-versions -p reqwest
        cargo +nightly update -Z minimal-versions -p byteorder
        cargo +nightly update -Z minimal-versions -p h2
        cargo +nightly update -Z minimal-versions -p log
        cargo +nightly update -Z minimal-versions -p tokio
        cargo +nightly update -Z minimal-versions -p tokio-util@0.7.9
        Discard the Tokio dependency update
    
    So that is what we commit here.
    
    This is unprincipled, and the recipe above has already rotted by
    2023-11-06.  In the future (especially on the mainline) we can
    hopefully have a more principled approach.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    9e44d13 View commit details
    Browse the repository at this point in the history
  2. Use Cargo.lock.msrv in CI tests

    This will prevent our CI breaking due to updates to our dependencies.
    
    Because of the way the msrv.yml file is constructed, it was not
    straightforward to use the committed lockfile only for the MSRV tests.
    
    It would be better to use a different lockfile, with latest versions
    of our dependencies, for non-MSRV tests.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    8952a04 View commit details
    Browse the repository at this point in the history