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

[Merged by Bors] - add README for crates.io publish #1952

Closed

Conversation

superhawk610
Copy link
Contributor

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, but this exact path is used by juniper and seems to work there. 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:

$ cd boa_wasm
$ cargo package --list
.gitignore
Cargo.toml
Cargo.toml.orig
src/lib.rs

You can read more here.

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).
Copy link
Member

@Razican Razican left a 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
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #1952 (eb771b5) into main (aaa07cf) will not change coverage.
The diff coverage is n/a.

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aaa07cf...eb771b5. Read the comment docs.

@Razican Razican added this to the v0.15.0 milestone Mar 17, 2022
@Razican Razican added enhancement New feature or request documentation update documentation labels Mar 17, 2022
Copy link
Member

@RageKnify RageKnify left a comment

Choose a reason for hiding this comment

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

bors r+

@HalidOdat
Copy link
Member

bors r+

@jedel1043
Copy link
Member

bors +r

@bors
Copy link

bors bot commented Mar 17, 2022

Did you mean "r+"?

@jedel1043
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Mar 17, 2022
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).
@bors
Copy link

bors bot commented Mar 17, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title add README for crates.io publish [Merged by Bors] - add README for crates.io publish Mar 17, 2022
@bors bors bot closed this Mar 17, 2022
@superhawk610 superhawk610 deleted the chore/add-readme-on-publish branch March 17, 2022 17:42
Razican pushed a commit that referenced this pull request Jun 8, 2022
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation update documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the README to the crate in crates.io
5 participants