diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt index 12b809a70726c1b072c688cbb9c0fdb2e34d6aae..1c524be42eed20a96476fdc7c7683010d3d038c3 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt @@ -82,7 +82,6 @@ class CodegenVisitor(context: PluginContext, private val codegenDecorator: RustC val serviceShapes = Walker(model).walkShapes(service) serviceShapes.forEach { it.accept(this) } codegenDecorator.extras(protocolConfig, rustCrate) - // TODO: if we end up with a lot of these on-by-default customizations, we may want to refactor them somewhere rustCrate.finalize( settings, codegenDecorator.libRsCustomizations( diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt index 69e65492f55a3054144d6bb524a104095e34808c..cabcb74e5fe44c910693b9efda3d6bc3c92f679f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt @@ -198,7 +198,6 @@ class SymbolVisitor( override fun setShape(shape: SetShape): Symbol { val inner = this.toSymbol(shape.member) val builder = if (model.expectShape(shape.member.target).isStringShape) { - // TODO: refactor / figure out how we want to handle prebaked symbols symbolBuilder(shape, RustType.HashSet(inner.rustType())) } else { // only strings get put into actual sets because floats are unhashable diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/NamedSectionGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/NamedSectionGenerator.kt index be51ca5af7de90e8ac135fbfc43cb0398232ab1d..8f6c4b1f6a585a1b33db6ea5b8a1079f08e17b39 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/NamedSectionGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/NamedSectionGenerator.kt @@ -27,9 +27,6 @@ abstract class Section(val name: String) * 1. Override section and use a `when` clause to handle each section individually * 2. Call `registerSection { ... }` to register individual sections on demand. * - * TODO: Factory for creating named-section generators from ProtocolConfig - * - * TODO: Enable using partials as a named section generator to allow defining insertions from inlineable Rust code: * ```rust * struct Config { * /* section:ConfigStruct */ diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt index 0b526517e2bad91fe5ff3cd21ef869fd0206dc62..bb2b75b9b97bb4983ff81876a84f93819d7a3ef0 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt @@ -100,7 +100,6 @@ class EnumGenerator( } private fun implBlock() { - // TODO: should enums also implement AsRef? writer.rustBlock("impl $enumName") { writer.rustBlock("pub fn as_str(&self) -> &str") { writer.rustBlock("match self") { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpProtocolGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpProtocolGenerator.kt index 7b18a16b86b388f577b64d38794eb45912032268..f6a6430faab429666dc805a444a527485351574f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpProtocolGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpProtocolGenerator.kt @@ -78,7 +78,6 @@ abstract class HttpProtocolGenerator( inputWriter.implBlock(inputShape, symbolProvider) { buildOperation(this, operationShape, customizations, sdkId) toHttpRequestImpl(this, operationShape, inputShape) - // TODO: streaming shapes need special support rustBlock( "fn assemble(mut builder: #1T, body: #3T) -> #2T<#3T>", RuntimeType.HttpRequestBuilder, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/RequestBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/RequestBindingGenerator.kt index b64c1d7c30fe88f4fa93d214092ddbff438353df..76fee3f2955f597a48189de50a659abc87e4aeb0 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/RequestBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/RequestBindingGenerator.kt @@ -39,7 +39,6 @@ fun HttpTrait.uriFormatString(): String { else -> it.content } } - // TODO: support query literals return base.dq() } @@ -51,11 +50,6 @@ fun HttpTrait.uriFormatString(): String { * * This method takes a builder (perhaps pre configured with some headers) from the caller and sets the HTTP * headers & URL based on the HTTP trait implementation. - * - * More work is required to implement the entirety of https://awslabs.github.io/smithy/1.0/spec/core/http-traits.html - * Specifically: - * TODO: httpPrefixHeaders; 4h - * TODO: Deserialization of all fields; 1w */ class RequestBindingGenerator( val model: Model, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsRestJson.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsRestJson.kt index a0da099af336afb52a2e2559368167ce207fc246..85477e30f973e45d0bb53bac04d195d38c407d45 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsRestJson.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsRestJson.kt @@ -57,7 +57,6 @@ class AwsRestJsonFactory : ProtocolGeneratorFactory } override fun support(): ProtocolSupport { - // TODO: Support body for RestJson return ProtocolSupport( requestSerialization = true, requestBodySerialization = true, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/ProtocolLoader.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/ProtocolLoader.kt index e63812aa29ae3cab2a40c2a2124c9e13cd61127e..ee6615bfed3bc0566acba46b273d79f6326d76b8 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/ProtocolLoader.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/ProtocolLoader.kt @@ -20,8 +20,6 @@ import software.amazon.smithy.rust.codegen.smithy.generators.ProtocolGeneratorFa typealias ProtocolMap = Map> -// typealias ProtocolMap = -// TODO: supportedProtocols must be runtime loadable via SPI; 2d class ProtocolLoader(private val supportedProtocols: ProtocolMap) { fun protocolFor( model: Model, diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/InstantiatorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/InstantiatorTest.kt index 887a355efa2bb69ddbda711ea579b57206734179..43a536ee404c52f2d2954c9f205e8b63af9f2046 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/InstantiatorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/InstantiatorTest.kt @@ -71,8 +71,6 @@ class InstantiatorTest { private val symbolProvider = testSymbolProvider(model) private val runtimeConfig = TestRuntimeConfig - // TODO: test of recursive structures when supported - fun RustWriter.test(block: RustWriter.() -> Unit) { raw("#[test]") rustBlock("fn inst()") {