Comments (9)
This is 90% of cargo's source size:
$ git ls-files | grep -v libs/ | xargs du -c | sort -n
4 DESIGN/LIBS.md
4 .gitignore
4 .gitmodules
4 LICENSE-MIT
4 Makefile
4 README.md
4 src/bin/cargo-build.rs
4 src/bin/cargo-git-checkout.rs
4 src/bin/cargo-read-manifest.rs
4 src/bin/cargo-rustc.rs
4 src/bin/cargo-verify-project.rs
4 src/cargo/core/dependency.rs
4 src/cargo/core/errors.rs
4 src/cargo/core/mod.rs
4 src/cargo/core/package_id.rs
4 src/cargo/core/registry.rs
4 src/cargo/core/summary.rs
4 src/cargo/ops/cargo_compile.rs
4 src/cargo/ops/cargo_read_manifest.rs
4 src/cargo/ops/mod.rs
4 src/cargo/sources/git/mod.rs
4 src/cargo/sources/mod.rs
4 src/cargo/sources/path.rs
4 src/cargo/util/graph.rs
4 src/cargo/util/important_paths.rs
4 src/cargo/util/mod.rs
4 src/cargo/util/paths.rs
4 src/cargo/util/result.rs
4 tests/fixtures/hello.rs
4 tests/support/paths.rs
4 tests/test_shell.rs
4 tests/tests.rs
4 .travis.check.style.sh
4 .travis.install.deps.sh
4 .travis.yml
4 .vimrc
8 DESIGN/DESIGN.md
8 DESIGN/MANIFEST.md
8 MANIFEST.md
8 src/bin/cargo.rs
8 src/cargo/core/manifest.rs
8 src/cargo/core/package.rs
8 src/cargo/core/resolver.rs
8 src/cargo/core/shell.rs
8 src/cargo/core/source.rs
8 src/cargo/lib.rs
8 src/cargo/ops/cargo_rustc.rs
8 src/cargo/sources/git/source.rs
8 src/cargo/util/config.rs
8 src/cargo/util/errors.rs
8 src/cargo/util/process_builder.rs
8 src/cargo/util/toml.rs
12 LICENSE-APACHE
12 src/cargo/core/version_req.rs
12 src/cargo/sources/git/utils.rs
12 tests/support/mod.rs
12 tests/test_cargo_compile_path_deps.rs
16 tests/test_cargo_compile_git_deps.rs
16 tests/test_cargo_compile.rs
4028 tests/tests
4392 total
(grep -v libs/
to remove the submodules, since the du
doesn't handle them nicely. hammer.rs and hamcrest-rust are both <50kb, toml-rs is about 500kb and >400kb of that is tests.)
from cargo.
That involves re-writing the entire history, which means everyone's checkouts are invalid.
It's easy to run git-filter-branch
, that's not the issue.
from cargo.
4MB is kind of bad 😦
I don't like rewriting history, but this is a kind of extreme case.
from cargo.
There's also a 2.3MB file res
in the git history, added in 3ac946a and removed later.
https://github.com/rust-lang/cargo/blob/3ac946a2c9f0481165aa29a43113f9c764fe4d9c/res
from cargo.
I believe that history is quite important, even for a fledgling project such as this. I've updated the title/description to the course of action I believe needs to be taken to resolve this issue.
from cargo.
filter-branch
will preserve the rest of the history and just remove the 6+MB of binaries.
from cargo.
Hm, I may not fully understand what filter-branch
is doing then. I ran these two commands:
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch res' HEAD
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch tests/tests' HEAD
And the resulting commit differed by 197 commits form the current HEAD. I was under the impression that only the two commits which introduced those files actually had their contents changed, but all other commits changed hashes because they have a different lineage, even if the same contents.
If we could modify just those two commits it would be nice, but is that possible?
from cargo.
Oh, sorry, yeah, I was talking about "preserving history" in a more abstract sense. The commits will change (since info about the lineage is included in the hash, as you say), but the actual contents of each commit would be unchanged (other the ones actually touching res
/tests/tests
).
from cargo.
Ah, that makes sense!
from cargo.
Related Issues (20)
- cargo install probe-rs --features cli fails HOT 2
- [rustdoc] Integration test documentation build failure HOT 3
- Cargo 1.78 release date is in the future HOT 1
- Disable adding a feature when using cargo-add --optional HOT 2
- Add support for binary dependencies HOT 2
- Option to disable workspace edit feature of cargo new HOT 2
- `cargo doc` should suggest `--lib` override if documenting a crate with only `doc = false` targets HOT 2
- `include_str!` does not work in cargo script if there are dependencies HOT 1
- Potential locking issue on macOS HOT 1
- Heuristics to include Cargo.lock or not in a package are suboptimal HOT 2
- cargo test: option to run all tests under the same binary HOT 5
- `cargo install crate1 crate2 ..` updates index repeatedly for every crate in list. HOT 3
- Allow manifest dependencies of same-workspace crates to use `workspace = true` HOT 3
- log level for os error is set to INFO level HOT 1
- cargo publish has bad error message when explicit `[[bench]]` isn't in `package.include` HOT 9
- unable to connect to index.crates.io HOT 18
- -Clink-args not work with env HOT 1
- Be able to disable the certificate verification in the curl library HOT 2
- cargo add: "failed to persist temporary file: Text file busy" on vboxsf (Linux guest Windows host) HOT 1
- Native build on aarch64 is different than on x86 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo.