-
Notifications
You must be signed in to change notification settings - Fork 265
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
ci(rust): check MSRV in CI and fix clippy #3054
Conversation
ACTION NEEDED The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. For details on the error please inspect the "PR Title Check" action. |
I'm struggling to understand what's going on with clippy. I get errors when I run it locally, even with the same version of clippy: ❯ cargo clippy --version
clippy 0.1.81 (eeb90cda 2024-09-04)
❯ cargo clippy --features cli,dynamodb,tensorflow,dynamodb_tests --tests --benches -- -D warnings
Checking lance-arrow v0.19.2 (/Users/willjones/Documents/lance/rust/lance-arrow)
Compiling lance-encoding v0.19.2 (/Users/willjones/Documents/lance/rust/lance-encoding)
...
Checking lance-io v0.19.2 (/Users/willjones/Documents/lance/rust/lance-io)
Checking lance-datafusion v0.19.2 (/Users/willjones/Documents/lance/rust/lance-datafusion)
error: this could be rewritten as `let...else`
--> rust/lance-index/src/scalar/inverted/builder.rs:455:13
|
455 | / let token = if let Some(token) = token {
456 | | token
457 | | } else {
458 | | continue;
459 | | };
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
= note: `-D clippy::manual-let-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_let_else)]`
help: consider writing
|
455 ~ let Some(token) = token else {
456 + continue;
457 + };
|
error: pub(crate) struct inside private module
--> rust/lance-index/src/scalar/inverted/builder.rs:564:1
|
564 | pub(crate) struct PostingReader {
| ----------^^^^^^^^^^^^^^^^^^^^^
| |
| help: consider using: `pub`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
= note: `-D clippy::redundant-pub-crate` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_pub_crate)]`
error: pub(crate) function inside private module
--> rust/lance-index/src/scalar/inverted/builder.rs:708:1
|
708 | pub(crate) fn inverted_list_schema(with_position: bool) -> SchemaRef {
| ----------^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: consider using: `pub`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
error: unnecessary structure name repetition
--> rust/lance-index/src/scalar/inverted/tokenizer.rs:49:9
|
49 | TokenizerConfig {
| ^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
= note: `-D clippy::use-self` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::use_self)]`
error: could not compile `lance-index` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `lance-index` (lib test) due to 4 previous errors |
66c2069
to
3475720
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.
For whatever reason, these flags weren't being picked up in CI. So I've moved them to Cargo.toml
, which seems to work.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3054 +/- ##
==========================================
- Coverage 77.61% 77.54% -0.08%
==========================================
Files 240 240
Lines 78683 78573 -110
Branches 78683 78573 -110
==========================================
- Hits 61073 60931 -142
- Misses 14495 14504 +9
- Partials 3115 3138 +23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 for digging in and figuring this out. It was annoying me as well :)
No description provided.