chore(deps): use [workspace.dependencies] consistently and converge thiserror / heapless / rand versions

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
build-system

调研方向

Start by comparing the root Cargo.toml workspace dependencies with the crate manifests listed in the issue, then inspect Cargo.lock for the named version splits. Work one dependency at a time, as suggested, and check the affected manifests and tests for compatibility. Done means first-party dependencies consistently use workspace declarations where possible and the specified version splits are resolved or documented as required.

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

描述

dependencies

Problem

The root Cargo.toml declares a [workspace.dependencies] table, but many crates re-declare the same dependencies with their own version strings, so the table is not the single source of truth it looks like.

Re-declared instead of workspace = true
  • tokio: aimdb-tcp-connector, aimdb-uds-connector, aimdb-serial-connector, aimdb-websocket-connector, aimdb-client, tools/aimdb-cli, examples/serve-records-http-demo ("1"); aimdb-sync ("1.40"); tools/aimdb-mcp, examples/remote-access-demo ("1.48"). Workspace says 1.49.
  • serde / serde_json: about a dozen manifests (aimdb-tokio-adapter, aimdb-uds-connector, aimdb-websocket-connector, aimdb-client, aimdb-sync, aimdb-cdr, aimdb-data-contracts, aimdb-zenoh-connector, tools/aimdb-cli, tools/aimdb-mcp, examples/remote-access-demo).
  • futures, tracing, clap, anyhow, log: aimdb-core, aimdb-client, aimdb-mqtt-connector, aimdb-embassy-adapter, aimdb-bench, aimdb-websocket-connector, aimdb-tokio-adapter, tools/aimdb-cli, tools/aimdb-mcp, and two examples.
  • embassy-sync, embassy-time, embassy-net: aimdb-mqtt-connector/Cargo.toml:157-164.
Real version splits inside our own crates
  • thiserror: aimdb-client, tools/aimdb-cli, tools/aimdb-mcp are on 1.x; workspace, aimdb-core and aimdb-sync are on 2.x. Both end up in Cargo.lock.
  • heapless: workspace (used by aimdb-knx-connector, aimdb-mqtt-connector, two embassy demos) is 0.8; aimdb-core, aimdb-embassy-adapter and aimdb-tcp-connector declare 0.9 directly. Part of this is forced (mountain-mqtt packet types take heapless 0.8 Vec; embassy-net uses 0.9), so it may not be fully removable.
  • rand: aimdb-mqtt-connector dev-depends on 0.8; aimdb-embassy-adapter, tools/embedded-check-fixture and the embassy demos use 0.10.1.

For context, Cargo.lock has 58 of 643 crates in more than one version. Most of the rest is transitive (zenoh, axum — e.g. three tungstenite versions via zenoh-link-ws, our direct 0.26, and axum) and out of our hands.

Suggested work

  1. Move each first-party use of a workspace-declared dependency to { workspace = true, features = [...] }, adding the missing ones (e.g. heapless 0.9 under a second alias) to the table.
  2. Bump aimdb-client, aimdb-cli and aimdb-mcp to thiserror 2.
  3. Bump the rand dev-dependency in aimdb-mqtt-connector to 0.10 if the tests allow.
  4. Decide whether heapless 0.8 can be confined to the crates that need it for mountain-mqtt.

Mechanical, but touches many manifests; best done in one PR per dependency.

Notes

Derived from the manifests and Cargo.lock at d9c7be0. cargo tree was not run (the embassy git patch could not be fetched offline), so parent crates were read from the lockfile.

主要语言
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 摘要。