chore(build): the feature matrix lives only in a 1,088-line hand-enumerated Makefile

Đang mở
#465 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/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ệ
rust
Lĩnh vực
build-system, ci-cd

Hướng nghiên cứu

Start by comparing the Makefile targets build, test, clippy, doc, and test-embedded with the CI calls in ci.yml at commit d9c7be0. Map the existing feature combinations and check whether any are missing from a target, then inspect the crate manifests to identify declared features. Choose one of the suggested approaches and add a check that every declared feature appears in at least one tested combination.

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

Mô tả

enhancement

Problem

Makefile is 1,088 lines, and most of it is hand-written cargo build|test|clippy|doc|check --package … --features "…" lines, one per crate and feature combination, repeated across the build, test, clippy, doc and test-embedded targets. CI calls these targets (make clippy, make test, make test-embedded, make check, make all), so the Makefile is the only place the supported feature matrix is written down.

Consequences:

  • Adding or renaming a feature means editing the same combination in up to five targets, plus the crate manifest. Nothing checks that the five stay aligned, so a combination can be built but not linted, or linted but not documented.
  • The matrix cannot be read by tools (e.g. to check that every declared feature is exercised at least once).
  • It is the main reason the deprecated feature aliases are still in use in-tree.

Suggested work

Options, roughly in order of effort:

  1. Define each crate's feature combinations once as Make variables and have build / test / clippy / doc iterate over them.
  2. Move the matrix into a small data file (TOML) consumed by an xtask or script, with the Makefile targets as thin wrappers.
  3. Use cargo hack --feature-powerset (with exclusions) for the host crates and keep explicit lists only for the embedded targets.

Whatever the choice, add a check that every feature declared in a crate manifest appears in at least one tested combination.

Notes

Based on reading the Makefile and ci.yml at d9c7be0. I did not check for combinations that are already missing from one of the targets; that would be a useful first step.

Ngôn ngữ chính
Rust
Star
101
Fork
20
Merge trung bình
2 giờ 33 phút
Pull request đã merge (30 ngày)
90

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

Mở trong Codespaces

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.

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 aimdb-dev/aimdb

Tất cả issue của aimdb-dev/aimdb

Issue tương tự

Thêm issue về Rust

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.