Skip to content

Commit

Permalink
Require Rust 1.62 for enum defaults
Browse files Browse the repository at this point in the history
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]: rust-lang/rust#94457 (comment)
  • Loading branch information
jbourassa committed Jun 1, 2023
1 parent 7cf29e8 commit 88856dd
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions checkout/rust/cart-transform/bundles/Cargo.toml.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
1 change: 1 addition & 0 deletions discounts/rust/order-discounts/default/Cargo.toml.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
1 change: 1 addition & 0 deletions discounts/rust/product-discounts/default/Cargo.toml.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
1 change: 1 addition & 0 deletions order-routing/rust/rankers/default/Cargo.toml.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down

0 comments on commit 88856dd

Please sign in to comment.