Skip to content

Conversation

@palfrey
Copy link

@palfrey palfrey commented Nov 23, 2025

Fixes #3493

@google-cla
Copy link

google-cla bot commented Nov 23, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@palfrey
Copy link
Author

palfrey commented Nov 23, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Fixed

@palfrey palfrey force-pushed the fix-runfiles-qualifications branch from 52181a5 to 2495248 Compare November 30, 2025 16:05
@palfrey palfrey requested a review from dzbarsky November 30, 2025 16:06
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just one question.

@palfrey
Copy link
Author

palfrey commented Nov 30, 2025

Thanks! Just one question.

What's the question?

@palfrey palfrey requested a review from UebelAndre December 8, 2025 20:54
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the question?

Haha super strange, I don't know how I failed to post it. Added it now!

name = "runfiles",
srcs = ["runfiles.rs"],
edition = "2018",
rustc_flags = ["-Dunused-qualifications"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this flag? I'm not familiar with -D flags for rustc and would love to know if there's more that can be added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a lint flag, D == Deny

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could also #deny(all) in the code, at least for this runfiles lib that will be imported by user code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://rust-unofficial.github.io/patterns/anti_patterns/deny-warnings.html notes the sorts of issues there. I've redone things with #![deny] though

@palfrey palfrey requested a review from UebelAndre December 8, 2025 23:13
Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we want to sign up to maintain arbitrary style choices for people who depend on rules_rust... How does this code end up triggering these problems for you? As far as I'm aware, both Bazel and Cargo apply different lint expectations to your own code vs your dependencies...

@dzbarsky
Copy link
Contributor

I'm not sure we want to sign up to maintain arbitrary style choices for people who depend on rules_rust... How does this code end up triggering these problems for you? As far as I'm aware, both Bazel and Cargo apply different lint expectations to your own code vs your dependencies...

rules_rust emits --cap-lints=allow for all crate_universe deps (third-party) but the runfiles lib is not one of those. From bazel's POV it's a "first-party" target even though it comes from an external repo. And this repo never sets the flag on the rust_library, so tweaking that would be another way to fix this.

Whichever way we move forward with, I would have hoped that a PR doing a bit of warning cleanup/hygiene would not become so contentious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustfmt incompatible with unused-qualifications

4 participants