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

Incorrect warning about README outside package #12127

Closed
djc opened this issue May 11, 2023 · 3 comments · Fixed by #12135
Closed

Incorrect warning about README outside package #12127

djc opened this issue May 11, 2023 · 3 comments · Fixed by #12135
Labels
C-bug Category: bug E-easy Experience: Easy S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@djc
Copy link
Contributor

djc commented May 11, 2023

Problem

When publishing quinn 0.10.0 from quinn-rs/quinn@a66ee19, I get the following warning:

djc-2021 main quinn $ cargo publish # here the current working directory is the inner quinn dir for the crate, not the repo root
    Updating crates.io index
warning: readme `../README.md` appears to be a path outside of the package,
but there is already a file named `README.md` in the root of the package.
The archived crate will contain the copy in the root of the package. Update the
readme to point to the path relative to the root of the package to remove this warning.

This is confusing because "there is already a file named README.md in the root of the package" doesn't match my understanding. The repository contains a /README.md which is at the root of the workspace, but there's no /quinn/README.md in the package.

The archived crate will contain the copy in the root of the package.

This also doesn't appear to be true -- the repo-root/workspace-root ../README.md appears on crates.io just fine.

Update the readme to point to the path relative to the root of the package to remove this warning.

This is what we already have?

Version

djc-2021 main quinn $ cargo version --verbose
cargo 1.68.0 (115f34552 2023-02-26)
release: 1.68.0
commit-hash: 115f34552518a2f9b96d740192addbac1271e7e6
commit-date: 2023-02-26
host: aarch64-apple-darwin
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.87.0 (sys:0.4.59+curl-7.86.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
os: Mac OS 13.3.1 [64-bit]
@djc djc added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels May 11, 2023
@ehuss
Copy link
Contributor

ehuss commented May 11, 2023

Looks like this is caused by having another README.md file located in examples/README.md. There is a flaw in how Cargo checks for a conflict here. That should not use file_name().

@ehuss ehuss added E-easy Experience: Easy S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review and removed S-triage Status: This issue is waiting on initial triage. labels May 11, 2023
@eval-exec
Copy link
Contributor

eval-exec commented May 14, 2023

Hello, @ehuss @djc . I linked a #12135 to solve this issue, please review the fix and unit tests. 💟

Do you think I need to add additional unit tests?

@djc
Copy link
Contributor Author

djc commented May 14, 2023

@eval-exec thanks for looking at this! I don't have strong opinions on your work, but very happy that this is quickly getting fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug E-easy Experience: Easy S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants