-
Notifications
You must be signed in to change notification settings - Fork 198
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
Document proc-macros despite bugs in rustdoc #491
Conversation
Use documentation in /target/doc if /target/$target/doc doesn't exist. Partially addresses rust-lang#422. Note: this does _not_ fix the issue mentioned above, it doesn't link to the right CSS files. See https://cdn.discordapp.com/attachments/541978667522195476/649031211913838592/unknown.png for an example.
Is there an issue on Cargo or rustdoc tracking the problem upstream? I remember we talked about there sometimes being a problem with it not respecting I also see that you don't build any extra targets for proc-macros. This gets around the immediate issue, but i can't shake the feeling that there's going to be a proc-macro somewhere that does something different per-platform. This might work for now, but we should really be reporting this to Cargo so that this can be fixed properly. |
Yes, rust-lang/rust#66796.
Yes.
Probably, and it might make sense come back to this once the upstream issue is fixed, but I think this hits the vast majority of use cases without being terribly hard to change in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work for now as a stopgap solution. I want to ask the Cargo team about this issue, and see if it's intended behavior like it is for build scripts. In the meantime, this should allow proc-macro crates to actually display documentation. I'm not happy about not having anything in the "Platforms" menu, but that can possibly be fixed separately. For now, let's just get this in.
Use documentation in /target/doc if /target/$target/doc doesn't exist.
In that case, also don't pass
--target
to rustdoc.Closes #422.
I also moved
build_target
into a separate function sincebuild_package
was getting kind of big.r? @QuietMisdreavus