Commit f17aeb4d authored by ysaito1001's avatar ysaito1001 Committed by AWS SDK Rust Bot
Browse files

Remove #[doc(hidden)] from stable crates (#3226)

This PR removes `#[doc(hidden)]` from types/functions in stable crates
(as defined in
[CrateSet.kt](https://github.com/smithy-lang/smithy-rs/blob/ad520b080aa0a3e8239ab2857dafb519c3458088/buildSrc/src/main/kotlin/CrateSet.kt#L19-L33)

).
They are now `pub`, however, for those that are not intended to be used
directly, we preserve the original docs to be explicit about it.

After this PR, stable crates contain neither
<details>
<summary>#[doc(hidden)]</summary>

```
➜  smithy-rs git:(ysaito/remove-doc-hidden) rg -l '#\[doc\(hidden\)\]'
aws/rust-runtime/aws-http/src/user_agent.rs
CHANGELOG.next.toml
CHANGELOG.md
rust-runtime/aws-smithy-http/src/lib.rs
rust-runtime/aws-smithy-http/src/event_stream/sender.rs
rust-runtime/aws-smithy-http/src/event_stream/receiver.rs
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/error/ErrorImplGenerator.kt (this is only for CodegenTarget.SERVER)
codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/StructureGeneratorTest.kt
design/src/server/instrumentation.md
design/src/rfcs/rfc0039_forward_compatible_errors.md
design/src/rfcs/rfc0032_better_constraint_violations.md
design/src/rfcs/rfc0026_client_crate_organization.md
rust-runtime/aws-smithy-http-server/src/macros.rs
rust-runtime/aws-smithy-http-server/src/routing/mod.rs
rust-runtime/aws-smithy-http-server/src/shape_id.rs
rust-runtime/aws-smithy-http-server/src/body.rs
rust-runtime/aws-smithy-http-server/src/lib.rs
rust-runtime/aws-smithy-http-server/src/plugin/mod.rs
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/MapConstraintViolationGenerator.kt
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/CollectionConstraintViolationGenerator.kt
```
</details>

nor

<details>
<summary>DocHidden</summary>

```
➜  smithy-rs git:(ysaito/remove-doc-hidden) rg -l 'DocHidden'
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustType.kt
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerBuilderConstraintViolations.kt
```
</details>

<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: default avatarRussell Cohen <rcoh@amazon.com>
parent caf86d3f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -104,3 +104,15 @@ message = "Add `Display` impl for `DateTime`."
references = ["smithy-rs#3183"]
meta = { "breaking" = false, "tada" = true, "bug" = false, "target" = "all" }
author = "HakanVardarr"

[[smithy-rs]]
message = "Types/functions that were previously `#[doc(hidden)]` in `aws-smithy-async`, `aws-smithy-runtime-api`, `aws-smithy-runtime`, `aws-smithy-types`, and the SDK crates are now visible. For those that are not intended to be used directly, they are called out in their docs as such."
references = ["smithy-rs#3226"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client" }
author = "ysaito1001"

[[aws-sdk-rust]]
message = "Types/functions that were previously `#[doc(hidden)]` in `aws-config`, `aws-inlineable`, `aws-types`, and the SDK crates are now visible. For those that are not intended to be used directly, they are called out in their docs as such."
references = ["smithy-rs#3226"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "ysaito1001"
+1 −2
Original line number Diff line number Diff line
@@ -41,11 +41,10 @@ pub struct Builder {
}

impl Builder {
    #[doc(hidden)]
    /// Configure the default chain
    ///
    /// Exposed for overriding the environment when unit-testing providers
    pub fn configure(self, configuration: &ProviderConfig) -> Self {
    pub(crate) fn configure(self, configuration: &ProviderConfig) -> Self {
        Self {
            provider_config: configuration.clone(),
        }
+1 −2
Original line number Diff line number Diff line
@@ -45,11 +45,10 @@ pub struct Builder {
}

impl Builder {
    #[doc(hidden)]
    /// Configure the default chain
    ///
    /// Exposed for overriding the environment when unit-testing providers
    pub fn configure(mut self, configuration: &ProviderConfig) -> Self {
    pub(crate) fn configure(mut self, configuration: &ProviderConfig) -> Self {
        self.env_provider = EnvironmentVariableRegionProvider::new_with_env(configuration.env());
        self.profile_file = self.profile_file.configure(configuration);
        self.imds = self.imds.configure(configuration);
+1 −2
Original line number Diff line number Diff line
@@ -58,11 +58,10 @@ impl EnvironmentVariableCredentialsProvider {
        Self::new_with_env(Env::real())
    }

    #[doc(hidden)]
    /// Create a new `EnvironmentVariableCredentialsProvider` with `Env` overridden
    ///
    /// This function is intended for tests that mock out the process environment.
    pub fn new_with_env(env: Env) -> Self {
    pub(crate) fn new_with_env(env: Env) -> Self {
        Self { env }
    }
}
+1 −2
Original line number Diff line number Diff line
@@ -22,11 +22,10 @@ impl EnvironmentVariableRegionProvider {
        EnvironmentVariableRegionProvider { env: Env::real() }
    }

    #[doc(hidden)]
    /// Create an region provider from a given `Env`
    ///
    /// This method is used for tests that need to override environment variables.
    pub fn new_with_env(env: Env) -> Self {
    pub(crate) fn new_with_env(env: Env) -> Self {
        EnvironmentVariableRegionProvider { env }
    }
}
Loading