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

Why checking the README path in the upload step? #4861

Closed
matthiasbeyer opened this issue Dec 24, 2017 · 5 comments
Closed

Why checking the README path in the upload step? #4861

matthiasbeyer opened this issue Dec 24, 2017 · 5 comments
Assignees
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-publish

Comments

@matthiasbeyer
Copy link
Contributor

Why does cargo publish check the path to the repository README in the upload step? If the README path is wrong, it won't be noticed by publish --dry-run ... which is bad!

@alexcrichton alexcrichton added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Dec 25, 2017
@matthiasbeyer
Copy link
Contributor Author

Any pointers when this might be solved?

@dwijnand
Copy link
Member

dwijnand commented Dec 2, 2018

Hmm, I don't understand the ticket. I'm not sure, for instance, whether you're requesting a new feature or reporting a bug. Could you please restate it in terms of the reproduction steps, what you expected to happen and what instead happened?

@matthiasbeyer
Copy link
Contributor Author

The checking of the readme path, whether the path is correct, happens just before cargo publish uploads. That is bad because a dry-run does not catch if the readme path in the cargo.toml is wrong.

Checking the path of the readme file should happen much more early in the publishing process.

@dwijnand
Copy link
Member

dwijnand commented Dec 2, 2018

Got it. Thank you!

@dwijnand
Copy link
Member

I'm going to close this as invalid. The readme file is read here:

let readme_content = match *readme {
Some(ref readme) => Some(paths::read(&pkg.root().join(readme))?),
None => None,
};

Which is before the dry-run, well before the publishing uploads:

// Do not upload if performing a dry run
if dry_run {
config.shell().warn("aborting upload due to dry run")?;
return Ok(());
}

@dwijnand dwijnand self-assigned this Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-publish
Projects
None yet
Development

No branches or pull requests

3 participants