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

chore: check-in Cargo.lock #2208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mxinden
Copy link
Collaborator

@mxinden mxinden commented Oct 28, 2024

This commit checks the Cargo.lock file into git.

Version controlling Cargo.lock makes e.g. our CI builds more reproducible, where two consecutive CI runs on the same commit use the same set of dependencies, even if a compatible update of a dependency was published in between the two runs.

This is also helpful when cutting patch releases of old Neqo versions, where dependencies since shipped a breaking change in a patch version, e.g. a MSRV update. See for example pinned dependencies in a recent Neqo patch release to the Neqo v0.6 family.

mxinden@66e60f3

While previously the recommendation by the cargo team was for libraries to not check in their Cargo.lock, this recommendation has since been replaced by "do what is best for the project".

https://blog.rust-lang.org/2023/08/29/committing-lockfiles.html


I generated a fresh Cargo.lock, i.e. ran rm Cargo.lock && cargo check && git add Cargo.lock.

We could as well base our Cargo.lock on mozilla-central's Cargo.lock. Though I can not think of a simple way to then keep the two in sync going forward.

Dependabot will attempt to keep the Cargo.lock up-to-date, in other words will open many pull requests updating patch versions. I don't know how to prevent this. Unfortunately, the Dependabot version-strategy parameter is not supported for the cargo ecosystem.

What do folks think?

This commit checks the `Cargo.lock` file into git.

Version controlling `Cargo.lock` makes e.g. our CI builds more reproducible,
where two consecutive CI runs on the same commit use the same set of
dependencies, even if a compatible update of a dependency was published in
between the two runs.

This is also helpful when cutting patch releases of old Neqo versions, where
dependencies since shipped a breaking change in a patch version, e.g. a MSRV
update. See for example pinned dependencies in a recent Neqo patch release to
the Neqo v0.6 family.

66e60f3

While previously the recommendation by the cargo team was for libraries to not
check in their `Cargo.lock`, this recommendation has since been replaced by "do
what is best for the project".

https://blog.rust-lang.org/2023/08/29/committing-lockfiles.html
Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.39%. Comparing base (8e36f63) to head (281303c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2208   +/-   ##
=======================================
  Coverage   95.39%   95.39%           
=======================================
  Files         112      112           
  Lines       36447    36447           
=======================================
  Hits        34768    34768           
  Misses       1679     1679           

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

@mxinden mxinden marked this pull request as ready for review October 28, 2024 19:04
Copy link

Failed Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

mxinden added a commit to mxinden/neqo that referenced this pull request Oct 30, 2024
Currently we use `quinn-udp` `v0.5.4`.

`quinn-udp` `v0.5.5` fixes [`recvmmsg` calls on Android x86](quinn-rs/quinn#1966).

`quinn-udp` `v0.5.6` adds [experimental multi-message support on Apple
platforms](quinn-rs/quinn#1993) and [fixes an
unnecessary `windows-sys` version
restriction](quinn-rs/quinn#2021).

While not strictly necessary, given that our current version specification (i.e.
`version = "0.5.4"`) already allows users to use Neqo with `quinn-udp` `v0.5.6`,
this commit updates to `quinn-udp` `v0.5.6` anyways, thus making sure CI tests
with latest version.

In case mozilla#2208 lands, future compatible
version updates would touch the `Cargo.lock` file, not `Cargo.toml`.
@larseggert
Copy link
Collaborator

Don't have a strong opinion here due to limited experience maintaining Rust libs. Do we think this is "best for the project"?

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.

2 participants