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

fix: cargo publish errors with reference to docs/ folder #331

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

dj8yfo
Copy link
Collaborator

@dj8yfo dj8yfo commented Jan 13, 2025

with how a published crate source code is layed out, it probably cannot reference resources at workspace level https://docs.rs/crate/borsh/1.5.3/source/ .

a similar error to release-plz error in run https://github.com/near/borsh-rs/actions/runs/12746835799/job/35523991694,
is encountered when running cargo publish --dry-run on this pr's base branch:

: cargo publish --dry-run
    Updating crates.io index
   Packaging borsh v1.5.4 (/home/user/near/borsh-rs/borsh)
    Updating crates.io index
    Packaged 84 files, 321.8KiB (60.8KiB compressed)
   Verifying borsh v1.5.4 (/home/user/near/borsh-rs/borsh)
   Compiling cfg_aliases v0.2.1
   Compiling borsh v1.5.4 (/home/user/near/borsh-rs/target/packag
e/borsh-1.5.4)
error: couldn't read `src/../../docs/rustdoc_include/borsh_crate_top_level.md`: No such file or dir
ectory (os error 2)
 --> src/lib.rs:2:10
  |
2 | #![doc = include_str!("../../docs/rustdoc_include/borsh_crate_top_level.md")]
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-ba
cktrace for more info)
help: there is a file with the same name in a different directory
  |
2 | #![doc = include_str!("../../../../docs/rustdoc_include/borsh_crate_top_level.md")]
  |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: could not compile `borsh` (lib) due to 1 previous error
error: failed to verify package tarball

the error goes away in target branch of this pr, so hopefully this will allow to release 1.5.4 borsh

@dj8yfo dj8yfo marked this pull request as ready for review January 13, 2025 14:02
@dj8yfo
Copy link
Collaborator Author

dj8yfo commented Jan 13, 2025

@race-of-sloths include

@race-of-sloths
Copy link

race-of-sloths commented Jan 13, 2025

@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Great job! Usain Bolt jealous of your results!

Shows inviting banner with latest news.

Shows profile picture for the author of the PR

Current status: executed
Reviewer Score
@race-of-sloths 1

Your contribution is much appreciated with a final score of 1!
You have received 12 (10 base + 15% lifetime bonus) Sloth points for this contribution

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths and receive a reward
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@dj8yfo dj8yfo merged commit fe78005 into near:master Jan 13, 2025
7 checks passed
@race-of-sloths
Copy link

🥁 Score it!

@akorchyn, please score the PR with @race-of-sloths score [1/2/3/5/8/13]. The contributor deserves it.
If no scoring is provided within 24 hours, this PR will be scored as 1 🦥

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.

3 participants