Skip to content

Conversation

b00f
Copy link
Contributor

@b00f b00f commented Jun 9, 2025

This PR fixes the clippy issues (nightly version)

Copy link

codecov bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 8.39161% with 131 lines in your changes missing coverage. Please review.

Project coverage is 50.73%. Comparing base (ab342b3) to head (ee004a9).
Report is 165 commits behind head on master.

Files with missing lines Patch % Lines
capnp/src/schema_capnp.rs 0.00% 71 Missing ⚠️
capnp-rpc/src/rpc_capnp.rs 0.00% 41 Missing ⚠️
capnp-rpc/src/rpc_twoparty_capnp.rs 0.00% 13 Missing ⚠️
capnpc/src/codegen.rs 53.84% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #567      +/-   ##
==========================================
- Coverage   51.64%   50.73%   -0.92%     
==========================================
  Files          69       70       +1     
  Lines       33735    32239    -1496     
==========================================
- Hits        17422    16355    -1067     
+ Misses      16313    15884     -429     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

with:
toolchain: nightly-2025-05-13
Copy link
Member

Choose a reason for hiding this comment

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

In #458 (comment) we decided that it was preferable for the nightly to be pinned, so that CI does not spontaneously break.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is OK, don't be so obsessed. This helps at least catch some up-to-date linting errors

@@ -752,14 +752,14 @@ pub mod node {
11 => <crate::schema_capnp::node::annotation::Owned as crate::introspect::Introspect>::introspect(),
12 => <crate::struct_list::Owned<crate::schema_capnp::node::parameter::Owned> as crate::introspect::Introspect>::introspect(),
13 => <bool as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
_ => panic!("invalid field index {index}"),
Copy link
Member

Choose a reason for hiding this comment

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

Does this change (and the others in the generated _capnp.rs files) mean that regenerate-capnp-schema-code.sh and regenerate-rpc-schema-code.sh no longer suffice for regenerating these files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please check, all have linting issues with nightly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since these files are used to generate Rust files in the target project, we need to mark them as exceptions in our project. This PR resolves that inconvenient issue.
Look here

@dwrensha
Copy link
Member

dwrensha commented Jul 2, 2025

#570 is one way to the generated code to pass Clippy while still working on Rust 2015.

@dwrensha
Copy link
Member

dwrensha commented Jul 2, 2025

Thanks for the PR. I have fixed the warnings in 6e610e8, #570, and 099f350.

@dwrensha dwrensha closed this Jul 2, 2025
@b00f b00f deleted the style/clippy-issues branch July 7, 2025 06:39
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.

2 participants