Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Bricks: split PackageResolver.MaterializeTwinAsync

Đang mở
#321 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
tooling

Hướng nghiên cứu

Open Gaya/MASS4.Bricks/PackageResolver.Twins.cs and read MaterializeTwinAsync and its callees. Apply the pending cached-bake fix first, then introduce a private value holding the parameters and move the index/cached/published path into a separate async step. 'Done' is the full suite green with no test changes and each changed method at complexity ≤8 and CRAP ≤15.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

c:gaya p:low size:XS t:refactor

Current State

PackageResolver.MaterializeTwinAsync (Gaya/MASS4.Bricks/PackageResolver.Twins.cs) scored CRAP 32 in the store contract client batch (96a5587): one async body reads the lock, the package store, the registry index and the variant choice. The pending cached-bake fix splits out CachedTwin, CheckedTwinAsync and AvailableTwinAsync, which brings it to complexity 14 at the 15 limit, with AvailableTwinAsync taking eleven parameters. Branches from static-lambda caching, the strict-lock exit, the index fetch and the cached path still add up in one state machine.

Tasks

  • Carry the source id, ranges, requester, depth, existing lock and locked bake in one private value instead of separate parameters
  • Keep the strict-lock exit in a synchronous MaterializeTwinAsync and move the index/cached/published path into its own async step
  • Pass that value to AvailableTwinAsync instead of its parameter list

Acceptance Criteria

  • Behavior unchanged: no test edited, full suite green
  • Every changed method has complexity ≤ 8 and CRAP ≤ 15

Related

  • Lands after the cached/locked bake compatibility and advisory fix
Ngôn ngữ chính
C#
Star
1
Fork
1
Merge trung bình
1 giờ 46 phút
Pull request đã merge (30 ngày)
41

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MASS4ORG/Turian

Tất cả issue của MASS4ORG/Turian

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.