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

s2n-quic-core: insta dependency minor version bump breaking api changes #2359

Closed
tracy-codes opened this issue Oct 28, 2024 · 1 comment
Closed

Comments

@tracy-codes
Copy link

tracy-codes commented Oct 28, 2024

Problem:

The insta dependency defined here:

just bumped from 1.40.0 to 1.41.0 and introduced a breaking change to the assert_snapshot macro.

This results in compiler error when compiling s2n-quic-core:

error[E0277]: the trait bound `SnapshotValue<'_>: From<AutoName>` is not satisfied
    --> /redacted/.cargo/registry/src/index.crates.io-6f17d22bba15001f/s2n-quic-core-0.47.0/src/event/generated.rs:8832:49
     |
8832 |                 insta::_macro_support::AutoName.into(),
     |                                                 ^^^^ the trait `From<AutoName>` is not implemented for `SnapshotValue<'_>`, which is required by `AutoName: Into<_>`
     |
     = help: the following other types implement trait `From<T>`:
               <SnapshotValue<'a> as From<(&'a str, &'a str)>>
               <SnapshotValue<'a> as From<(AutoName, &'a str)>>
               <SnapshotValue<'a> as From<(InlineValue<'a>, &'a str)>>
               <SnapshotValue<'a> as From<(Option<&'a str>, &'a str)>>
               <SnapshotValue<'a> as From<(Option<std::string::String>, &'a str)>>
               <SnapshotValue<'a> as From<(std::string::String, &'a str)>>
               <SnapshotValue<'a> as From<BinarySnapshotValue<'a>>>
     = note: required for `AutoName` to implement `Into<SnapshotValue<'_>>`

error[E0061]: this function takes 7 arguments but 8 arguments were supplied
    --> /home/tracy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/s2n-quic-core-0.47.0/src/event/generated.rs:8831:13
     |
8831 |             insta::_macro_support::assert_snapshot(
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8832 |                 insta::_macro_support::AutoName.into(),
8833 |                 &value,
     |                 ------
     |                 |
     |                 unexpected argument of type `&std::string::String`
     |                 an argument of type `&std::path::Path` is missing
...
8839 |                 "",
     |                 -- unexpected argument of type `&'static str`
     |

Solution:

There are two options:

  1. Pin the version of insta required in [dependencies] and [dev-dependencies] for s2n-quic-core to 1.40.0
  2. Update the use of the insta crate to be compliant with the latest "minor" version bump that introduces breaking API changes
  • Does this change what s2n-quic sends over the wire? No
  • Does this change any public APIs? No

Requirements / Acceptance Criteria:

N/A

Out of scope:

N/A

@camshaft
Copy link
Contributor

This was fixed in #2357

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

No branches or pull requests

2 participants