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

Move re-exports into `types` and re-export `AggregatedBytes` (#1085)

* Move re-exports into `types` and re-export `AggregatedBytes`

* Remove extra newline from changelog generator

* Only re-export types when they're used

* Re-export `Config` and `Client` with `#[doc(inline)]`

* Update changelog

* Fix the canary build

* Don't check examples in full services check
parent d48c2347
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -268,6 +268,8 @@ jobs:
        path: artifact
    - name: untar
      run: tar -xvf ./artifact/sdk.tar
    - name: Remove examples from workspace
      run: sed -i '/"examples\//d' Cargo.toml
    - name: Check the SDK
      run: cargo check
      working-directory: ./sdk
+56 −0
Original line number Diff line number Diff line
@@ -11,6 +11,62 @@
# meta = { "breaking" = false, "tada" = false, "bug" = false }
# author = "rcoh"

[[aws-sdk-rust]]
message = """
Moved the following re-exports into a `types` module for all services:
- `aws_sdk_<service>::AggregatedBytes` -> `aws_sdk_<service>::types::AggregatedBytes`
- `aws_sdk_<service>::Blob` -> `aws_sdk_<service>::types::Blob`
- `aws_sdk_<service>::ByteStream` -> `aws_sdk_<service>::types::ByteStream`
- `aws_sdk_<service>::DateTime` -> `aws_sdk_<service>::types::DateTime`
- `aws_sdk_<service>::SdkError` -> `aws_sdk_<service>::types::SdkError`
"""
references = ["smithy-rs#1085"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "jdisanti"

[[aws-sdk-rust]]
message = """
`AggregatedBytes` and `ByteStream` are now only re-exported if the service has streaming operations,
and `Blob`/`DateTime` are only re-exported if the service uses them.
"""
references = ["smithy-rs#1085"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "jdisanti"

[[aws-sdk-rust]]
message = "The `Client` and `Config` re-exports now have their documentation inlined in the service docs"
references = ["smithy-rs#1085"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = """
Moved the following re-exports into a `types` module for all services:
- `<service>::AggregatedBytes` -> `<service>::types::AggregatedBytes`
- `<service>::Blob` -> `<service>::types::Blob`
- `<service>::ByteStream` -> `<service>::types::ByteStream`
- `<service>::DateTime` -> `<service>::types::DateTime`
- `<service>::SdkError` -> `<service>::types::SdkError`
"""
references = ["smithy-rs#1085"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = """
`AggregatedBytes` and `ByteStream` are now only re-exported if the service has streaming operations,
and `Blob`/`DateTime` are only re-exported if the service uses them.
"""
references = ["smithy-rs#1085"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = "The `Client` and `Config` re-exports now have their documentation inlined in the service docs"
references = ["smithy-rs#1085"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"

[[aws-sdk-rust]]
message = "MSRV increased from `1.54` to `1.56.1` per our 2-behind MSRV policy."
references = ["smithy-rs#1130"]
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ package software.amazon.smithy.rustsdk

import software.amazon.smithy.model.shapes.ShapeId
import software.amazon.smithy.model.traits.TitleTrait
import software.amazon.smithy.rust.codegen.rustlang.Attribute
import software.amazon.smithy.rust.codegen.rustlang.CargoDependency
import software.amazon.smithy.rust.codegen.rustlang.DependencyScope
import software.amazon.smithy.rust.codegen.rustlang.Feature
@@ -78,6 +79,7 @@ class AwsFluentClientDecorator : RustCodegenDecorator {
        return baseCustomizations + object : LibRsCustomization() {
            override fun section(section: LibRsSection) = when (section) {
                is LibRsSection.Body -> writable {
                    Attribute.DocInline.render(this)
                    rust("pub use client::Client;")
                }
                else -> emptySection
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ class IntegrationTestDependencies(
    private val hasBenches: Boolean,
) : LibRsCustomization() {
    override fun section(section: LibRsSection) = when (section) {
        LibRsSection.Body -> writable {
        is LibRsSection.Body -> writable {
            if (hasTests) {
                val smithyClient = CargoDependency.SmithyClient(runtimeConfig)
                    .copy(features = setOf("test-util"), scope = DependencyScope.Dev)
+2 −1
Original line number Diff line number Diff line
@@ -3,7 +3,8 @@
 * SPDX-License-Identifier: Apache-2.0.
 */

use aws_sdk_glacier::{ByteStream, Credentials, Region};
use aws_sdk_glacier::types::ByteStream;
use aws_sdk_glacier::{Credentials, Region};
use aws_smithy_client::test_connection::capture_request;
use aws_smithy_protocol_test::{assert_ok, validate_headers};

Loading