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

The tool fails when generating rustdoc of a yanked release from registry #275

Open
tonowak opened this issue Jan 9, 2023 · 4 comments
Open
Labels
C-bug Category: doesn't meet expectations

Comments

@tonowak
Copy link
Collaborator

tonowak commented Jan 9, 2023

I believe that the tool will fail when it'll try to generate rustdoc of a yanked release from registry. Basically cargo (correctly) refuses to use a yanked release of a crate, unless there is a Cargo.lock with it (but that requires manually creating this file, which probably is too much effort compared to the reward).

The #255 makes it so that yanked releases aren't chosen, unless there are no "normal" releases. We think that when there are only non-normal releases, the tool will possibly try to pick a yanked one, which will result in an error during rustdoc generation.

That's why the tests made in the mentioned PR don't detect this issue -- they don't try to run rustdoc on the chosen version.

Proposed solution: change the code so that when there are only pre-releases and yanked releases, pick the pre-release, and when there aren't any, report that there are no matching releases (or report that there are only yanked releases, which we don't support). Then, consider adding some integration tests to check that the tool is able to generate the rustdoc for the edge-cases.

@obi1kenobi obi1kenobi added the C-enhancement Category: raise the bar on expectations label Jan 9, 2023
@tonowak tonowak added C-bug Category: doesn't meet expectations and removed C-enhancement Category: raise the bar on expectations labels Jan 9, 2023
@obi1kenobi
Copy link
Owner

Related issue asking for a way to allow cargo to generate a lockfile for a yanked release: rust-lang/cargo#4225

@obi1kenobi
Copy link
Owner

This is probably a low-priority issue right now. Most crates won't hit this, and it's possible that cargo might end up allowing lockfiles for yanked crates to be generated in the meantime. Let's focus our efforts on more valuable issues right now.

@epage
Copy link
Collaborator

epage commented Jan 22, 2024

FYI rust-lang/cargo#13333 has been posted

@obi1kenobi
Copy link
Owner

Thanks, keeping an eye on it! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: doesn't meet expectations
Projects
None yet
Development

No branches or pull requests

4 participants