-
Notifications
You must be signed in to change notification settings - Fork 440
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
rustdoc_test: Apply prefix stripping to proc_macro dependencies. #1952
rustdoc_test: Apply prefix stripping to proc_macro dependencies. #1952
Conversation
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! Seems reasonable. I can look at the existing test but what would fail before this change and can that be added as a regression test?
Thanks for the look. I created an stripped down example repo to illustrate the failure: https://github.com/konkers/bazel-rustdoctest-proc-macro-failure |
I noticed in #1782 an additional change is also added: root = proc_macro_dep.crate_info.output.root.path
if not root in roots:
roots.append(root) Perhaps that should be added to this PR. |
I spun up a test that covers this at konkers#1 |
Merged into PR |
667d648
to
4503ed8
Compare
Without stripping the prefix, rustdoc can not find the proc macro shared library.
Adds a test that reproduces the bug mentioned in rules_rust#1952.
b2ba394
to
3e6bb71
Compare
@UebelAndre this is ready for another look |
@UebelAndre this is looking reasonable now, with a regression test in place.
This PR is good as-is, and doesn't require this? |
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.
Thank you!
Without stripping the prefix, rustdoc can not find the proc macro shared library.
It's not entirely clear to me why
//test/unit/rustdoc:lib_with_proc_macro
passes without this. When I runbazel test //test/unit/rustdoc:rustdoc_test_suite --subcommands
I don't see any "action 'Generating Rustdoc test runner for.." lines so perhaps that path is not tested?