CI clippy didn't emit warning about too large types that were found when running clippy locally
まだ誰も着手していません。
評価
調査の方向性
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
- 平均マージ
- 11時間 26分
- マージ済み PR(30日)
- 10
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stackabletech/nifi-operator のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
stackabletech/nifi-operator#956 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
stackabletech/nifi-operator#879 ·
-
customer-request type/bug
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
stackabletech/nifi-operator#842 · コメント 1 件 ·
-
size/M type/security
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
stackabletech/nifi-operator#811 · コメント 1 件 ·
-
size/L
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
stackabletech/nifi-operator#810 · コメント 1 件 ·
stackabletech/nifi-operator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TheLarkInn/aipm#2413 ·
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
todo:ticket
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
taikoxyz/taiko-mono#22168 · コメント 1 件 ·