Skip to content

Commit 279bbed

Browse files
committed
Fix CI pipeline
- fix codegen tests for latest nightly - switch workspace default to `resolver = "2"` - fix `juniper` tests for latest `chrono` version
1 parent df9da4c commit 279bbed

File tree

7 files changed

+55
-34
lines changed

7 files changed

+55
-34
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
"benches",
45
"examples/basic_subscriptions",

juniper/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ anyhow = { version = "1.0.47", default-features = false, optional = true }
5050
async-trait = "0.1.39"
5151
bigdecimal = { version = "0.4", optional = true }
5252
bson = { version = "2.4", features = ["chrono-0_4"], optional = true }
53-
chrono = { version = "0.4.20", features = ["alloc"], default-features = false, optional = true }
53+
chrono = { version = "0.4.30", features = ["alloc"], default-features = false, optional = true }
5454
chrono-tz = { version = "0.8", default-features = false, optional = true }
5555
fnv = "1.0.3"
5656
futures = { version = "0.3.22", features = ["alloc"], default-features = false }
@@ -61,7 +61,7 @@ juniper_codegen = { version = "0.16.0-dev", path = "../juniper_codegen" }
6161
rust_decimal = { version = "1.20", default-features = false, optional = true }
6262
ryu = { version = "1.0", optional = true }
6363
serde = { version = "1.0.122", features = ["derive"] }
64-
serde_json = { version = "1.0.18", default-features = false, optional = true }
64+
serde_json = { version = "1.0.18", features = ["std"], default-features = false, optional = true }
6565
smartstring = "1.0"
6666
static_assertions = "1.1"
6767
time = { version = "0.3", features = ["formatting", "macros", "parsing"], optional = true }
@@ -70,13 +70,13 @@ uuid = { version = "1.3", default-features = false, optional = true }
7070

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

7777
[dev-dependencies]
7878
bencher = "0.1.2"
79-
chrono = { version = "0.4.20", features = ["alloc"], default-features = false }
79+
chrono = { version = "0.4.30", features = ["alloc"], default-features = false }
8080
pretty_assertions = "1.0.0"
8181
serde_json = "1.0.18"
8282
tokio = { version = "1.0", features = ["macros", "time", "rt-multi-thread"] }

juniper/src/integrations/chrono.rs

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ mod date_time_test {
593593
for (raw, expected) in [
594594
(
595595
"2014-11-28T21:00:09+09:00",
596-
DateTime::<FixedOffset>::from_utc(
596+
DateTime::<FixedOffset>::from_naive_utc_and_offset(
597597
NaiveDateTime::new(
598598
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
599599
NaiveTime::from_hms_opt(12, 0, 9).unwrap(),
@@ -603,7 +603,17 @@ mod date_time_test {
603603
),
604604
(
605605
"2014-11-28T21:00:09Z",
606-
DateTime::<FixedOffset>::from_utc(
606+
DateTime::<FixedOffset>::from_naive_utc_and_offset(
607+
NaiveDateTime::new(
608+
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
609+
NaiveTime::from_hms_opt(21, 0, 9).unwrap(),
610+
),
611+
FixedOffset::east_opt(0).unwrap(),
612+
),
613+
),
614+
(
615+
"2014-11-28 21:00:09z",
616+
DateTime::<FixedOffset>::from_naive_utc_and_offset(
607617
NaiveDateTime::new(
608618
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
609619
NaiveTime::from_hms_opt(21, 0, 9).unwrap(),
@@ -613,7 +623,7 @@ mod date_time_test {
613623
),
614624
(
615625
"2014-11-28T21:00:09+00:00",
616-
DateTime::<FixedOffset>::from_utc(
626+
DateTime::<FixedOffset>::from_naive_utc_and_offset(
617627
NaiveDateTime::new(
618628
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
619629
NaiveTime::from_hms_opt(21, 0, 9).unwrap(),
@@ -623,7 +633,17 @@ mod date_time_test {
623633
),
624634
(
625635
"2014-11-28T21:00:09.05+09:00",
626-
DateTime::<FixedOffset>::from_utc(
636+
DateTime::<FixedOffset>::from_naive_utc_and_offset(
637+
NaiveDateTime::new(
638+
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
639+
NaiveTime::from_hms_milli_opt(12, 0, 9, 50).unwrap(),
640+
),
641+
FixedOffset::east_opt(0).unwrap(),
642+
),
643+
),
644+
(
645+
"2014-11-28 21:00:09.05+09:00",
646+
DateTime::<FixedOffset>::from_naive_utc_and_offset(
627647
NaiveDateTime::new(
628648
NaiveDate::from_ymd_opt(2014, 11, 28).unwrap(),
629649
NaiveTime::from_hms_milli_opt(12, 0, 9, 50).unwrap(),
@@ -652,7 +672,7 @@ mod date_time_test {
652672
graphql_input_value!("56:34:22"),
653673
graphql_input_value!("56:34:22.000"),
654674
graphql_input_value!("1996-12-1914:23:43"),
655-
graphql_input_value!("1996-12-19 14:23:43Z"),
675+
graphql_input_value!("1996-12-19Q14:23:43Z"),
656676
graphql_input_value!("1996-12-19T14:23:43"),
657677
graphql_input_value!("1996-12-19T14:23:43ZZ"),
658678
graphql_input_value!("1996-12-19T14:23:43.543"),
@@ -682,7 +702,7 @@ mod date_time_test {
682702
fn formats_correctly() {
683703
for (val, expected) in [
684704
(
685-
DateTime::<FixedOffset>::from_utc(
705+
DateTime::<FixedOffset>::from_naive_utc_and_offset(
686706
NaiveDateTime::new(
687707
NaiveDate::from_ymd_opt(1996, 12, 19).unwrap(),
688708
NaiveTime::from_hms_opt(0, 0, 0).unwrap(),
@@ -692,7 +712,7 @@ mod date_time_test {
692712
graphql_input_value!("1996-12-19T00:00:00Z"),
693713
),
694714
(
695-
DateTime::<FixedOffset>::from_utc(
715+
DateTime::<FixedOffset>::from_naive_utc_and_offset(
696716
NaiveDateTime::new(
697717
NaiveDate::from_ymd_opt(1564, 1, 30).unwrap(),
698718
NaiveTime::from_hms_milli_opt(5, 0, 0, 123).unwrap(),
@@ -780,7 +800,7 @@ mod integration_test {
780800
}
781801

782802
fn date_time() -> DateTime<chrono::Utc> {
783-
DateTime::from_utc(
803+
DateTime::from_naive_utc_and_offset(
784804
LocalDateTime::new(
785805
Date::from_ymd_opt(1996, 12, 20).unwrap(),
786806
LocalTime::from_hms_opt(0, 39, 57).unwrap(),

tests/codegen/fail/interface/trait/argument_wrong_default_array.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
66
|
77
= help: the following other types implement trait `From<T>`:
88
<[bool; LANES] as From<Mask<T, LANES>>>
9-
<[u32; 4] as From<ppv_lite86::generic::vec128_storage>>
10-
<[u64; 2] as From<ppv_lite86::generic::vec128_storage>>
11-
<[u64; 4] as From<ppv_lite86::generic::vec256_storage>>
12-
<[T; N] as From<Simd<T, N>>>
13-
<[T; 1] as From<(T,)>>
14-
<[T; 2] as From<(T, T)>>
15-
<[T; 3] as From<(T, T, T)>>
9+
<[u32; 4] as From<ppv_lite86::x86_64::vec128_storage>>
10+
<[u32; 8] as From<ppv_lite86::x86_64::vec256_storage>>
11+
<[u32; 16] as From<ppv_lite86::x86_64::vec512_storage>>
12+
<[u64; 2] as From<ppv_lite86::x86_64::vec128_storage>>
13+
<[u64; 4] as From<ppv_lite86::x86_64::vec256_storage>>
14+
<[u64; 8] as From<ppv_lite86::x86_64::vec512_storage>>
15+
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
1616
and $N others
1717
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
1818
= note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info)

tests/codegen/fail/object/argument_wrong_default_array.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
66
|
77
= help: the following other types implement trait `From<T>`:
88
<[bool; LANES] as From<Mask<T, LANES>>>
9-
<[u32; 4] as From<ppv_lite86::generic::vec128_storage>>
10-
<[u64; 2] as From<ppv_lite86::generic::vec128_storage>>
11-
<[u64; 4] as From<ppv_lite86::generic::vec256_storage>>
12-
<[T; N] as From<Simd<T, N>>>
13-
<[T; 1] as From<(T,)>>
14-
<[T; 2] as From<(T, T)>>
15-
<[T; 3] as From<(T, T, T)>>
9+
<[u32; 4] as From<ppv_lite86::x86_64::vec128_storage>>
10+
<[u32; 8] as From<ppv_lite86::x86_64::vec256_storage>>
11+
<[u32; 16] as From<ppv_lite86::x86_64::vec512_storage>>
12+
<[u64; 2] as From<ppv_lite86::x86_64::vec128_storage>>
13+
<[u64; 4] as From<ppv_lite86::x86_64::vec256_storage>>
14+
<[u64; 8] as From<ppv_lite86::x86_64::vec512_storage>>
15+
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
1616
and $N others
1717
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
1818
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)

tests/codegen/fail/subscription/argument_wrong_default_array.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
66
|
77
= help: the following other types implement trait `From<T>`:
88
<[bool; LANES] as From<Mask<T, LANES>>>
9-
<[u32; 4] as From<ppv_lite86::generic::vec128_storage>>
10-
<[u64; 2] as From<ppv_lite86::generic::vec128_storage>>
11-
<[u64; 4] as From<ppv_lite86::generic::vec256_storage>>
12-
<[T; N] as From<Simd<T, N>>>
13-
<[T; 1] as From<(T,)>>
14-
<[T; 2] as From<(T, T)>>
15-
<[T; 3] as From<(T, T, T)>>
9+
<[u32; 4] as From<ppv_lite86::x86_64::vec128_storage>>
10+
<[u32; 8] as From<ppv_lite86::x86_64::vec256_storage>>
11+
<[u32; 16] as From<ppv_lite86::x86_64::vec512_storage>>
12+
<[u64; 2] as From<ppv_lite86::x86_64::vec128_storage>>
13+
<[u64; 4] as From<ppv_lite86::x86_64::vec256_storage>>
14+
<[u64; 8] as From<ppv_lite86::x86_64::vec512_storage>>
15+
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
1616
and $N others
1717
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
1818
= note: this error originates in the attribute macro `graphql_subscription` (in Nightly builds, run with -Z macro-backtrace for more info)

tests/integration/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ publish = false
66

77
[dev-dependencies]
88
async-trait = "0.1.39"
9-
chrono = { version = "0.4.20", default-features = false }
9+
chrono = { version = "0.4", default-features = false }
1010
derive_more = "0.99"
1111
fnv = "1.0"
1212
futures = "0.3"

0 commit comments

Comments
 (0)