Unverified Commit 4bbc677c authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Fix several warnings and reduce Rust target clobbering (#1069)

parent 7f74b87f
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -28,3 +28,21 @@ message = "Upgraded Smithy to 1.16.1"
references = ["smithy-rs#1053"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = "Fix broken link to `RetryMode` in client docs"
references = ["smithy-rs#1069"]
meta = { "breaking" = false, "tada" = false, "bug" = true }
author = "jdisanti"

[[smithy-rs]]
message = "Fix several doc links to raw identifiers (identifiers excaped with `r#`)"
references = ["smithy-rs#1069"]
meta = { "breaking" = false, "tada" = false, "bug" = true }
author = "jdisanti"

[[smithy-rs]]
message = "Reduce dependency recompilation in local dev"
references = ["smithy-rs#1069"]
meta = { "breaking" = false, "tada" = false, "bug" = true }
author = "jdisanti"
+7 −8
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ plugins {
}

val smithyVersion: String by project
val defaultRustFlags: String by project
val defaultRustDocFlags: String by project

dependencies {
    implementation(project(":aws:sdk-codegen"))
@@ -81,32 +83,29 @@ tasks["assemble"].finalizedBy("generateCargoWorkspace")

tasks.register<Exec>("cargoCheck") {
    workingDir("build/smithyprojections/sdk-codegen-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "check")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoTest") {
    workingDir("build/smithyprojections/sdk-codegen-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "test")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoDocs") {
    workingDir("build/smithyprojections/sdk-codegen-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTDOCFLAGS", defaultRustDocFlags)
    commandLine("cargo", "doc", "--no-deps")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoClippy") {
    workingDir("build/smithyprojections/sdk-codegen-test/")
    // disallow warnings
    commandLine("cargo", "clippy", "--", "-D", "warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "clippy")
    dependsOn("assemble")
}

+7 −8
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ plugins {
}

val smithyVersion: String by project
val defaultRustFlags: String by project
val defaultRustDocFlags: String by project
val properties = PropertyRetriever(rootProject, project)

val outputDir = buildDir.resolve("aws-sdk")
@@ -288,32 +290,29 @@ tasks["assemble"].apply {

tasks.register<Exec>("cargoCheck") {
    workingDir(outputDir)
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "check", "--lib", "--tests", "--benches")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoTest") {
    workingDir(outputDir)
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "test")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoDocs") {
    workingDir(outputDir)
    // disallow warnings
    environment("RUSTDOCFLAGS", "-D warnings")
    environment("RUSTDOCFLAGS", defaultRustDocFlags)
    commandLine("cargo", "doc", "--no-deps", "--document-private-items")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoClippy") {
    workingDir(outputDir)
    // disallow warnings
    commandLine("cargo", "clippy", "--", "-D", "warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "clippy")
    dependsOn("assemble")
}

+7 −8
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ tasks["jar"].enabled = false
plugins { id("software.amazon.smithy").version("0.5.3") }

val smithyVersion: String by project
val defaultRustFlags: String by project
val defaultRustDocFlags: String by project

buildscript {
    val smithyVersion: String by project
@@ -99,32 +101,29 @@ tasks["assemble"].finalizedBy("generateCargoWorkspace")

tasks.register<Exec>("cargoCheck") {
    workingDir("build/smithyprojections/codegen-server-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "check")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoTest") {
    workingDir("build/smithyprojections/codegen-server-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "test")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoDocs") {
    workingDir("build/smithyprojections/codegen-server-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTDOCFLAGS", defaultRustDocFlags)
    commandLine("cargo", "doc", "--no-deps")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoClippy") {
    workingDir("build/smithyprojections/codegen-server-test/")
    // disallow warnings
    commandLine("cargo", "clippy", "--", "-D", "warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "clippy")
    dependsOn("assemble")
}

+7 −8
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ plugins {
}

val smithyVersion: String by project
val defaultRustFlags: String by project
val defaultRustDocFlags: String by project

buildscript {
    val smithyVersion: String by project
@@ -137,32 +139,29 @@ tasks["assemble"].finalizedBy("generateCargoWorkspace")

tasks.register<Exec>("cargoCheck") {
    workingDir("build/smithyprojections/codegen-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "check")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoTest") {
    workingDir("build/smithyprojections/codegen-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "test")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoDocs") {
    workingDir("build/smithyprojections/codegen-test/")
    // disallow warnings
    environment("RUSTFLAGS", "-D warnings")
    environment("RUSTDOCFLAGS", defaultRustDocFlags)
    commandLine("cargo", "doc", "--no-deps")
    dependsOn("assemble")
}

tasks.register<Exec>("cargoClippy") {
    workingDir("build/smithyprojections/codegen-test/")
    // disallow warnings
    commandLine("cargo", "clippy", "--", "-D", "warnings")
    environment("RUSTFLAGS", defaultRustFlags)
    commandLine("cargo", "clippy")
    dependsOn("assemble")
}

Loading