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

Aperta
#457 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
build-system

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
101
Fork
20
Merge medio
2h 33m
PR unite (30g)
90

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aimdb-dev/aimdb

Tutte le issue di aimdb-dev/aimdb

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.