Unverified Commit 740edcc6 authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Upgrade MSRV to 1.78.0 (#3800)

## Motivation and Context
Upgrades MSRV to 1.78.0 since the [latest
Rust](https://www.rust-lang.org/) at the time of writing is 1.80.1 (we
try keeping [two releases
behind](https://github.com/awslabs/aws-sdk-rust?tab=readme-ov-file#supported-rust-versions-msrv)).

## Description
In Rust 1.78.0, `clippy` enforces stricter checks in two areas:
- `dead_code`
It seems to be able to uncover more unused code patterns, especially
when different combinations of cargo features are enabled
- `empty_docs`
Prior to 1.78.0, the codegen used to render the following empty docs
`///`, regardless whether the codegen is for the server or for the
client. This is now flagged as `empty_docs` by `clippy`:
```
///
pub(crate) mod XXX {
    ...
}
```

Other than bumping MSRV to 1.78.0, the remaining code changes address
issues related to the fixes mentioned above.

**EDIT:**
`cargo-semver-checks` required an upgrade due to incompatibility issues
following the MSRV upgrade ([example
error](https://github.com/smithy-lang/smithy-rs/actions/runs/10534205294/job/29261105195#step:4:2068)).
Specifically, after updating the MSRV to 1.78.0, the rustdoc version was
upgraded to v28. However, the version of `cargo-semver-checks` we were
using (0.24.1) only supported rustdoc [up to
v27](https://github.com/obi1kenobi/cargo-semver-checks/blob/4bce03d4a6a32cf651b9eccddb40e3418dc2c154/Cargo.toml#L18).

To resolve this, we have updated `cargo-semver-checks` to the first
version that supports rustdoc
[v28](https://github.com/obi1kenobi/cargo-semver-checks/blob/94a491f0854f0bdbccbb301099db119201bff181/Cargo.toml#L18).

## Testing
Existing tests in CI

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] For changes to the smithy-rs codegen or runtime crates, I have
created a changelog entry Markdown file in the `.changelog` directory,
specifying "client," "server," or both in the `applies_to` key.
- [x] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent d5584159
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
---
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.
+1 −1
Original line number Diff line number Diff line
@@ -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 }}
+1 −1
Original line number Diff line number Diff line
@@ -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 }}
+1 −1
Original line number Diff line number Diff line
@@ -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:
+1 −1
Original line number Diff line number Diff line
@@ -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:
Loading