-
Notifications
You must be signed in to change notification settings - Fork 212
The source view is not available when crate failed to build. #607
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
Comments
I think this should be as simple as moving this block outside of the docs.rs/src/docbuilder/rustwide_builder.rs Line 331 in 5654923
|
Testing instructions: Once you've gotten set up (either with docker-compose or natively), run a build for a crate that you know will fail to build. You can choose any crate off of https://docs.rs/releases/recent-failures.
You can then go to http://localhost:3000, click on the crate name, and click 'Source' in the top-left. It should show a list of all the files in the crate, including a I expect this to also add sources for binaries when fixed, if you could test that as well that would be great, for example with |
The same problem with binary crates. They all lost the source code too. Examples: cargo-bloat, ripgrep. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This would be fixed by #826. |
This comment has been minimized.
This comment has been minimized.
Thank you! |
It should be possible to view the source code of a crate even if it failed to compile for some reason. I think some time ago this was working correctly, but I'm not sure.
It seems docs.rs is the only website on the internet which allows you to read the source code of a crate, because github link is often missing and even if it's not it contains a different source code than an actual crate version. It is very unfortunate that you are not able to see the source just because it failed to compile on docs.rs platform.
Example links:
https://docs.rs/crate/libui-sys/0.1.9/source/
https://docs.rs/crate/stm32ral/0.3.1/source/
The text was updated successfully, but these errors were encountered: