From 591ea6fb49feffeeb0060cb36e0c6251730e8eb0 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Thu, 20 Apr 2023 10:20:31 -0700 Subject: [PATCH 1/4] Upgrade to Rust 1.67.1 --- .github/workflows/ci.yml | 2 +- .github/workflows/claim-crate-names.yml | 2 +- .github/workflows/pull-request-bot.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/update-sdk-next.yml | 2 +- .../software/amazon/smithy/rust/codegen/core/testutil/Rust.kt | 2 +- gradle.properties | 2 +- rust-toolchain.toml | 2 +- tools/ci-build/Dockerfile | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c36d5ba08c..54ccda52ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ on: required: false env: - rust_version: 1.66.1 + rust_version: 1.67.1 rust_toolchain_components: clippy,rustfmt ENCRYPTED_DOCKER_PASSWORD: ${{ secrets.ENCRYPTED_DOCKER_PASSWORD }} DOCKER_LOGIN_TOKEN_PASSPHRASE: ${{ secrets.DOCKER_LOGIN_TOKEN_PASSPHRASE }} diff --git a/.github/workflows/claim-crate-names.yml b/.github/workflows/claim-crate-names.yml index ef24446bb7..a7019823c8 100644 --- a/.github/workflows/claim-crate-names.yml +++ b/.github/workflows/claim-crate-names.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true env: - rust_version: 1.66.1 + rust_version: 1.67.1 name: Claim unpublished crate names on crates.io run-name: ${{ github.workflow }} diff --git a/.github/workflows/pull-request-bot.yml b/.github/workflows/pull-request-bot.yml index 221f520f1c..aafeaf773c 100644 --- a/.github/workflows/pull-request-bot.yml +++ b/.github/workflows/pull-request-bot.yml @@ -28,7 +28,7 @@ concurrency: env: java_version: 11 - rust_version: 1.66.1 + rust_version: 1.67.1 rust_toolchain_components: clippy,rustfmt apt_dependencies: libssl-dev gnuplot jq diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52ddfdfe7a..db3af0cb9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true env: - rust_version: 1.66.1 + rust_version: 1.67.1 name: Release smithy-rs run-name: ${{ github.workflow }} ${{ inputs.semantic_version }} (${{ inputs.commit_sha }}) - ${{ inputs.dry_run && 'Dry run' || 'Production run' }} diff --git a/.github/workflows/update-sdk-next.yml b/.github/workflows/update-sdk-next.yml index c96b09b73f..542abdde00 100644 --- a/.github/workflows/update-sdk-next.yml +++ b/.github/workflows/update-sdk-next.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Rust uses: dtolnay/rust-toolchain@master with: - toolchain: 1.66.1 + toolchain: 1.67.1 - name: Delete old SDK run: | - name: Generate a fresh SDK diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt index 5f9e612ee7..4e0b0f67f9 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt @@ -109,7 +109,7 @@ object TestWorkspace { // help rust select the right version when we run cargo test // TODO(https://github.com/awslabs/smithy-rs/issues/2048): load this from the msrv property using a // method as we do for runtime crate versions - "[toolchain]\nchannel = \"1.66.1\"\n", + "[toolchain]\nchannel = \"1.67.1\"\n", ) // ensure there at least an empty lib.rs file to avoid broken crates newProject.resolve("src").mkdirs() diff --git a/gradle.properties b/gradle.properties index ead4b8d783..18805fe491 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ # # Rust MSRV (entered into the generated README) -rust.msrv=1.66.1 +rust.msrv=1.67.1 # To enable debug, swap out the two lines below. # When changing this value, be sure to run `./gradlew --stop` to kill the Gradle daemon. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index f701aa5354..588ffd5788 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.66.1" +channel = "1.67.1" diff --git a/tools/ci-build/Dockerfile b/tools/ci-build/Dockerfile index 0e64f746a9..2bce2b0ec9 100644 --- a/tools/ci-build/Dockerfile +++ b/tools/ci-build/Dockerfile @@ -6,7 +6,7 @@ # This is the base Docker build image used by CI ARG base_image=public.ecr.aws/amazonlinux/amazonlinux:2 -ARG rust_stable_version=1.66.1 +ARG rust_stable_version=1.67.1 ARG rust_nightly_version=nightly-2022-11-16 FROM ${base_image} AS bare_base_image From e61f935d29d890eb219966b8bea7a7dcd0dedca5 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Thu, 20 Apr 2023 10:28:19 -0700 Subject: [PATCH 2/4] Fix semver checks job dependencies --- .github/workflows/ci-pr.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index 5b53c4dbf1..22f830e8bc 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -111,6 +111,9 @@ jobs: semver-checks: name: check the semver status of this PR runs-on: smithy_ubuntu-latest_8-core + needs: + - save-docker-login-token + - acquire-base-image steps: - uses: actions/checkout@v3 with: From 3eba5c32100902c286de28f1f1a8ef57de1d7f12 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Thu, 20 Apr 2023 11:32:16 -0700 Subject: [PATCH 3/4] Fix clippy lints --- aws/rust-runtime/aws-config/src/profile/parser/normalize.rs | 2 +- aws/sdk/integration-tests/dynamodb/tests/endpoints.rs | 1 - rust-runtime/aws-smithy-client/src/lib.rs | 2 +- rust-runtime/inlineable/src/endpoint_lib/arn.rs | 2 +- rust-runtime/inlineable/src/endpoint_lib/parse_url.rs | 2 +- rust-runtime/inlineable/src/endpoint_lib/partition.rs | 2 +- rust-runtime/inlineable/src/endpoint_lib/substring.rs | 4 ++-- rust-runtime/inlineable/src/endpoint_lib/uri_encode.rs | 4 ++-- tools/ci-build/smithy-rs-tool-common/src/git.rs | 4 ++-- 9 files changed, 11 insertions(+), 12 deletions(-) diff --git a/aws/rust-runtime/aws-config/src/profile/parser/normalize.rs b/aws/rust-runtime/aws-config/src/profile/parser/normalize.rs index 36b469b729..5b3b5c1ea8 100644 --- a/aws/rust-runtime/aws-config/src/profile/parser/normalize.rs +++ b/aws/rust-runtime/aws-config/src/profile/parser/normalize.rs @@ -113,7 +113,7 @@ pub(super) fn merge_in( } } -fn merge_into_base<'a>(target: &mut Profile, profile: HashMap<&str, Cow<'a, str>>) { +fn merge_into_base(target: &mut Profile, profile: HashMap<&str, Cow<'_, str>>) { for (k, v) in profile { match validate_identifier(k) { Ok(k) => { diff --git a/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs b/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs index 6a01fedefd..25d65bb94c 100644 --- a/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs +++ b/aws/sdk/integration-tests/dynamodb/tests/endpoints.rs @@ -7,7 +7,6 @@ use aws_sdk_dynamodb::config::{self, Credentials, Region}; use aws_types::SdkConfig; use http::Uri; -#[track_caller] async fn expect_uri( conf: SdkConfig, uri: &'static str, diff --git a/rust-runtime/aws-smithy-client/src/lib.rs b/rust-runtime/aws-smithy-client/src/lib.rs index 080e5ac9eb..35065c84b4 100644 --- a/rust-runtime/aws-smithy-client/src/lib.rs +++ b/rust-runtime/aws-smithy-client/src/lib.rs @@ -259,7 +259,7 @@ where > + Clone, { let _ = |o: static_tests::ValidTestOperation| { - let _ = self.call_raw(o); + drop(self.call_raw(o)); }; } } diff --git a/rust-runtime/inlineable/src/endpoint_lib/arn.rs b/rust-runtime/inlineable/src/endpoint_lib/arn.rs index a9b599e632..0fd68d73bc 100644 --- a/rust-runtime/inlineable/src/endpoint_lib/arn.rs +++ b/rust-runtime/inlineable/src/endpoint_lib/arn.rs @@ -89,7 +89,7 @@ impl<'a> Arn<'a> { } } -pub(crate) fn parse_arn<'a, 'b>(input: &'a str, e: &'b mut DiagnosticCollector) -> Option> { +pub(crate) fn parse_arn<'a>(input: &'a str, e: &mut DiagnosticCollector) -> Option> { e.capture(Arn::parse(input)) } diff --git a/rust-runtime/inlineable/src/endpoint_lib/parse_url.rs b/rust-runtime/inlineable/src/endpoint_lib/parse_url.rs index 5e437c9bfe..03e07f3e41 100644 --- a/rust-runtime/inlineable/src/endpoint_lib/parse_url.rs +++ b/rust-runtime/inlineable/src/endpoint_lib/parse_url.rs @@ -45,7 +45,7 @@ impl<'a> Url<'a> { } } -pub(crate) fn parse_url<'a, 'b>(url: &'a str, e: &'b mut DiagnosticCollector) -> Option> { +pub(crate) fn parse_url<'a>(url: &'a str, e: &mut DiagnosticCollector) -> Option> { let raw = url; let uri: Uri = e.capture(url.parse())?; let url: ParsedUrl = e.capture(url.parse())?; diff --git a/rust-runtime/inlineable/src/endpoint_lib/partition.rs b/rust-runtime/inlineable/src/endpoint_lib/partition.rs index b9b4002ed1..02088d0f93 100644 --- a/rust-runtime/inlineable/src/endpoint_lib/partition.rs +++ b/rust-runtime/inlineable/src/endpoint_lib/partition.rs @@ -458,7 +458,7 @@ mod test { use regex::Regex; use std::collections::HashMap; - fn resolve<'a, 'b>(resolver: &'a PartitionResolver, region: &'b str) -> Partition<'a> { + fn resolve<'a>(resolver: &'a PartitionResolver, region: &str) -> Partition<'a> { resolver .resolve_partition(region, &mut DiagnosticCollector::new()) .expect("could not resolve partition") diff --git a/rust-runtime/inlineable/src/endpoint_lib/substring.rs b/rust-runtime/inlineable/src/endpoint_lib/substring.rs index 8512810c4e..27142e118e 100644 --- a/rust-runtime/inlineable/src/endpoint_lib/substring.rs +++ b/rust-runtime/inlineable/src/endpoint_lib/substring.rs @@ -13,12 +13,12 @@ use crate::endpoint_lib::diagnostic::DiagnosticCollector; /// - When `reverse` is false, indexes are evaluated from the beginning of the string /// - When `reverse` is true, indexes are evaluated from the end of the string (however, the result /// will still be "forwards" and `start` MUST be less than `end`. -pub(crate) fn substring<'a, 'b>( +pub(crate) fn substring<'a>( input: &'a str, start: usize, stop: usize, reverse: bool, - e: &'b mut DiagnosticCollector, + e: &mut DiagnosticCollector, ) -> Option<&'a str> { if start >= stop { e.capture(Err("start > stop"))?; diff --git a/rust-runtime/inlineable/src/endpoint_lib/uri_encode.rs b/rust-runtime/inlineable/src/endpoint_lib/uri_encode.rs index 58c0ef5742..de33264a9f 100644 --- a/rust-runtime/inlineable/src/endpoint_lib/uri_encode.rs +++ b/rust-runtime/inlineable/src/endpoint_lib/uri_encode.rs @@ -39,9 +39,9 @@ pub(crate) const BASE_SET: &AsciiSet = &CONTROLS .add(b'\\'); // Returns `Option` for forwards compatibility -pub(crate) fn uri_encode<'a, 'b>( +pub(crate) fn uri_encode<'a>( s: &'a str, - _e: &'b mut DiagnosticCollector, + _e: &mut DiagnosticCollector, ) -> std::borrow::Cow<'a, str> { utf8_percent_encode(s, BASE_SET).into() } diff --git a/tools/ci-build/smithy-rs-tool-common/src/git.rs b/tools/ci-build/smithy-rs-tool-common/src/git.rs index b1b34aa263..c370529c91 100644 --- a/tools/ci-build/smithy-rs-tool-common/src/git.rs +++ b/tools/ci-build/smithy-rs-tool-common/src/git.rs @@ -104,11 +104,11 @@ pub trait Git: Send + Sync { /// Returns a list of commit hashes in reverse chronological order starting with /// `start_inclusive_revision` and ending before `end_exclusive_revision`. Both of /// these arguments can be any kind of Git revision (e.g., HEAD, HEAD~2, commit hash, etc). - fn rev_list<'a>( + fn rev_list( &self, start_inclusive_revision: &str, end_exclusive_revision: &str, - path: Option<&'a Path>, + path: Option<&Path>, ) -> Result>; /// Returns information about a given revision. From c034311eb42d2692f7ea68f6d7282292c1e87a16 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Thu, 20 Apr 2023 13:29:31 -0700 Subject: [PATCH 4/4] Update changelog --- CHANGELOG.next.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 7992dd6e5c..f3fcb45bc6 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -128,3 +128,15 @@ message = "Fix server code generation bug affecting constrained shapes bound wit references = ["smithy-rs#2583", "smithy-rs#2584"] meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "server" } author = "david-perez" + +[[aws-sdk-rust]] +message = "Update MSRV to Rust 1.67.1" +references = ["smithy-rs#2611"] +meta = { "breaking" = true, "tada" = false, "bug" = false } +author = "jdisanti" + +[[smithy-rs]] +message = "Update MSRV to Rust 1.67.1" +references = ["smithy-rs#2611"] +meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "all"} +author = "jdisanti"