Skip to content

Commit

Permalink
Remove aws-lambda feature from generated Cargo.tomls
Browse files Browse the repository at this point in the history
  • Loading branch information
unexge committed Dec 9, 2022
1 parent 05ce2ba commit 34703cb
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,6 @@ class PubUsePythonTypesDecorator : RustCodegenDecorator<ServerProtocolGenerator,
clazz.isAssignableFrom(ServerCodegenContext::class.java)
}

/**
* Decorator adding an `aws-lambda` feature to the generated crate.
*/
class PythonFeatureFlagsDecorator : RustCodegenDecorator<ServerProtocolGenerator, ServerCodegenContext> {
override val name: String = "PythonFeatureFlagsDecorator"
override val order: Byte = 0

override fun extras(codegenContext: ServerCodegenContext, rustCrate: RustCrate) {
rustCrate.mergeFeature(Feature("aws-lambda", true, listOf("aws-smithy-http-server-python/aws-lambda")))
}

override fun supportsCodegenContext(clazz: Class<out CodegenContext>): Boolean =
clazz.isAssignableFrom(ServerCodegenContext::class.java)
}

val DECORATORS = listOf(
/**
* Add the [InternalServerError] error to all operations.
Expand All @@ -131,6 +116,4 @@ val DECORATORS = listOf(
PubUsePythonTypesDecorator(),
// Render the Python shared library export.
PythonExportModuleDecorator(),
// Add the `aws-lambda` feature flag
PythonFeatureFlagsDecorator(),
)

0 comments on commit 34703cb

Please sign in to comment.