-
Notifications
You must be signed in to change notification settings - Fork 475
Rustdoc rules now share a code path with Rustc rules for more consistency #1015
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
Conversation
93af95c
to
142cc88
Compare
58f8d81
to
5b8cfdd
Compare
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.
Looks like a nice clean-up, thanks!
I was unfortunately not able to get a solution for #980 in this PR (which is a hard problem to solve, for me 😅). |
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.
Thanks!
…ency (bazelbuild#1015) * Rustdoc rules now share a code path with Rustc rules for more consistency * Regenerate documentation * Addressed PR feedback * Addressed PR feedback
rust_doc
The first issue I faced with
rust_doc
was #947 but quickly found there were many more variables being defined forRustc
actions but notRustdoc
, leading to my inability to use the rule. The changes here introduce a macro@rules_rust//rust/private:rustdoc.bzl%rustdoc_compile_action
designed to create a near identical action@rules_rust//rust/private:rustc.bzl&rustc_compile_action
for improved consistency in generating docs to solve for the issues I ran into.rust_doc_test
Additionally, the
rust_doc_test
was similarly unusable due to the fact thatrustdoc --test
builds and tests binaries as a test execution but the test environment was quite different from the build environments ofRustdoc
andRustc
actions. This PR shares the samerustdoc_compile_action
functionality to determine action args, environment vars, and inputs and write an executable to rebuild an execution environment similar to the build actions.Notably, this fixes
rust_doc_test
in RBE and Windows environments.Related Issues
closes #887
closes #947
closes #804
closes #1016