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

未关闭
#465 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
101
派生
20
平均合并
2 小时 33 分钟
30 天内合并 PR
90

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aimdb-dev/aimdb 的其他 Issue

查看 aimdb-dev/aimdb 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。