Lightweight vendor packages (AWS) - #1388
Draft
fudiwei wants to merge 1 commit into
Draft
Conversation
fudiwei
force-pushed
the
main
branch
2 times, most recently
from
August 6, 2026 08:56
773173e to
f94fa07
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
该 PR 包含以下内容变更:
AWS SDK 大量使用了代码生成器生成序列化相关代码、且客户端存在大量 API 方法,编译时无法正常触发 DCE(上游相关 Issue: aws/aws-sdk-go-v2#2930 ),使得二进制体积急遽膨胀。
本次提交使用了自定义客户端+反射重新实现 HTTP 请求部分,但仍然复用官方 SDK 中的模型定义。
没有采用与 #1035 类似的裁剪方案,在于官方 SDK 实现较为复杂,无法简单化、易维护化地裁剪。
new: 91.90 MB
diff: -16.33%
注:仍有
github.com/aws/aws-sdk-go-v2/service/route53、github.com/aws/aws-sdk-go-v2/service/cloudfront两个模块没有替换,因为它们的官方 SDK 模型定义与 XML Schema 差异过大,无法直接复用。