-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
[Merged by Bors] - add README for crates.io publish #1952
[Merged by Bors] - add README for crates.io publish #1952
Conversation
The default behaviour of `cargo package` if neither `exclude` or `include` is specified is to include all files from the package root, excluding - dotfiles - .gitignore'd files - subpackages (any subdirectory with a `Cargo.toml` file) - the `/target` directory You can read more [here](https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good!! And thanks for all the clarifications :)
Codecov Report
@@ Coverage Diff @@
## main #1952 +/- ##
=======================================
Coverage 45.87% 45.87%
=======================================
Files 206 206
Lines 17102 17102
=======================================
Hits 7846 7846
Misses 9256 9256 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
bors r+ |
bors +r |
Did you mean "r+"? |
bors r+ |
This Pull Request closes #1948. It changes the following: - set `readme` in `boa_engine` so `README.md` will be published to crates.io - remove unnecessary `exclude` field from `Cargo.toml` in all apps I was unsure whether using a path outside of the workspace root was allowed for `readme` since it [doesn't get included in the release tarball](rust-lang/cargo#5911), but this exact path is used by [juniper](https://github.com/graphql-rust/juniper/blob/master/juniper/Cargo.toml#L13) and [seems to work there](https://crates.io/crates/juniper). I believe `cargo publish` does a bit more than just uploading the tarball, including pulling the `readme` from any arbitrary path. The default behaviour of `cargo package`/`cargo publish` if neither `exclude` or `include` is specified is to include all files from the package root, excluding - dotfiles - .gitignore'd files - subpackages (any subdirectory with a `Cargo.toml` file) - the `/target` directory There's no need to explicitly exclude files from the parent directory since they're already excluded by default. This can be verified by running `cargo package --list` inside any workspace app: ```plain $ cd boa_wasm $ cargo package --list .gitignore Cargo.toml Cargo.toml.orig src/lib.rs ``` You can read more [here](https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields).
Pull request successfully merged into main. Build succeeded: |
This Pull Request closes #1948. It changes the following: - set `readme` in `boa_engine` so `README.md` will be published to crates.io - remove unnecessary `exclude` field from `Cargo.toml` in all apps I was unsure whether using a path outside of the workspace root was allowed for `readme` since it [doesn't get included in the release tarball](rust-lang/cargo#5911), but this exact path is used by [juniper](https://github.com/graphql-rust/juniper/blob/master/juniper/Cargo.toml#L13) and [seems to work there](https://crates.io/crates/juniper). I believe `cargo publish` does a bit more than just uploading the tarball, including pulling the `readme` from any arbitrary path. The default behaviour of `cargo package`/`cargo publish` if neither `exclude` or `include` is specified is to include all files from the package root, excluding - dotfiles - .gitignore'd files - subpackages (any subdirectory with a `Cargo.toml` file) - the `/target` directory There's no need to explicitly exclude files from the parent directory since they're already excluded by default. This can be verified by running `cargo package --list` inside any workspace app: ```plain $ cd boa_wasm $ cargo package --list .gitignore Cargo.toml Cargo.toml.orig src/lib.rs ``` You can read more [here](https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields).
This Pull Request closes #1948.
It changes the following:
readme
inboa_engine
soREADME.md
will be published to crates.ioexclude
field fromCargo.toml
in all appsI was unsure whether using a path outside of the workspace root was allowed for
readme
since it doesn't get included in the release tarball, but this exact path is used by juniper and seems to work there. I believecargo publish
does a bit more than just uploading the tarball, including pulling thereadme
from any arbitrary path.The default behaviour of
cargo package
/cargo publish
if neitherexclude
orinclude
is specified is to include all files from the package root, excludingCargo.toml
file)/target
directoryThere's no need to explicitly exclude files from the parent directory since they're already excluded by default. This can be verified by running
cargo package --list
inside any workspace app:You can read more here.