Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#617 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust
Área
ci-cd

Línea de trabajo

Comienza con la ejecución de CI enlazada en el issue y compara su invocación de clippy y su toolchain de Rust 1.77.2 con el comando local que produjo las advertencias. Inspecciona rust/operator-binary/src/controller.rs en las líneas 638, 792 y 1323, centrándote en las advertencias result_large_err notificadas. Se considera terminado cuando se explique la diferencia y CI informe de las mismas advertencias, si corresponde.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Rust
Estrellas
48
Forks
12
Merge medio
22 h 24 min
PR fusionados (30 d)
10

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de stackabletech/nifi-operator

Todos los issues de stackabletech/nifi-operator

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.