Skip to content

Commit

Permalink
Fix CI pipeline
Browse files Browse the repository at this point in the history
- fix codegen tests for latest nightly
- switch workspace default to `resolver = "2"`
- fix `juniper` tests for latest `chrono` version
  • Loading branch information
tyranron committed Sep 9, 2023
1 parent df9da4c commit 279bbed
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 34 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"benches",
"examples/basic_subscriptions",
Expand Down
8 changes: 4 additions & 4 deletions juniper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ anyhow = { version = "1.0.47", default-features = false, optional = true }
async-trait = "0.1.39"
bigdecimal = { version = "0.4", optional = true }
bson = { version = "2.4", features = ["chrono-0_4"], optional = true }
chrono = { version = "0.4.20", features = ["alloc"], default-features = false, optional = true }
chrono = { version = "0.4.30", features = ["alloc"], default-features = false, optional = true }
chrono-tz = { version = "0.8", default-features = false, optional = true }
fnv = "1.0.3"
futures = { version = "0.3.22", features = ["alloc"], default-features = false }
Expand All @@ -61,7 +61,7 @@ juniper_codegen = { version = "0.16.0-dev", path = "../juniper_codegen" }
rust_decimal = { version = "1.20", default-features = false, optional = true }
ryu = { version = "1.0", optional = true }
serde = { version = "1.0.122", features = ["derive"] }
serde_json = { version = "1.0.18", default-features = false, optional = true }
serde_json = { version = "1.0.18", features = ["std"], default-features = false, optional = true }
smartstring = "1.0"
static_assertions = "1.1"
time = { version = "0.3", features = ["formatting", "macros", "parsing"], optional = true }
Expand All @@ -70,13 +70,13 @@ uuid = { version = "1.3", default-features = false, optional = true }

# Fixes for MSRV check.
# TODO: Try remove on upgrade of `chrono-tz` crate.
regex = { version = "1.6", default-features = false, optional = true }
regex = { version = "1.6", features = ["std"], default-features = false, optional = true }
# TODO: Remove on upgrade to 0.4.1 version of `graphql-parser`.
void = { version = "1.0.2", optional = true }

[dev-dependencies]
bencher = "0.1.2"
chrono = { version = "0.4.20", features = ["alloc"], default-features = false }
chrono = { version = "0.4.30", features = ["alloc"], default-features = false }
pretty_assertions = "1.0.0"
serde_json = "1.0.18"
tokio = { version = "1.0", features = ["macros", "time", "rt-multi-thread"] }
Expand Down
36 changes: 28 additions & 8 deletions juniper/src/integrations/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ mod date_time_test {
for (raw, expected) in [
(
"2014-11-28T21:00:09+09:00",
DateTime::<FixedOffset>::from_utc(
DateTime::<FixedOffset>::from_naive_utc_and_offset(
NaiveDateTime::new(
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
NaiveTime::from_hms_opt(12, 0, 9).unwrap(),
Expand All @@ -603,7 +603,17 @@ mod date_time_test {
),
(
"2014-11-28T21:00:09Z",
DateTime::<FixedOffset>::from_utc(
DateTime::<FixedOffset>::from_naive_utc_and_offset(
NaiveDateTime::new(
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
NaiveTime::from_hms_opt(21, 0, 9).unwrap(),
),
FixedOffset::east_opt(0).unwrap(),
),
),
(
"2014-11-28 21:00:09z",
DateTime::<FixedOffset>::from_naive_utc_and_offset(
NaiveDateTime::new(
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
NaiveTime::from_hms_opt(21, 0, 9).unwrap(),
Expand All @@ -613,7 +623,7 @@ mod date_time_test {
),
(
"2014-11-28T21:00:09+00:00",
DateTime::<FixedOffset>::from_utc(
DateTime::<FixedOffset>::from_naive_utc_and_offset(
NaiveDateTime::new(
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
NaiveTime::from_hms_opt(21, 0, 9).unwrap(),
Expand All @@ -623,7 +633,17 @@ mod date_time_test {
),
(
"2014-11-28T21:00:09.05+09:00",
DateTime::<FixedOffset>::from_utc(
DateTime::<FixedOffset>::from_naive_utc_and_offset(
NaiveDateTime::new(
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
NaiveTime::from_hms_milli_opt(12, 0, 9, 50).unwrap(),
),
FixedOffset::east_opt(0).unwrap(),
),
),
(
"2014-11-28 21:00:09.05+09:00",
DateTime::<FixedOffset>::from_naive_utc_and_offset(
NaiveDateTime::new(
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
NaiveTime::from_hms_milli_opt(12, 0, 9, 50).unwrap(),
Expand Down Expand Up @@ -652,7 +672,7 @@ mod date_time_test {
graphql_input_value!("56:34:22"),
graphql_input_value!("56:34:22.000"),
graphql_input_value!("1996-12-1914:23:43"),
graphql_input_value!("1996-12-19 14:23:43Z"),
graphql_input_value!("1996-12-19Q14:23:43Z"),
graphql_input_value!("1996-12-19T14:23:43"),
graphql_input_value!("1996-12-19T14:23:43ZZ"),
graphql_input_value!("1996-12-19T14:23:43.543"),
Expand Down Expand Up @@ -682,7 +702,7 @@ mod date_time_test {
fn formats_correctly() {
for (val, expected) in [
(
DateTime::<FixedOffset>::from_utc(
DateTime::<FixedOffset>::from_naive_utc_and_offset(
NaiveDateTime::new(
NaiveDate::from_ymd_opt(1996, 12, 19).unwrap(),
NaiveTime::from_hms_opt(0, 0, 0).unwrap(),
Expand All @@ -692,7 +712,7 @@ mod date_time_test {
graphql_input_value!("1996-12-19T00:00:00Z"),
),
(
DateTime::<FixedOffset>::from_utc(
DateTime::<FixedOffset>::from_naive_utc_and_offset(
NaiveDateTime::new(
NaiveDate::from_ymd_opt(1564, 1, 30).unwrap(),
NaiveTime::from_hms_milli_opt(5, 0, 0, 123).unwrap(),
Expand Down Expand Up @@ -780,7 +800,7 @@ mod integration_test {
}

fn date_time() -> DateTime<chrono::Utc> {
DateTime::from_utc(
DateTime::from_naive_utc_and_offset(
LocalDateTime::new(
Date::from_ymd_opt(1996, 12, 20).unwrap(),
LocalTime::from_hms_opt(0, 39, 57).unwrap(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
|
= help: the following other types implement trait `From<T>`:
<[bool; LANES] as From<Mask<T, LANES>>>
<[u32; 4] as From<ppv_lite86::generic::vec128_storage>>
<[u64; 2] as From<ppv_lite86::generic::vec128_storage>>
<[u64; 4] as From<ppv_lite86::generic::vec256_storage>>
<[T; N] as From<Simd<T, N>>>
<[T; 1] as From<(T,)>>
<[T; 2] as From<(T, T)>>
<[T; 3] as From<(T, T, T)>>
<[u32; 4] as From<ppv_lite86::x86_64::vec128_storage>>
<[u32; 8] as From<ppv_lite86::x86_64::vec256_storage>>
<[u32; 16] as From<ppv_lite86::x86_64::vec512_storage>>
<[u64; 2] as From<ppv_lite86::x86_64::vec128_storage>>
<[u64; 4] as From<ppv_lite86::x86_64::vec256_storage>>
<[u64; 8] as From<ppv_lite86::x86_64::vec512_storage>>
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
and $N others
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
= note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
14 changes: 7 additions & 7 deletions tests/codegen/fail/object/argument_wrong_default_array.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
|
= help: the following other types implement trait `From<T>`:
<[bool; LANES] as From<Mask<T, LANES>>>
<[u32; 4] as From<ppv_lite86::generic::vec128_storage>>
<[u64; 2] as From<ppv_lite86::generic::vec128_storage>>
<[u64; 4] as From<ppv_lite86::generic::vec256_storage>>
<[T; N] as From<Simd<T, N>>>
<[T; 1] as From<(T,)>>
<[T; 2] as From<(T, T)>>
<[T; 3] as From<(T, T, T)>>
<[u32; 4] as From<ppv_lite86::x86_64::vec128_storage>>
<[u32; 8] as From<ppv_lite86::x86_64::vec256_storage>>
<[u32; 16] as From<ppv_lite86::x86_64::vec512_storage>>
<[u64; 2] as From<ppv_lite86::x86_64::vec128_storage>>
<[u64; 4] as From<ppv_lite86::x86_64::vec256_storage>>
<[u64; 8] as From<ppv_lite86::x86_64::vec512_storage>>
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
and $N others
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
|
= help: the following other types implement trait `From<T>`:
<[bool; LANES] as From<Mask<T, LANES>>>
<[u32; 4] as From<ppv_lite86::generic::vec128_storage>>
<[u64; 2] as From<ppv_lite86::generic::vec128_storage>>
<[u64; 4] as From<ppv_lite86::generic::vec256_storage>>
<[T; N] as From<Simd<T, N>>>
<[T; 1] as From<(T,)>>
<[T; 2] as From<(T, T)>>
<[T; 3] as From<(T, T, T)>>
<[u32; 4] as From<ppv_lite86::x86_64::vec128_storage>>
<[u32; 8] as From<ppv_lite86::x86_64::vec256_storage>>
<[u32; 16] as From<ppv_lite86::x86_64::vec512_storage>>
<[u64; 2] as From<ppv_lite86::x86_64::vec128_storage>>
<[u64; 4] as From<ppv_lite86::x86_64::vec256_storage>>
<[u64; 8] as From<ppv_lite86::x86_64::vec512_storage>>
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
and $N others
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
= note: this error originates in the attribute macro `graphql_subscription` (in Nightly builds, run with -Z macro-backtrace for more info)
2 changes: 1 addition & 1 deletion tests/integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish = false

[dev-dependencies]
async-trait = "0.1.39"
chrono = { version = "0.4.20", default-features = false }
chrono = { version = "0.4", default-features = false }
derive_more = "0.99"
fnv = "1.0"
futures = "0.3"
Expand Down

0 comments on commit 279bbed

Please sign in to comment.