Unverified Commit 386ec3f1 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Add MSRV to generated SDK Cargo.toml files (#3601)

This PR sets the `rust-version` property on generated Cargo.toml files
for the AWS SDK crates. It doesn't attempt to place the property on the
runtime crates for now since that will either require manual updating,
or more machinery to automate.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent cfb97edb
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -25,8 +25,13 @@ jobs:
      shell: bash
      run: |
        sudo apt-get update
        sudo apt-get -y install gcc make python3-pip nginx git ruby openjdk-17-jre pkg-config libssl-dev faketime
        sudo apt-get -y install gcc make python3-pip nginx git ruby pkg-config libssl-dev faketime
        pip3 install certbuilder crlbuilder
    - name: Configure JDK
      uses: actions/setup-java@v4
      with:
        distribution: corretto
        java-version: 17
    - name: Stop nginx
      run: sudo systemctl stop nginx
    - name: Checkout smithy-rs
+6 −0
Original line number Diff line number Diff line
@@ -52,3 +52,9 @@ let result = client.wait_until_thing()
references = ["smithy-rs#119", "smithy-rs#3595", "smithy-rs#3593", "smithy-rs#3585", "smithy-rs#3571", "smithy-rs#3569"]
meta = { "breaking" = false, "tada" = true, "bug" = false, "target" = "client" }
author = "jdisanti"

[[aws-sdk-rust]]
message = "SDK crates now set the `rust-version` property in their Cargo.toml files to indicate the minimum supported Rust version."
references = ["smithy-rs#3601"]
meta = { "breaking" = false, "tada" = true, "bug" = false }
author = "jdisanti"
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ fun generateSmithyBuild(services: AwsServices): String {
                        ${service.examplesUri(project)?.let { """"examples": "$it",""" } ?: ""}
                        "moduleRepository": "https://github.com/awslabs/aws-sdk-rust",
                        "license": "Apache-2.0",
                        "minimumSupportedRustVersion": "${getRustMSRV()}",
                        "customizationConfig": {
                            "awsSdk": {
                                "awsSdkBuild": true,
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ data class ClientRustSettings(
    override val codegenConfig: ClientCodegenConfig,
    override val license: String?,
    override val examplesUri: String?,
    override val minimumSupportedRustVersion: String? = null,
    override val customizationConfig: ObjectNode?,
) : CoreRustSettings(
        service,
@@ -49,6 +50,7 @@ data class ClientRustSettings(
        codegenConfig,
        license,
        examplesUri,
        minimumSupportedRustVersion,
        customizationConfig,
    ) {
    companion object {
@@ -70,6 +72,7 @@ data class ClientRustSettings(
                codegenConfig = ClientCodegenConfig.fromCodegenConfigAndNode(coreCodegenConfig, codegenSettingsNode),
                license = coreRustSettings.license,
                examplesUri = coreRustSettings.examplesUri,
                minimumSupportedRustVersion = coreRustSettings.minimumSupportedRustVersion,
                customizationConfig = coreRustSettings.customizationConfig,
            )
        }
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ fun testClientRustSettings(
    codegenConfig: ClientCodegenConfig = ClientCodegenConfig(),
    license: String? = null,
    examplesUri: String? = null,
    minimumSupportedRustVersion: String? = null,
    customizationConfig: ObjectNode? = null,
) = ClientRustSettings(
    service,
@@ -48,6 +49,7 @@ fun testClientRustSettings(
    codegenConfig,
    license,
    examplesUri,
    minimumSupportedRustVersion,
    customizationConfig,
)

Loading