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

CI clippy didn't emit warning about too large types that were found when running clippy locally #617

Open
soenkeliebau opened this issue May 10, 2024 · 0 comments

Comments

@soenkeliebau
Copy link
Member

When reviewing #614 I ran clippy locally and got the warnings pasted below, but CI running clippy did not alert on these https://github.com/stackabletech/nifi-operator/actions/runs/9003755958

Probably worth investigating why this differs at some point.

My local rust:

❯ cargo --version
cargo 1.77.2 (e52e36006 2024-03-26)

Version stated in ci: RUST_TOOLCHAIN_VERSION: "1.77.2"

Warnings:

warning: the `Err`-variant returned from this function is very large
   --> rust/operator-binary/src/controller.rs:638:6
    |
186 |       ProductConfigLoadFailed { source: config::Error },
    |       ------------------------------------------------- the largest variant contains at least 128 bytes
...
210 |       BoostrapConfig { source: crate::config::Error },
    |       ----------------------------------------------- the variant `BoostrapConfig` contains at least 128 bytes
...
213 | /     BuildProductConfig {
214 | |         source: crate::config::Error,
215 | |         rolegroup: RoleGroupRef<NifiCluster>,
216 | |     },
    | |_____- the variant `BuildProductConfig` contains at least 128 bytes
...
638 |   ) -> Result<Service> {
    |        ^^^^^^^^^^^^^^^
    |
    = help: try reducing the size of `controller::Error`, for example by boxing large elements or replacing it with `Box<controller::Error>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
    = note: `#[warn(clippy::result_large_err)]` on by default

warning: the `Err`-variant returned from this function is very large
   --> rust/operator-binary/src/controller.rs:792:6
    |
186 |       ProductConfigLoadFailed { source: config::Error },
    |       ------------------------------------------------- the largest variant contains at least 128 bytes
...
210 |       BoostrapConfig { source: crate::config::Error },
    |       ----------------------------------------------- the variant `BoostrapConfig` contains at least 128 bytes
...
213 | /     BuildProductConfig {
214 | |         source: crate::config::Error,
215 | |         rolegroup: RoleGroupRef<NifiCluster>,
216 | |     },
    | |_____- the variant `BuildProductConfig` contains at least 128 bytes
...
792 |   ) -> Result<Service> {
    |        ^^^^^^^^^^^^^^^
    |
    = help: try reducing the size of `controller::Error`, for example by boxing large elements or replacing it with `Box<controller::Error>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
    --> rust/operator-binary/src/controller.rs:1323:50
     |
186  |       ProductConfigLoadFailed { source: config::Error },
     |       ------------------------------------------------- the largest variant contains at least 128 bytes
...
210  |       BoostrapConfig { source: crate::config::Error },
     |       ----------------------------------------------- the variant `BoostrapConfig` contains at least 128 bytes
...
213  | /     BuildProductConfig {
214  | |         source: crate::config::Error,
215  | |         rolegroup: RoleGroupRef<NifiCluster>,
216  | |     },
     | |_____- the variant `BuildProductConfig` contains at least 128 bytes
...
1323 |   fn external_node_port(nifi_service: &Service) -> Result<i32> {
     |                                                    ^^^^^^^^^^^
     |
     = help: try reducing the size of `controller::Error`, for example by boxing large elements or replacing it with `Box<controller::Error>`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: `stackable-nifi-operator` (bin "stackable-nifi-operator") generated 3 warnings
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

No branches or pull requests

1 participant