C# setup loses evaluated or namespaced NoWarn suppressions
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- build-system, cli
調査の方向性
Start in lean/components/docker/lean_runner.py at set_up_csharp_options and see how it collects NoWarn and merges it with the CLI's own suppressions. Build the three repro projects from the issue (conditional Debug/Release groups, an ExtraNoWarn property reference, and a namespaced Project element) and compare dotnet build -c Release against the command the CLI generates for each. Done means the generated command keeps the Release suppression, resolves property references, matches namespaced elements, and still includes the CLI's required codes.
索引モデルが issue の本文から書いたものです。
説明
Problem
LeanRunner.set_up_csharp_options in lean/components/docker/lean_runner.py reads the first NoWarn XML element without evaluating MSBuild conditions or property references, then exports the resulting warning codes as a global property. Valid project suppressions can therefore disappear and make a warnings-as-errors build fail.
Reproduction
Use a C# SDK project with these properties:
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn Condition="'$(Configuration)' == 'Debug'">CS0618</NoWarn>
<NoWarn Condition="'$(Configuration)' == 'Release'">CS0168</NoWarn>
</PropertyGroup>
Include a method containing an unused local:
public void Example() { int unused; }
A normal dotnet build -c Release succeeds. The Release build command generated by set_up_csharp_options instead passes NoWarn=MSB3277%3BCS0618, overriding the Release suppression and failing with CS0168.
Two other forms reproduce the same loss of suppressions:
<ExtraNoWarn>CS0168</ExtraNoWarn><NoWarn>$(ExtraNoWarn);CS0618</NoWarn>: the generated property contains the literal tokenExtraNoWarnrather thanCS0168.- A project with
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"and<NoWarn>CS0168</NoWarn>: the unqualified element lookup misses the suppression.
Verified with .NET SDK 10.0.101: ordinary SDK builds succeed for all three cases, while commands generated by both master and the property-escaping change fail with CS0168. This is pre-existing and independent of property escaping.
Required result
Retain the project's effective warning suppressions for the selected build configuration, including evaluated property references and supported XML namespaces, while retaining the CLI's required suppressions. A literal, unconditional NoWarn in a non-namespaced project is a workaround for these cases.
- 主要言語
- Python
- スター
- 335
- フォーク
- 172
- 平均マージ
- 6時間 54分
- マージ済み PR(30日)
- 37
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QuantConnect/lean-cli のほかの issue
-
priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
QuantConnect/lean-cli#792 ·
メンテナーはふだん 1 日以内に返信
-
priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
QuantConnect/lean-cli#786 ·
メンテナーはふだん 1 日以内に返信
-
priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
QuantConnect/lean-cli#785 ·
メンテナーはふだん 1 日以内に返信
-
A partially written live command result aborts polling with JSONDecodeError対応中かも @pcbeingused333 が 3 日前に担当しました。 オープンpriority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
QuantConnect/lean-cli#784 ·
メンテナーはふだん 1 日以内に返信
-
Container lookup failures during result polling are masked by UnboundLocalError対応中かも @pcbeingused333 が 5 日前に担当しました。 オープンpriority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
QuantConnect/lean-cli#783 ·
メンテナーはふだん 1 日以内に返信
QuantConnect/lean-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pimutils/vdirsyncer#1242 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
open-webui/open-webui#35360 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
Suggest link: Destiny Verify (MIT zero-dependency pre-commit security, citation & link hygiene CLI)オープン
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信