[Traversal] Filtering projects solution files without kicking off evaluations
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp
- Lĩnh vực
- build-system
Hướng nghiên cứu
Xem xét việc triển khai Directory.Solution.targets và Microsoft.Build.Traversal Sdk.targets, sau đó so sánh hành vi restore thông thường với giới hạn của static graph được mô tả trong issue 521. Tài liệu hóa override GetProjectsToSkip để lọc các project trước khi evaluation, bao gồm cả việc hiện tại nó chỉ áp dụng cho restore thông thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 513
- Fork
- 94
- Merge trung bình
- 49 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/MSBuildSdks
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
microsoft/MSBuildSdks#653 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoft/MSBuildSdks#652 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
microsoft/MSBuildSdks#646 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
microsoft/MSBuildSdks#644 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
microsoft/MSBuildSdks#642 ·
Tất cả issue của microsoft/MSBuildSdks
Issue tương tự
-
area-multitenancy area-security p1-recommended priority-high technical-debt
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
help wanted needs-unity ready for a contributor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
eyalgolan/statecraft-israel#1542 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/enhancement Provider Upgrade pulumi/pulumi-azure R1 Task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
pulumi/pulumi-azure#3669 ·
-
type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày