Skip to content

Commit

Permalink
build(deps): update bolero requirement from 0.11 to 0.12 (#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft authored Dec 4, 2024
1 parent 82943e4 commit 4e85ccb
Show file tree
Hide file tree
Showing 29 changed files with 43 additions and 43 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ exclude = [
"tools",
]

[workspace.dependencies]
bolero = "0.12"
bolero-generator = { version = "0.12", default-features = false }

[profile.release]
lto = true
codegen-units = 1
Expand Down
6 changes: 3 additions & 3 deletions common/s2n-codec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ checked_range_unsafe = []
generator = ["bolero-generator"]

[dependencies]
bolero-generator = { version = "0.11", default-features = false, optional = true }
bolero-generator = { workspace = true, optional = true }
byteorder = { version = "1.1", default-features = false }
bytes = { version = "1", default-features = false, optional = true }
zerocopy = { version = "0.7", features = ["derive"] }

[dev-dependencies]
bolero = "0.11"
bolero-generator = "0.11"
bolero.workspace = true
bolero-generator.workspace = true

[package.metadata.kani]
flags = { tests = true }
Expand Down
7 changes: 3 additions & 4 deletions common/s2n-codec/src/decoder/checked_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ pub struct CheckedRange {
original_ptr: *const u8,
}

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;

#[cfg(test)]
impl bolero::TypeGenerator for CheckedRange {
fn generate<D: bolero::Driver>(driver: &mut D) -> Option<Self> {
let start = gen::<usize>().generate(driver)?;
use bolero::ValueGenerator;

let start = bolero::gen::<usize>().generate(driver)?;
let end = (start..).generate(driver)?;
Some(CheckedRange::new(start, end, core::ptr::null()))
}
Expand Down
4 changes: 2 additions & 2 deletions common/s2n-codec/src/zerocopy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use core::{
pub use zerocopy::*;

#[cfg(feature = "generator")]
use bolero_generator::*;
use bolero_generator::prelude::*;

/// Define a codec implementation for a zerocopy value that implements
/// `FromBytes`, `AsBytes`, and `Unaligned`.
Expand Down Expand Up @@ -293,7 +293,7 @@ macro_rules! zerocopy_network_integer {

#[cfg(feature = "generator")]
impl TypeGenerator for $name {
fn generate<D: Driver>(driver: &mut D) -> Option<Self> {
fn generate<D: bolero_generator::Driver>(driver: &mut D) -> Option<Self> {
Some(Self::new(driver.gen()?))
}
}
Expand Down
6 changes: 3 additions & 3 deletions dc/s2n-quic-dc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ arrayvec = "0.7"
atomic-waker = "1"
aws-lc-rs = "1"
bitflags = "2"
bolero-generator = { version = "0.11", optional = true }
bolero-generator = { workspace = true, optional = true }
bytes = "1"
crossbeam-channel = "0.5"
crossbeam-epoch = "0.9"
Expand All @@ -46,8 +46,8 @@ zeroize = "1"
parking_lot = "0.12"

[dev-dependencies]
bolero = "0.11"
bolero-generator = "0.11"
bolero.workspace = true
bolero-generator.workspace = true
insta = "1"
s2n-codec = { path = "../../common/s2n-codec", features = ["testing"] }
s2n-quic-core = { path = "../../quic/s2n-quic-core", features = ["testing"] }
Expand Down
2 changes: 1 addition & 1 deletion dc/wireshark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ s2n-quic-core = { path = "../../quic/s2n-quic-core" }
s2n-quic-dc = { path = "../s2n-quic-dc" }

[dev-dependencies]
bolero = "0.11"
bolero = "0.12"
s2n-quic-core = { path = "../../quic/s2n-quic-core", features = ["testing", "generator"] }
s2n-quic-dc = { path = "../s2n-quic-dc", features = ["testing"] }

Expand Down
6 changes: 3 additions & 3 deletions quic/s2n-quic-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ usdt = ["dep:probe"]

[dependencies]
atomic-waker = { version = "1", optional = true }
bolero-generator = { version = "0.11", optional = true }
bolero-generator = { workspace = true, optional = true }
byteorder = { version = "1", default-features = false }
bytes = { version = "1", optional = true, default-features = false }
crossbeam-utils = { version = "0.8", optional = true }
Expand All @@ -49,8 +49,8 @@ futures-test = { version = "0.3", optional = true } # For testing Waker interact
once_cell = { version = "1", optional = true }

[dev-dependencies]
bolero = "0.11"
bolero-generator = "0.11"
bolero.workspace = true
bolero-generator.workspace = true
insta = { version = "1", features = ["json"] }
futures = "0.3"
futures-test = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/connection/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use core::time::Duration;
use s2n_codec::{decoder_value, Encoder, EncoderValue};

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

//= https://www.rfc-editor.org/rfc/rfc9000#section-5.1
//# Each connection possesses a set of connection identifiers, or
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/frame/ack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ const ACK_RANGE_DECODING_ERROR: DecoderError =
//#
//# ECN counts are maintained separately for each packet number space.
#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(any(test, feature = "generator"), derive(TypeGenerator))]
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/frame/ack_elicitation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;
use core::ops::{BitOr, BitOrAssign};

//= https://www.rfc-editor.org/rfc/rfc9002#section-2
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/frame/path_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use core::ops::{BitOr, BitOrAssign};

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

/// Describes if a frame is probing
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/inet/ecn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

//= https://www.rfc-editor.org/rfc/rfc3168#section-5
//# This document specifies that the Internet provide a congestion
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/inet/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::inet::{
use core::fmt;

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

/// An IP address, either IPv4 or IPv6.
///
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/inet/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ macro_rules! define_inet_type {
}) => {
#[allow(unused_imports)]
#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

#[derive(Clone, Copy, Default, Eq, PartialEq, PartialOrd, Ord, zerocopy::FromZeroes, zerocopy::FromBytes, zerocopy::AsBytes, zerocopy::Unaligned)]
#[cfg_attr(any(test, feature = "generator"), derive(bolero_generator::TypeGenerator))]
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/packet/number/packet_number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use core::{
};

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

const PACKET_SPACE_BITLEN: usize = 2;
const PACKET_SPACE_SHIFT: usize = (size_of::<PacketNumber>() * 8) - PACKET_SPACE_BITLEN;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
};

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

/// Contains all of the available packet spaces for QUIC packets
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::packet::number::{
use s2n_codec::{u24, DecoderBuffer, DecoderBufferResult, DecoderValue, Encoder, EncoderValue};

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

/// A truncated packet number, which is derived from the largest acknowledged packet number
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/path/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
use core::fmt;

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

pub mod ecn;
pub mod migration;
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/stream/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use crate::{endpoint, stream::StreamType, varint::VarInt};
#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

/// The ID of a stream.
///
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/stream/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use super::StreamId;
#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

/// An Iterator over Stream Ids of a particular type.
#[derive(Debug, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/stream/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::buffer::{reader, writer};
use bytes::Bytes;

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

static DATA: Bytes = {
const INNER: [u8; DATA_LEN] = {
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/transmission/constraint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

#[cfg(feature = "generator")]
use bolero_generator::*;
use bolero_generator::prelude::*;

#[cfg(test)]
use bolero::generator::*;
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/transmission/mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(any(test, feature = "generator"), derive(TypeGenerator))]
Expand Down
4 changes: 2 additions & 2 deletions quic/s2n-quic-core/src/varint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use core::{fmt, ops::Deref};
use s2n_codec::{decoder_value, Encoder, EncoderValue};

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;
use bolero_generator::prelude::*;

use crate::event::IntoEvent;

Expand Down Expand Up @@ -45,7 +45,7 @@ pub struct VarInt(#[cfg_attr(any(feature = "generator", test), generator(Self::G

#[cfg(any(feature = "generator", test))]
impl bolero_generator::bounded::BoundedValue for VarInt {
fn gen_bounded<D: Driver>(
fn gen_bounded<D: bolero_generator::Driver>(
driver: &mut D,
min: core::ops::Bound<&Self>,
max: core::ops::Bound<&Self>,
Expand Down
6 changes: 3 additions & 3 deletions quic/s2n-quic-platform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ xdp = ["s2n-quic-xdp"]

[dependencies]
bach = { version = "0.0.6", optional = true }
bolero-generator = { version = "0.11", optional = true }
bolero-generator = { workspace = true, optional = true }
cfg-if = "1"
futures = { version = "0.3", default-features = false, features = ["async-await"], optional = true }
lazy_static = { version = "1", optional = true }
Expand All @@ -37,8 +37,8 @@ libc = "0.2"

[dev-dependencies]
bach = { version = "0.0.6" }
bolero = "0.11"
bolero-generator = "0.11"
bolero.workspace = true
bolero-generator.workspace = true
futures = { version = "0.3", features = ["std"] }
insta = { version = "1", features = ["json"] }
s2n-quic-core = { path = "../s2n-quic-core", features = ["testing"] }
Expand Down
3 changes: 0 additions & 3 deletions quic/s2n-quic-platform/src/message/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ pub use ext::Ext;
pub use handle::Handle;
pub use libc::msghdr as Message;

#[cfg(any(test, feature = "generator"))]
use bolero_generator::*;

impl MessageTrait for msghdr {
type Handle = Handle;

Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-platform/src/message/msg/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use super::*;
use bolero::check;
use bolero::{check, gen};
use core::mem::zeroed;
use s2n_quic_core::inet::{SocketAddress, Unspecified};

Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-transport/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ siphasher = "1.0"
smallvec = { version = "1", default-features = false }

[dev-dependencies]
bolero = "0.11"
bolero.workspace = true
futures-test = "0.3" # For testing Waker interactions
insta = { version = "1", features = ["json"] }
s2n-codec = { path = "../../common/s2n-codec", features = ["testing"] }
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ zerocopy = { version = "0.7", optional = true, features = ["derive"] }
zeroize = { version = "1", optional = true, default-features = false }

[dev-dependencies]
bolero = { version = "0.11" }
bolero.workspace = true
s2n-quic-core = { path = "../s2n-quic-core", features = ["branch-tracing", "event-tracing", "probe-tracing", "testing"] }
s2n-quic-platform = { path = "../s2n-quic-platform", features = ["testing"] }
s2n-quic-transport = { path = "../s2n-quic-transport", features = ["unstable_resumption", "unstable-provider-dc"] }
Expand Down

0 comments on commit 4e85ccb

Please sign in to comment.