-
Notifications
You must be signed in to change notification settings - Fork 406
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
Update formatting of --extern
flags passed to rustc
#892
Conversation
e2edabe
to
8385a9f
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.
I think I'd expect a test that checks that we pass all transitive dependencies as -L
and as --extern
flags. If we didn't do that, your test would fail even if it didn't use pub use
. In that sense mentioning re-exporting is a distraction, a red-herring, that is only slightly related to the test at hand. The fact that there is re-exporting happening is only known to rustc internally, and rules_rust don't know about it (and they don't need to know about it because of how rustc compilation model works).
What do you think about renaming the test to something like transitive deps flags test?
What do you think
I only care that there's a test that checks this specific functionality since it's the behavior I care about. If the unittest code should actually be checking different flags then that's fine, but I'd run into an issue where it was believed this functionality was not supported so I'm hoping for something that very clearly states it is. Does that change the ask here? |
--export
flags passed to rustc
I don't know the details of the discussion you were in, but can it be that the person unaware of this already working was rather new to Rust/Bazel/rules_rust? For those people adding an unit test is not the best way to show how Rustc (not rules_rust, rustc) handles reexports. Maybe we need a text file documenting things like this in a approachable way. For everybody else, the unit test with reexports distracts from the actual thing the test is testing. |
--export
flags passed to rustc
--extern
flags passed to rustc
In an effort to make the the rules more testable, the
--extern
flags, which were previously:have been updated to:
Additionally, a test has been added to test regressions in accessibility to symbols in dependencies and transitive dependencies of a target. re-exports (ie
pub use ...
) for example.