Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade MSRV to 1.78.0 #3800

Merged
merged 13 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changelog/1724459075.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
applies_to:
- client
- server
- aws-sdk-rust
authors:
- ysaito1001
references:
- smithy-rs#3800
breaking: true
new_feature: false
bug_fix: false
---
Upgrade MSRV to Rust 1.78.0.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ on:
required: false

env:
rust_version: 1.76.0
rust_version: 1.78.0
rust_toolchain_components: clippy,rustfmt
ENCRYPTED_DOCKER_PASSWORD: ${{ secrets.ENCRYPTED_DOCKER_PASSWORD }}
DOCKER_LOGIN_TOKEN_PASSPHRASE: ${{ secrets.DOCKER_LOGIN_TOKEN_PASSPHRASE }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/claim-crate-names.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
rust_version: 1.76.0
rust_version: 1.78.0

name: Claim unpublished crate names on crates.io
run-name: ${{ github.workflow }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
name: Update GitHub Pages

env:
rust_version: 1.76.0
rust_version: 1.78.0

# Allow only one doc pages build to run at a time for the entire smithy-rs repo
concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
rust_version: 1.76.0
rust_version: 1.78.0

name: Release smithy-rs
on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-sdk-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.0
toolchain: 1.78.0
- name: Delete old SDK
run: |
- name: Generate a fresh SDK
Expand Down
12 changes: 7 additions & 5 deletions aws/rust-runtime/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-credential-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aws-credential-types"
version = "1.2.0"
version = "1.2.1"
authors = ["AWS Rust SDK Team <[email protected]>"]
description = "Types for AWS SDK credentials."
edition = "2021"
Expand Down
31 changes: 1 addition & 30 deletions aws/rust-runtime/aws-credential-types/src/credential_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ where
#[cfg(test)]
mod test {
use crate::credential_fn::provide_credentials_fn;
use crate::{
provider::{future, ProvideCredentials},
Credentials,
};
use async_trait::async_trait;
use std::fmt::{Debug, Formatter};
use crate::{provider::ProvideCredentials, Credentials};

fn assert_send_sync<T: Send + Sync>() {}

Expand All @@ -87,30 +82,6 @@ mod test {
assert_send_sync::<Credentials>()
}

#[async_trait]
trait AnotherTrait: Send + Sync {
async fn creds(&self) -> Credentials;
}

struct AnotherTraitWrapper<T> {
inner: T,
}

impl<T> Debug for AnotherTraitWrapper<T> {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "wrapper")
}
}

impl<T: AnotherTrait> ProvideCredentials for AnotherTraitWrapper<T> {
fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'a>
where
Self: 'a,
{
future::ProvideCredentials::new(async move { Ok(self.inner.creds().await) })
}
}

// Test that the closure passed to `provide_credentials_fn` is allowed to borrow things
#[tokio::test]
async fn provide_credentials_fn_closure_can_borrow() {
Expand Down
26 changes: 0 additions & 26 deletions aws/rust-runtime/aws-credential-types/src/token_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ where
mod test {
use super::*;
use crate::Token;
use async_trait::async_trait;
use std::fmt::{Debug, Formatter};

fn assert_send_sync<T: Send + Sync>() {}

Expand All @@ -83,30 +81,6 @@ mod test {
assert_send_sync::<Token>()
}

#[async_trait]
trait AnotherTrait: Send + Sync {
async fn token(&self) -> Token;
}

struct AnotherTraitWrapper<T> {
inner: T,
}

impl<T> Debug for AnotherTraitWrapper<T> {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "wrapper")
}
}

impl<T: AnotherTrait> ProvideToken for AnotherTraitWrapper<T> {
fn provide_token<'a>(&'a self) -> future::ProvideToken<'a>
where
Self: 'a,
{
future::ProvideToken::new(async move { Ok(self.inner.token().await) })
}
}

// Test that the closure passed to `provide_token_fn` is allowed to borrow things
#[tokio::test]
async fn provide_token_fn_closure_can_borrow() {
Expand Down
1 change: 1 addition & 0 deletions aws/rust-runtime/aws-inlineable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub mod endpoint_discovery;
mod serialization_settings;

/// Parse the Expires and ExpiresString fields correctly
#[allow(dead_code)]
pub mod s3_expires_interceptor;

// just so docs work
Expand Down
2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aws-runtime"
version = "1.4.1"
version = "1.4.2"
authors = ["AWS Rust SDK Team <[email protected]>"]
description = "Runtime support code for the AWS SDK. This crate isn't intended to be used directly."
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-runtime/src/env_config/property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl Properties {
.entry(properties_key.clone())
.and_modify(|v| {
tracing::trace!("overwriting {properties_key}: was {v}, now {value}");
*v = value.clone();
v.clone_from(&value);
})
.or_insert(value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ interface ModuleDocProvider {
}
try {
when {
module.documentationOverride != null -> writer.docs(module.documentationOverride)
module.documentationOverride != null -> {
if (module.documentationOverride.isNotEmpty()) {
writer.docs(module.documentationOverride)
}
}
else -> provider?.docsWriter(module)?.also { writeTo -> writeTo(writer) }
}
} catch (e: NotImplementedError) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ object TestWorkspace {
// help rust select the right version when we run cargo test
// TODO(https://github.com/smithy-lang/smithy-rs/issues/2048): load this from the msrv property using a
// method as we do for runtime crate versions
"[toolchain]\nchannel = \"1.76.0\"\n",
"[toolchain]\nchannel = \"1.78.0\"\n",
)
// ensure there at least an empty lib.rs file to avoid broken crates
newProject.resolve("src").mkdirs()
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

# Rust MSRV (entered into the generated README)
rust.msrv=1.76.0
rust.msrv=1.78.0

# To enable debug, swap out the two lines below.
# When changing this value, be sure to run `./gradlew --stop` to kill the Gradle daemon.
Expand Down
Loading