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

Fix build warnings treated as errors #321

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

jaseemabid
Copy link
Contributor

These warnings prevent builds on latest master with latest stable rustc 1.78.0 (9b00956e5 2024-04-29)

Full error:

   Compiling sonic-server v1.4.8 (/Users/j/src/sonic)
error: unnecessary qualification
   --> src/store/fst.rs:690:36
    |
690 | ...                   if std::fs::rename(&bucket_tmp_path, &bucket_final_path).is_ok() {
    |                          ^^^^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> src/main.rs:8:44
    |
8   | #![deny(unstable_features, unused_imports, unused_qualifications, clippy::all)]
    |                                            ^^^^^^^^^^^^^^^^^^^^^
help: remove the unnecessary path segments
    |
690 -                                 if std::fs::rename(&bucket_tmp_path, &bucket_final_path).is_ok() {
690 +                                 if fs::rename(&bucket_tmp_path, &bucket_final_path).is_ok() {
    |

warning: trait `StoreGenericKey` is never used
  --> src/store/generic.rs:14:11
   |
14 | pub trait StoreGenericKey {}
   |           ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `sonic-server` (bin "sonic") generated 1 warning
error: could not compile `sonic-server` (bin "sonic") due to 1 previous error; 1 warning emitted

These warnings prevent builds on latest master with latest stable rustc
1.78.0 (9b00956e5 2024-04-29)

Full error:

   Compiling sonic-server v1.4.8 (/Users/j/src/sonic)
error: unnecessary qualification
   --> src/store/fst.rs:690:36
    |
690 | ...                   if std::fs::rename(&bucket_tmp_path, &bucket_final_path).is_ok() {
    |                          ^^^^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> src/main.rs:8:44
    |
8   | #![deny(unstable_features, unused_imports, unused_qualifications, clippy::all)]
    |                                            ^^^^^^^^^^^^^^^^^^^^^
help: remove the unnecessary path segments
    |
690 -                                 if std::fs::rename(&bucket_tmp_path, &bucket_final_path).is_ok() {
690 +                                 if fs::rename(&bucket_tmp_path, &bucket_final_path).is_ok() {
    |

warning: trait `StoreGenericKey` is never used
  --> src/store/generic.rs:14:11
   |
14 | pub trait StoreGenericKey {}
   |           ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `sonic-server` (bin "sonic") generated 1 warning
error: could not compile `sonic-server` (bin "sonic") due to 1 previous error; 1 warning emitted
@valeriansaliou valeriansaliou merged commit 0d82700 into valeriansaliou:master Jun 13, 2024
@jaseemabid jaseemabid deleted the jabid/build-errors branch June 14, 2024 13:37
@chenrui333
Copy link

@valeriansaliou any chance to cut a new release for this PR patch, seeing the failed build upgrading rust to 1.79.0 on the homebrew side. Thanks!

@valeriansaliou
Copy link
Owner

@chenrui333 sure! Added to my TODO for today.

@valeriansaliou
Copy link
Owner

@chenrui333 I just released v1.4.9

@chenrui333
Copy link

Thanks @valeriansaliou!

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.

3 participants