CI clippy didn't emit warning about too large types that were found when running clippy locally
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 issue 中链接的 CI 运行开始,将其 clippy 调用和 Rust 1.77.2 toolchain 与产生警告的本地命令进行比较。检查 rust/operator-binary/src/controller.rs 的第 638、792 和 1323 行,重点关注报告的 result_large_err 警告。完成的标准是解释清楚差异,并在适当的情况下让 CI 报告相同的警告。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Rust
- 星标
- 48
- 派生
- 12
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stackabletech/nifi-operator 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
stackabletech/nifi-operator#956 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
stackabletech/nifi-operator#879 ·
维护者通常 1 天内回复
-
customer-request type/bug
难度 3/5 1-2 天 新手友好度 42/100
stackabletech/nifi-operator#842 · 1 条评论 ·
维护者通常 1 天内回复
-
size/M type/security
难度 5/5 一周以上 新手友好度 25/100
stackabletech/nifi-operator#811 · 1 条评论 ·
维护者通常 1 天内回复
-
size/L
难度 5/5 一周以上 新手友好度 20/100
stackabletech/nifi-operator#810 · 1 条评论 ·
维护者通常 1 天内回复
查看 stackabletech/nifi-operator 的全部 Issue
相似的 Issue
-
proxy: SQL-over-HTTP turns empty arrays into [""] or [false], or HTTP 500 for int and float arrays未关闭
难度 2/5 1-3 小时 新手友好度 83/100
neondatabase/neon#12965 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
goauthentik/authentik#26867 ·
维护者通常 1 天内回复
-
api bug macos maintainer-needed p2 triaged
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
难度 1/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 76/100
eclipse-zenoh/zenoh#2842 · 2 条评论 ·
维护者通常 1 天内回复