Skip to content
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

ignore prost mod and fix clippy warning #160

Merged
merged 1 commit into from Aug 22, 2022

Conversation

YangKeao
Copy link
Member

Signed-off-by: YangKeao yangkeao@chunibyo.icu

  1. I fix the clippy warning according to the instruction
  2. Allow all clippy warning in the prost mod.

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

looks good to me

@@ -65,6 +65,7 @@ pub use self::report::{Report, ReportBuilder, UnresolvedReport};
#[cfg(feature = "flamegraph")]
pub use inferno::flamegraph;

#[allow(clippy::all)]
Copy link
Member

Choose a reason for hiding this comment

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

Why? What problem it's trying to solve?

Copy link
Member Author

Choose a reason for hiding this comment

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

See https://github.com/tikv/pprof-rs/runs/7899854996?check_suite_focus=true, it ignores the clippy error produced in the codes generated by prost.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it better to be more conservative about suppressing warnings like in tokio-rs/prost#661 (comment)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it better to be more conservative about suppressing warnings like in tokio-rs/prost#661 (comment)?

@sticnarf I don't think so. If more clippy warnings appears in the prost mod, what we can do is still ignoring them. It seems that being more conservative doesn't make it better.

Copy link
Contributor

Choose a reason for hiding this comment

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

The advantage I can think of is when it's a warning about correctness or performance, it's possible to find and report to the prost upstream. Well, of course, we can rely on others using prost to do the same.

I think both are ok.

@YangKeao
Copy link
Member Author

/merge

@YangKeao YangKeao merged commit a623dab into tikv:master Aug 22, 2022
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.

None yet

5 participants