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

Exclude more files from the published crate #591

Merged
merged 4 commits into from
Feb 17, 2024

Conversation

musicinmybrain
Copy link
Contributor

There was an incorrect glob bench/* that was doing nothing, since the benchmarks are in benches/; when I corrected it to benches/*, cargo publish --dry-run failed:

error: failed to verify package tarball

Caused by:
  failed to parse manifest at `/home/ben/src/forks/oxipng/target/package/oxipng-9.0.0/Cargo.toml`

Caused by:
  can't find `zopfli` bench at `benches/zopfli.rs` or `benches/zopfli/main.rs`. Please specify bench.path if you want to use a non-default path.

…so I stopped trying to exclude the benchmarks from published crates at all.


Then, I added Dockerfile, index.html, and scripts/ to the list of paths to exclude from published crates.

Finally, I added some unnecessary “dotfiles” to the list of paths to exclude from published crates.


Some of this was suggested in a package review for Fedora Linux.

After the PR:

$ cargo package --list
.cargo/config.toml
.cargo_vcs_info.json
CHANGELOG.md
Cargo.lock
Cargo.toml
Cargo.toml.orig
LICENSE
MANUAL.txt
README.md
benches/deflate.rs
[…]
benches/zopfli.rs
src/atomicmin.rs
[…]
src/sanity_checks.rs
$ cargo publish --dry-run
[…]
   Compiling oxipng v9.0.0 (/home/ben/src/forks/oxipng/target/package/oxipng-9.0.0)
    Finished dev [optimized + debuginfo] target(s) in 15.76s
    Packaged 37 files, 255.4KiB (61.6KiB compressed)
   Uploading oxipng v9.0.0 (/home/ben/src/forks/oxipng)
warning: aborting upload due to dry run

@andrews05
Copy link
Collaborator

Thanks for this, it sounds sensible.
Just one comment: The index.html file seems to be for a very old set of docs that no longer exists. We should just delete this file.

@musicinmybrain
Copy link
Contributor Author

Thanks for this, it sounds sensible. Just one comment: The index.html file seems to be for a very old set of docs that no longer exists. We should just delete this file.

Thanks for the suggestion! I removed index.html from the repo and from the excludes.

Copy link
Collaborator

@andrews05 andrews05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Can merge once @AlexTMjugador also approves.

Copy link
Collaborator

@AlexTMjugador AlexTMjugador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR, it looks good to me too! Let's merge it then 🚀

@AlexTMjugador AlexTMjugador merged commit 4cb8296 into shssoichiro:master Feb 17, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants