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): Commit an MSRV compatible Cargo.lock #492

Closed
wants to merge 3 commits into from

Commits on Oct 24, 2023

  1. Require tokio 1.29

    We want a later version than 1.0 since earlier versions have various
    bugs, and also dependency versions which are insufficient to rule out
    bugs in lower crates.
    
    Emprically, 1.30 requires a newer Rust than our MSRV.
    Therefore, request 1.29.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    f1445bc View commit details
    Browse the repository at this point in the history
  2. Remove Cargo.lock from .gitignore

    This will allow us to pin the dependencies in CI, avoiding
    uncontrolled changes from our dependencies causing our workflows to
    break.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    32d99d0 View commit details
    Browse the repository at this point in the history
  3. Commit a Cargo.lock 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 actualloy 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 atteempts 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.
    
    the following recipe generates a working lockfile:
        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
    
    So that is what we commit here.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    5c4c72d View commit details
    Browse the repository at this point in the history