Compile-time check for a smithy-rs server relying on incompatible versions of lambda_http
#2686
Labels
server
Rust server SDK
lambda_http
#2686
If a smithy-rs server application depends on
lambda_http
0.8.0, butaws-smithy-http-server
depends onlambda_http
0.7.0, requests become unroutable. See #2676.In general, we cannot guarantee that a smithy-rs server application will work correctly if it depends on a version of
lambda_http
that is semver-incompatible with the version used byaws-smithy-http-server
. We're palliating this with documentation in #2683, but if developers don't read it, an incompatible setup can cause a hard-to-debug issue.This ticket tracks possible mechanisms we could use to check this at compile-time, to warn or abort the compile.
One suggestion by @LukeMathWalker is to use
cargo metadata
/guppy::graph::PackageQuery
in abuild.rs
of the generated server SDK to traverse the dependency graph upwards and detect if the service application reaches a version oflambda_http
that is incompatible with a version on which the server SDK depends. A thing to note is that with abuild.rs
approach, built artifacts of the server SDK may become harder/impossible to cache.The text was updated successfully, but these errors were encountered: