[Traversal] Filtering projects solution files without kicking off evaluations
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 48/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- csharp
- 領域
- build-system
調査の方向性
Directory.Solution.targets と Microsoft.Build.Traversal Sdk.targets の実装を確認し、通常の restore の動作と issue 521 で説明されている静的グラフの制限を比較します。評価前にプロジェクトをフィルターするための GetProjectsToSkip override を、現在は通常の restore にのみ適用されることも含めて文書化します。
索引モデルが issue の本文から書いたものです。
説明
The new filter projects in solution files feature in Microsoft.Build.Traversal is phenomenal. I noticed that by default, it still kicks off evaluations for the projects in order to then invoke the custom ShouldSkipProject target. In my situation, I don't want to even trigger evaluations (and with also not trigger msbuild sdk resolver events). I was able to make that work with the following code:
Directory.Solution.targets
<Project>
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.targets" />
<!-- Overwrite target from Traversal Sdk.targets. -->
<Target Name="GetProjectsToSkip">
<ItemGroup>
<ProjectToSkip Include="@(ProjectReference)"
Message=""
Condition="$([System.String]::new('%(ProjectReference.Identity)').EndsWith('.Tests.csproj'))"
OriginalItemSpec="%(Identity)" />
</ItemGroup>
</Target>
</Project>
Unfortunately this only works with normal restore and not static graph based restore: https://github.com/microsoft/MSBuildSdks/issues/521
Should we document this option? From my perspective, while this is a static mechanism to filter out projects, it's the only correct way as it doesn't even trigger evaluations of filtered out projects.
- 主要言語
- C#
- スター
- 513
- フォーク
- 94
- 平均マージ
- 49分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/MSBuildSdks のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/MSBuildSdks#653 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
microsoft/MSBuildSdks#652 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoft/MSBuildSdks#646 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
microsoft/MSBuildSdks#644 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
microsoft/MSBuildSdks#642 ·
microsoft/MSBuildSdks の issue をすべて見る
似ている issue
-
area-multitenancy area-security p1-recommended priority-high technical-debt
難易度 2/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
help wanted needs-unity ready for a contributor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eyalgolan/statecraft-israel#1542 ·
メンテナーはふだん 1 日以内に返信
-
kind/enhancement Provider Upgrade pulumi/pulumi-azure R1 Task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
pulumi/pulumi-azure#3669 ·
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信