-
Notifications
You must be signed in to change notification settings - Fork 29
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
Exclude tests and testdata from published crate #57
Conversation
Reduces size of crate from 8975KB to 17KB crates.io limits crates to 10MB max
Sigh... Hmm this was actually added in 0.7.0 to solve #47 and #54. I do think this is more appropriate (hence original implementation), and Linux distro packaging should use GitHub release archive perhaps...? But frankly I am not familiar with those processes. @remilauzier @janbaudisch |
On fedora we use a python script that take the source from crates.io and create a .spec file for fedora to ease management. If the files are no longer in the crates source, the policy of fedora is to deactivate the tests to not have to import all the file manually. |
An alternate option might be to trim the |
I can see that the crate size right now is definitely not ideal. I didn't intent to force outside guidelines onto the project (I also intend to package this crate for Fedora). It just felt right for a crate to be the complete package with everything needed, be it running it or testing it. |
For at least some formats it should be possible. For example, the MP4 matcher currently checks 12 bytes but the test file is about 2MB. I'd guess most test files can be cut to 4KB or less without issues (but I am by no means an expert on file signatures) edit: Truncating all test files >4KB to 4KB, except DOC/PPT/XLS, keeps all tests passing and reduces size of .crate to 154KB |
@janbaudisch |
@AlyoshaVasilieva |
@remilauzier Oh, I didn't realize that you already packaged it. Thanks for the heads-up. |
Reduces size of crate from 8975KB to 17KB
crates.io limits crates to 10MB max
https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields