Skip to content

Cargo's CI is not validating that the Cargo.lock is up-to-date correctly. #12082

Closed

Description

The check here does not properly check if Cargo.lock is up-to-date.

For example, current master has the following diff:

diff --git a/Cargo.lock b/Cargo.lock
index 8b8a0ed1c..0c1752488 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1403,7 +1403,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4fc78f47095a0c15aea0e66103838f0748f4494bf7a9555dfe0f00425400396c"
 dependencies = [
  "bstr",
- "home 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "home 0.5.5",
  "once_cell",
  "thiserror",
 ]

AFAIK, the only way to check if it is up-to-date without running a build is to use cargo metadata --locked or cargo tree --locked. I'm not sure what the decisions were for making this a separate step instead of just adding --locked to the normal test command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-infrastructureArea: infrastructure around the cargo repo, ci, releases, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions