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

feat: Use cargo --locked whenever possible #3562

Closed
wants to merge 3 commits into from

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Mar 7, 2023

Description

Since #3399 we are tracking the Cargo.lock file via
version control. Currently CI does not fail when the checked in Cargo.lock is not up-to-date.

Fixes #3547.

Links to any relevant issues

> Since libp2p#3399 we are tracking the `Cargo.lock` file via
version control. Currently CI does not fail when the checked in `Cargo.lock` is not up-to-date.

libp2p#3547
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

LGTM, TIL I wasn't aware about this feature :) Though maybe we only need it on one of the jobs like test.

@mergify

This comment was marked as resolved.

Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

It seems a bit verbose to add the flag everywhere. How about we just add it to the clippy job?

@@ -227,7 +227,7 @@ jobs:
- uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 #v1.3.0

- name: Check formatting
run: cargo fmt -- --check
run: cargo --locked fmt -- --check
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems unnecessary?

@@ -270,7 +270,7 @@ jobs:

- uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1

- run: cargo install --version 0.10.0 pb-rs --locked
- run: cargo --locked install --version 0.10.0 pb-rs --locked
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too. This doesn't actually use our lock file.

@thomaseizinger
Copy link
Contributor

Check #3587 for an alternative to this.

@thomaseizinger
Copy link
Contributor

Closing as it has been superseded by #3587 and #3589.

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.

ci: always run cargo with --locked
3 participants