Skip to content

Conversation

@jbelkins
Copy link
Contributor

@jbelkins jbelkins commented Nov 24, 2025

Description of changes

SmithyHTTPAPI has a dependency on CRT AwsCommonRuntimeKit because it includes code for converting endpoint properties to/from the CRT types.

That code is moved to ClientRuntime with theDefaultEndpointResolver that uses it, and the dependency of SmithyHTTPAPI on AwsCommonRuntimeKit is removed.

This is a breaking change due to moving public components from one module to the other, but should be zero impact on customers since only DefaultEndpointResolver (located in ClientRuntime) calls the moved methods, and it is unlikely customers ever interact with them.

Scope

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jbelkins jbelkins marked this pull request as ready for review November 24, 2025 22:56
@jbelkins jbelkins changed the title chore: Move CRT dependency from SmithyHTTPAPI to ClientRuntime chore!: Move CRT dependency from SmithyHTTPAPI to ClientRuntime Nov 25, 2025

public init(urlString: String,
headers: Headers = Headers(),
endpointProperties: [String: EndpointProperty]) throws {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initializer above is only called by DefaultEndpointResolver so it is moved here from SmithyHTTPAPI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}

private extension EndpointPropertyValue {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extension on EndpointPropertyValue is only called from the initializer above, so it is moved here & scoped private.

try self.init(url: url, headers: headers, properties: properties)
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code above is moved to ClientRuntime to be with the DefaultEndpointResolver that calls it.

}
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension above was only ever called by the initializer in the file above.

"Smithy",
.product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift")
]
dependencies: ["Smithy"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRT dependency is removed from SmithyHTTPAPI since no remaining types in SmithyHTTPAPI reference it.

@jbelkins jbelkins merged commit 144886b into main Nov 25, 2025
33 checks passed
@jbelkins jbelkins deleted the jbe/crt_out_of_smithy_http_api branch November 25, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants