-
Notifications
You must be signed in to change notification settings - Fork 223
[HTTP 1.x] Add legacy crates to maintain http@0.x support during migration #4372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
can you target mainline with this instead? |
| event-stream = ["aws-smithy-eventstream"] | ||
| rt-tokio = ["aws-smithy-types/rt-tokio"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm...I guess we still need these features? event streams currently use aws-smithy-http based types. I guess the client won't use the legacy crate right? We should have a test case that ensures generated clients never include clients.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated clients would never use these aws-smithy-legacy-* crates because the Kotlin class that adds these dependencies is defined in the HttpDependencies data class within the server module. There are no CargoDependencies defined for the legacy crates in the core module either. The client code has no reference to them unless someone explicitly adds them at a later stage.
I will add a test in the client to ensure they are not added.
| bytes-utils = "0.1" | ||
| # TODO(hyper1) - Complete the breaking changes by updating to http 1.x ecosystem fully in this crate. Also remove hyper 0.14 from dev | ||
| http-02x = { package = "http", version = "0.2.9" } | ||
| http-1x = { package = "http", version = "1" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need a lot of this stuff right? I guess I wonder if we should prune out the parts of aws-smithy-http-legacy we don't need. maybe its OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep it as it originally existed to ensure we don't break compatibility for users who still want to generate http@0.x-based SDKs. Therefore, these two crates are an exact copy of their original state before we decided to remove http@0.x support from them.
5bd707e to
d25a40a
Compare
It now targets main. |
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
c77e2dc to
eb27b66
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
1f985db to
bb1c41b
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
- Fix doctest in aws-smithy-legacy-http/src/query.rs to use correct crate name - Add AWS Rust SDK Team to authors in aws-smithy-legacy-http-server/Cargo.toml Fixes CI failures in check-style-and-lints, check-rust-runtimes, Windows tests, and SDK smoketest
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
This PR introduces two new legacy crates (
aws-smithy-legacy-httpandaws-smithy-legacy-http-server) that maintain support forhttp@0.xwhile the codebase transitions to
http@1.x.Background
As part of the HTTP 1.x migration effort (see branch
feature/http-1.x), we're adding support for generating server SDKs that depend onhttp@1.xvia a newhttp-1xcodegen flag. However, we need to maintain backward compatibility withhttp@0.xfor existing users.Why Legacy Crates?
Initially, we attempted to pin dependencies to the last versions that supported
http@0.x. However, this approach failed because:Solution
Creating dedicated legacy crates solves this problem by:
Changes in this PR
aws-smithy-legacy-httpcrate (forked fromaws-smithy-httpwith http@0.x support)aws-smithy-legacy-http-servercrate (forked fromaws-smithy-http-serverwith http@0.x support)rust-runtime/Cargo.tomlto include both legacy crates in the workspaceNote
This PR is split out from the main
http@1.xwork to make it easier for reviewers to evaluate just the legacy crate additions separately from the codegen changes. By default,http@0.xremains the default - thehttp-1xflag must be explicitly enabled to usehttp@1.x.