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

A crate that exists on crates.io does not exist on docs.rs #2491

Closed
kornelski opened this issue Apr 7, 2024 · 9 comments
Closed

A crate that exists on crates.io does not exist on docs.rs #2491

kornelski opened this issue Apr 7, 2024 · 9 comments

Comments

@kornelski
Copy link

This crate is on crates.io:

https://crates.io/crates/emheap

but docs.rs reports "The requested crate does not exist: no such crate".

https://docs.rs/emheap

This is surprising. The crate isn't yanked. It's in the index. Usually even if crates fail to build docs.rs shows some basic page for it.

@kornelski
Copy link
Author

It may be because the crate has cargo.toml (lowercase).

@Nemo157
Copy link
Member

Nemo157 commented Apr 8, 2024

We do have the failure to build after publish in the queue:

   id   |  name  | version | attempt |         build_time         | priority | registry | last_attempt
--------+--------+---------+---------+----------------------------+----------+----------+--------------
 516293 | emheap | 0.1.0   |       5 | 2022-04-20 04:08:29.528233 |        0 |          |
 516306 | emheap | 0.1.1   |       5 | 2022-04-20 04:45:52.937317 |        0 |          |

I'll requeue it to be built against and see if there's anything interesting in the logs.

@Nemo157
Copy link
Member

Nemo157 commented Apr 8, 2024

Yep, the failure is because it's missing the Cargo.toml:

Failed to build package emheap-0.1.0 from queue
Caused by:
    missing Cargo.toml

I don't think we should do anything about this, the crate is invalid, downloading locally cargo also refuses to do anything with it

> cargo metadata
error: could not find `Cargo.toml` in `/tmp/scratch.rust.2024-04-08T09-58.Yi6HRM/emheap-0.1.1` or any parent directory, but found cargo.toml please try to rename it to Cargo.toml

@Nemo157
Copy link
Member

Nemo157 commented Apr 8, 2024

It not appearing in the database at all because of the failure is another variant of #797, which will be fixed by #2467, so it should appear as a build failure once that's done.

@Nemo157
Copy link
Member

Nemo157 commented Apr 8, 2024

Hmmm, actually #2467 won't fix it since that still relies on reading the Cargo.toml to pull the minimum data required to add the crate into the database.

byfnoel added a commit to byfnoel/emheap that referenced this issue Apr 28, 2024
Previously, this crate was only available on crates.io and not on
docs.rs. With this change, this crate would be available on both.

See [this issue](rust-lang/docs.rs#2491)
on the [https://github.com/rust-lang/docs.rs] repo for reference.
@byfnoel
Copy link

byfnoel commented Apr 29, 2024

Hey @kornelski. I fixed the issue on the provided example with this change.
This issue might be a candidate to close.

@kornelski
Copy link
Author

@byfnoel thanks, but I'll leave it open, because docs.rs needs to decide what to do with this kind of problems in crates in general, not only yours.

@byfnoel
Copy link

byfnoel commented Apr 29, 2024

Ok @kornelski. That's fine!

@syphar
Copy link
Member

syphar commented Jun 15, 2024

@byfnoel thanks, but I'll leave it open, because docs.rs needs to decide what to do with this kind of problems in crates in general, not only yours.

coming back to this issue.

Our current plan with #2467 is that we would finally surface these kind of errors the same way as "normal" build errors. So the crate would appear, the version would too, and only showed as failed with the error above ( "could not find Cargo.toml...")

Also after #2467 we'll be able to run our consistency check, so we would also add past releases / crates where this happened.

@syphar syphar closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2024
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

No branches or pull requests

4 participants