Skip to content
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

crate file is very large due to one test file #742

Closed
3 tasks done
ijackson opened this issue Dec 20, 2023 · 2 comments
Closed
3 tasks done

crate file is very large due to one test file #742

ijackson opened this issue Dec 20, 2023 · 2 comments
Labels
customer-request Documents customer requests.

Comments

@ijackson
Copy link

ijackson commented Dec 20, 2023

Progress

  • zerocopy-derive's Cargo.toml updated to exclude the files listed below
  • Cargo.toml update backported to 0.7.x
  • New 0.7.x version published

Original text

The crate file for zerocopy-derive 0.7.31 is 533507 bytes. That's not great, since lots of people must donwload it. It's disproportionate.

This is because of these two files

-rw-r--r-- 0/0         2354944 2006-07-24 02:21 zerocopy-derive-0.7.31/tests/enum_from_bytes.rs
-rw-r--r-- 0/0         1169353 2006-07-24 02:21 zerocopy-derive-0.7.31/tests/ui-nightly/enum_from_bytes_u16_too_few.rs.disabled

The 2nd one could be simply git rmd. The first one contains a large amount of very formulaic test case which could be generated by creative use of macro_rules and paste.

If you like I could have a go at the macrology. However, I am not willing to sign a CLA.

@ijackson ijackson added the customer-request Documents customer requests. label Dec 20, 2023
@joshlf
Copy link
Member

joshlf commented Dec 20, 2023

Good call; we'll release a new version that excludes these files.

joshlf added a commit that referenced this issue Dec 20, 2023
Exclude the following files from the crate file uploaded to crates.io;
they are excessively large, and cause the resulting crate file to be
large as well.
- tests/enum_from_bytes.rs
- tests/ui-nightly/enum_from_bytes_u16_too_few.rs.disabled

This commit saves a significant amount of space from the published crate
file as reported by `cargo package`:

           Uncompressed   Compressed
Before     3.6MiB         526.8KiB
After      249.9KiB       41.8KiB

This represents a 14x size reduction uncompressed and a 13x size
reduction compressed.

Makes progress on #742
joshlf added a commit that referenced this issue Dec 20, 2023
Exclude the following files from the crate file uploaded to crates.io;
they are excessively large, and cause the resulting crate file to be
large as well.
- tests/enum_from_bytes.rs
- tests/ui-nightly/enum_from_bytes_u16_too_few.rs.disabled

This commit saves a significant amount of space from the published crate
file as reported by `cargo package`:

           Uncompressed   Compressed
Before     3.6MiB         526.8KiB
After      249.9KiB       41.8KiB

This represents a 14x size reduction uncompressed and a 13x size
reduction compressed.

Release 0.7.32.

Closes #742
github-merge-queue bot pushed a commit that referenced this issue Dec 21, 2023
Exclude the following files from the crate file uploaded to crates.io;
they are excessively large, and cause the resulting crate file to be
large as well.
- tests/enum_from_bytes.rs
- tests/ui-nightly/enum_from_bytes_u16_too_few.rs.disabled

This commit saves a significant amount of space from the published crate
file as reported by `cargo package`:

           Uncompressed   Compressed
Before     3.6MiB         526.8KiB
After      249.9KiB       41.8KiB

This represents a 14x size reduction uncompressed and a 13x size
reduction compressed.

Makes progress on #742
@joshlf
Copy link
Member

joshlf commented Dec 21, 2023

Published.

@joshlf joshlf closed this as completed Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-request Documents customer requests.
Projects
None yet
Development

No branches or pull requests

2 participants