From 6dbd1c776290d6449eb15cf1a9cfe1052b75cc5f Mon Sep 17 00:00:00 2001 From: Jimmy Bourassa Date: Thu, 1 Jun 2023 12:27:48 -0400 Subject: [PATCH] Require Rust 1.62 for enum defaults All our examples use codegen from `graphql_client_codegen` which uses [enum defaults][1] which are only [supported as of 1.62][2]. This commit makes that requirement explicit for a more helpful error message: > $ cargo build > error: package [..] ([.. path..]])` cannot be built because it > requires rustc 1.62.0 or newer, while the currently active rustc > version is 1.61.0 [1]: https://github.com/graphql-rust/graphql-client/blob/33b8a34aabbaaac9977a93763ae445dc64b5c67c/graphql_client_codegen/src/deprecation.rs#L10-L20 [2]: https://github.com/rust-lang/rust/pull/94457#event-6442293650 --- checkout/rust/cart-checkout-validation/default/Cargo.toml.liquid | 1 + checkout/rust/cart-transform/bundles/Cargo.toml.liquid | 1 + checkout/rust/cart-transform/default/Cargo.toml.liquid | 1 + checkout/rust/delivery-customization/default/Cargo.toml.liquid | 1 + checkout/rust/payment-customization/default/Cargo.toml.liquid | 1 + discounts/rust/order-discounts/default/Cargo.toml.liquid | 1 + discounts/rust/order-discounts/fixed-amount/Cargo.toml | 1 + discounts/rust/product-discounts/default/Cargo.toml.liquid | 1 + discounts/rust/product-discounts/fixed-amount/Cargo.toml | 1 + discounts/rust/shipping-discounts/default/Cargo.toml.liquid | 1 + discounts/rust/shipping-discounts/fixed-amount/Cargo.toml | 1 + .../rust/fulfillment-constraints/default/Cargo.toml.liquid | 1 + order-routing/rust/rankers/default/Cargo.toml.liquid | 1 + .../extensions/cart-merge-expand/Cargo.toml | 1 + .../extensions/delivery-customization-rust/Cargo.toml | 1 + .../discounts/extensions/product-discount-rust/Cargo.toml | 1 + .../extensions/payment-customization-rust/Cargo.toml | 1 + 17 files changed, 17 insertions(+) diff --git a/checkout/rust/cart-checkout-validation/default/Cargo.toml.liquid b/checkout/rust/cart-checkout-validation/default/Cargo.toml.liquid index 34649bf4..e1ea6446 100644 --- a/checkout/rust/cart-checkout-validation/default/Cargo.toml.liquid +++ b/checkout/rust/cart-checkout-validation/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "{{name | replace: " ", "-" | downcase}}" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/checkout/rust/cart-transform/bundles/Cargo.toml.liquid b/checkout/rust/cart-transform/bundles/Cargo.toml.liquid index 49b1c91b..c7cc572c 100644 --- a/checkout/rust/cart-transform/bundles/Cargo.toml.liquid +++ b/checkout/rust/cart-transform/bundles/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "bundles_cart_transform" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/checkout/rust/cart-transform/default/Cargo.toml.liquid b/checkout/rust/cart-transform/default/Cargo.toml.liquid index 6fdcc449..80315c08 100644 --- a/checkout/rust/cart-transform/default/Cargo.toml.liquid +++ b/checkout/rust/cart-transform/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "cart_transform" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/checkout/rust/delivery-customization/default/Cargo.toml.liquid b/checkout/rust/delivery-customization/default/Cargo.toml.liquid index 34649bf4..e1ea6446 100644 --- a/checkout/rust/delivery-customization/default/Cargo.toml.liquid +++ b/checkout/rust/delivery-customization/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "{{name | replace: " ", "-" | downcase}}" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/checkout/rust/payment-customization/default/Cargo.toml.liquid b/checkout/rust/payment-customization/default/Cargo.toml.liquid index 34649bf4..e1ea6446 100644 --- a/checkout/rust/payment-customization/default/Cargo.toml.liquid +++ b/checkout/rust/payment-customization/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "{{name | replace: " ", "-" | downcase}}" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/discounts/rust/order-discounts/default/Cargo.toml.liquid b/discounts/rust/order-discounts/default/Cargo.toml.liquid index 34649bf4..e1ea6446 100644 --- a/discounts/rust/order-discounts/default/Cargo.toml.liquid +++ b/discounts/rust/order-discounts/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "{{name | replace: " ", "-" | downcase}}" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/discounts/rust/order-discounts/fixed-amount/Cargo.toml b/discounts/rust/order-discounts/fixed-amount/Cargo.toml index 781bade3..94e0a25f 100644 --- a/discounts/rust/order-discounts/fixed-amount/Cargo.toml +++ b/discounts/rust/order-discounts/fixed-amount/Cargo.toml @@ -2,6 +2,7 @@ name = "discounts-order-discounts-fixed-amount" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/discounts/rust/product-discounts/default/Cargo.toml.liquid b/discounts/rust/product-discounts/default/Cargo.toml.liquid index 34649bf4..e1ea6446 100644 --- a/discounts/rust/product-discounts/default/Cargo.toml.liquid +++ b/discounts/rust/product-discounts/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "{{name | replace: " ", "-" | downcase}}" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/discounts/rust/product-discounts/fixed-amount/Cargo.toml b/discounts/rust/product-discounts/fixed-amount/Cargo.toml index a6bcf2d1..d3100a15 100644 --- a/discounts/rust/product-discounts/fixed-amount/Cargo.toml +++ b/discounts/rust/product-discounts/fixed-amount/Cargo.toml @@ -2,6 +2,7 @@ name = "discounts-product-discounts-fixed-amount" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/discounts/rust/shipping-discounts/default/Cargo.toml.liquid b/discounts/rust/shipping-discounts/default/Cargo.toml.liquid index 34649bf4..e1ea6446 100644 --- a/discounts/rust/shipping-discounts/default/Cargo.toml.liquid +++ b/discounts/rust/shipping-discounts/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "{{name | replace: " ", "-" | downcase}}" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/discounts/rust/shipping-discounts/fixed-amount/Cargo.toml b/discounts/rust/shipping-discounts/fixed-amount/Cargo.toml index 8b7f513d..00c2778f 100644 --- a/discounts/rust/shipping-discounts/fixed-amount/Cargo.toml +++ b/discounts/rust/shipping-discounts/fixed-amount/Cargo.toml @@ -2,6 +2,7 @@ name = "fixed-amount" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/order-routing/rust/fulfillment-constraints/default/Cargo.toml.liquid b/order-routing/rust/fulfillment-constraints/default/Cargo.toml.liquid index 34649bf4..e1ea6446 100644 --- a/order-routing/rust/fulfillment-constraints/default/Cargo.toml.liquid +++ b/order-routing/rust/fulfillment-constraints/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "{{name | replace: " ", "-" | downcase}}" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/order-routing/rust/rankers/default/Cargo.toml.liquid b/order-routing/rust/rankers/default/Cargo.toml.liquid index 34649bf4..e1ea6446 100644 --- a/order-routing/rust/rankers/default/Cargo.toml.liquid +++ b/order-routing/rust/rankers/default/Cargo.toml.liquid @@ -2,6 +2,7 @@ name = "{{name | replace: " ", "-" | downcase}}" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/sample-apps/bundles-cart-transform/extensions/cart-merge-expand/Cargo.toml b/sample-apps/bundles-cart-transform/extensions/cart-merge-expand/Cargo.toml index 9d6576bb..d5832c59 100644 --- a/sample-apps/bundles-cart-transform/extensions/cart-merge-expand/Cargo.toml +++ b/sample-apps/bundles-cart-transform/extensions/cart-merge-expand/Cargo.toml @@ -2,6 +2,7 @@ name = "bundle_cart_transform" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/sample-apps/delivery-customizations/extensions/delivery-customization-rust/Cargo.toml b/sample-apps/delivery-customizations/extensions/delivery-customization-rust/Cargo.toml index cbbaf991..f021d8f8 100644 --- a/sample-apps/delivery-customizations/extensions/delivery-customization-rust/Cargo.toml +++ b/sample-apps/delivery-customizations/extensions/delivery-customization-rust/Cargo.toml @@ -2,6 +2,7 @@ name = "delivery-customization" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/sample-apps/discounts/extensions/product-discount-rust/Cargo.toml b/sample-apps/discounts/extensions/product-discount-rust/Cargo.toml index 4a63fc3d..d682640c 100644 --- a/sample-apps/discounts/extensions/product-discount-rust/Cargo.toml +++ b/sample-apps/discounts/extensions/product-discount-rust/Cargo.toml @@ -2,6 +2,7 @@ name = "product-discount" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] } diff --git a/sample-apps/payment-customizations/extensions/payment-customization-rust/Cargo.toml b/sample-apps/payment-customizations/extensions/payment-customization-rust/Cargo.toml index b5b6d995..07164312 100644 --- a/sample-apps/payment-customizations/extensions/payment-customization-rust/Cargo.toml +++ b/sample-apps/payment-customizations/extensions/payment-customization-rust/Cargo.toml @@ -2,6 +2,7 @@ name = "payment-customization" version = "1.0.0" edition = "2021" +rust-version = "1.62" [dependencies] serde = { version = "1.0.13", features = ["derive"] }