Repository navigation
build(package): exclude target-variant dirs from the crate — guard against >10MiB upload rejection - #851
Merged
Conversation
…rate — target2-baseline (1.7GB stale build tree, untracked & not ignored) inflated a local cargo package to 457MB; crates.io cap is 10MiB (published v1.4.0 = 2.27MiB, CI clean checkouts unaffected)
This was referenced Oct 19, 2026
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.
owner 警觉引出的护栏:主检出曾存
target2-baseline/(1.7GB 旧构建基线树)——名字以target2开头,既不被 .gitignore 的/target-*(要求字面 target- 前缀)匹配,也不被 Cargo.toml exclude 的target/**覆盖,未追踪未忽略 → 本地cargo package实测被打进 457MB(crates.io 上限 10MiB 压缩件)。/target*/(目录级通配,防任何 target 变体树)、Cargo.toml exclude 加"target*/**"。验证:改动后
cargo package --list不再含 target 变体条目;发布链(CI 干净检出)行为不变。