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

Abierto
#457 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust
Área
build-system

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
101
Forks
20
Merge medio
2 h 33 min
PR fusionados (30 d)
90

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de aimdb-dev/aimdb

Todos los issues de aimdb-dev/aimdb

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.