[17.0] Document breaking change: `ResourceUrlAnnotation.DisplayOrder` changed from a field to a property
Maintainer thường phản hồi trong vòng 2 ngày
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
- 82/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu với bảng các thay đổi gây lỗi tương thích trong src/frontend/src/content/docs/whats-new/aspire-13-3.mdx và làm theo định dạng của bảng khi thêm thay đổi DisplayOrder vào trang What's new của Aspire 17.0. Hãy cân nhắc cập nhật ví dụ trong src/frontend/src/content/docs/fundamentals/custom-resource-urls.mdx để hiển thị DisplayOrder. Hoàn tất khi thay đổi gây lỗi tương thích và ảnh hưởng của nó đến khả năng tương thích nhị phân được ghi lại, đồng thời ví dụ phản ánh thuộc tính được hỗ trợ nếu bạn cập nhật ví dụ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In Aspire 17.0, Aspire.Hosting.ApplicationModel.ResourceUrlAnnotation.DisplayOrder in the stable Aspire.Hosting package changed from an [Obsolete] public field to a read/write property. Typical C# code still compiles, but assemblies compiled against the field fail at run time until they're rebuilt, so this should be listed in the 17.0 breaking changes.
- Code change: microsoft/aspire#20637
- Announced in Aspire 13.6, when microsoft/aspire#19090 marked the field
[Obsolete] - Raised in the 17.0 API review: https://github.com/microsoft/aspire/pull/22185#discussion_r4552196746
- [Obsolete("DisplayOrder was incorrectly created as a field. It will be re-added as a property in a future Aspire version.")]
- public int? DisplayOrder;
+ public int? DisplayOrder { get; set; }
Why it changed
DisplayOrder was exposed as a public field by mistake. Aspire 13.6 marked the field obsolete and said a property would replace it in a future version. Aspire 17.0 makes that change and removes the obsolete warning. What the value means hasn't changed: higher values sort the URL higher on the dashboard.
Impact
- Binary: assemblies compiled against an earlier Aspire version that read or write
DisplayOrderthrowMissingFieldExceptionat run time with Aspire 17.0 until they're rebuilt. Hosting integrations that set it in aWithUrlForEndpointorWithUrlscallback are an example. - Source: reads, assignments, and object initializers compile unchanged, and the
CS0618obsolete warning no longer appears. PassingDisplayOrderbyreforoutno longer compiles. - Reflection: code that looks up
DisplayOrderwithType.GetFieldmust useType.GetProperty.
Migration
Rebuild against Aspire 17.0. Typical usage needs no code changes:
builder.AddProject<Projects.AspireApp_Api>("api")
.WithUrlForEndpoint("https", url =>
{
url.DisplayText = "Scalar (HTTPS)";
url.Url = "/scalar";
url.DisplayOrder = 1000;
});
After rebuilding:
- Remove any
#pragma warning disable CS0618directives orNoWarnentries that were only there forDisplayOrder. - Replace
reforoutusage with a local variable, then assign it to the property. - Hosting integration authors who set
DisplayOrderneed to ship a version built against Aspire 17.0.
Where to document
- Add a row to the ⚠️ Breaking changes table on the 17.0 What's new page. There's no
whats-new/aspire-17*.mdxonmainyet; follow the table in aspire-13-3.mdx. - Consider showing
DisplayOrderin the Customize endpoint URL example now that it can be set without a warning. No aspire.dev page mentions it today.
- Ngôn ngữ chính
- MDX
- Star
- 202
- Fork
- 99
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 97
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- 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/aspire.dev
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
microsoft/aspire.dev#2130 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/aspire.dev#2129 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Docs: note that Bun resources don't trust the dev cert via NODE_EXTRA_CA_CERTS (upstream Bun bug)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
microsoft/aspire.dev#1802 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[docs] Missing information about the dotnet container steps around image being built locallyCó thể đã có người làm @IEvangelist đã nhận 54 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/aspire.dev#1288 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
microsoft/aspire.dev#2114 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/aspire.dev
Issue tương tự
-
area:mcp effort:low P5 source:agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README says the land/sea mask must match the XS grid; the demo mask does not, and Step 4 worksĐang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
buckai-observatory/Automated-Cloud-Removal-and-Seamless-Satellite-Image-Mosaicking-Pipeline#52 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
run-llama/llama_index#24163 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
TMHSDigital/Static_Chess#48 ·