Skip to content

Remove the self dev-dependency that stops the health check API server crate from being packaged #2582

Closed

Description

@josecelano

Subissue of EPIC #1669 (Overhaul: Packages). Pre-publish sub-issue P1 of the first-publish tracking issue. Not blocked.

Bug

cargo package --workspace --no-verify fails on develop (5b54bb0f4, stable Rust toolchain, cargo 1.99.0):

   Packaging torrust-tracker-axum-health-check-api-server v0.1.0 (.../packages/axum-health-check-api-server)
    Updating crates.io index
error: failed to prepare local package for uploading

Caused by:
  no matching package named `torrust-tracker-axum-health-check-api-server` found
  location searched: crates.io index
  required by package `torrust-tracker-axum-health-check-api-server v0.1.0 (.../packages/axum-health-check-api-server)`

What happens:

  1. packages/axum-health-check-api-server/Cargo.toml lists the crate itself under [dev-dependencies] (torrust-tracker-axum-health-check-api-server = { version = "0.1.0", path = "../axum-health-check-api-server" }). The line dates from before the Align torrust- prefix: rename 7 tracker-specific packages to torrust-tracker- #1816 rename and is not needed: Cargo already lets the crate's integration tests import the package under test.
  2. cargo package keeps a dev-dependency that has a version and resolves it against the registry plus the crates already packaged in the same run, and a crate is never packaged before itself.
  3. So the requirement cannot be met. cargo publish fails the same way.

Impact: nothing is wrong at runtime or in tests, but the crate cannot be published, which the independent versioning ADR expects of every crate without publish = false, and cargo package --workspace stops at it.

A probe on 2026-10-20 removed the line: the crate's tests still pass (3 unit, 8 integration) and all 32 workspace members package.

Plan (fix-bug workflow)

  1. Reproduce: done.
  2. Add a CI step running cargo package --workspace --no-verify (maintainer decision, 2026-10-20); record its red run on the unfixed tree.
  3. Remove the self dev-dependency.
  4. Green: the CI step and cargo test -p torrust-tracker-axum-health-check-api-server pass; repeat the reproduction like-for-like.

Acceptance criteria

  • The crate's manifest has no dependency on its own crate.
  • cargo package --workspace --no-verify exits 0 (it exited 101 before the fix).
  • cargo test -p torrust-tracker-axum-health-check-api-server passes.
  • CI runs cargo package --workspace --no-verify; the step failed on the unfixed tree and passes on the fixed tree.
  • Reproduction and recheck recorded in the issue-local manual-verification-evidence.md.

Specification: docs/issues/open/2582-1669-remove-health-check-self-dev-dependency/ISSUE.md (added by the spec-only PR of the first-publish tracking issue).

Activity

  1. self-assigned this
    on Oct 20, 2026
  2. added
    Bug
    on Oct 20, 2026
  3. added 17 commits that reference this issue on Oct 20, 2026
  4. added 3 commits that reference this issue on Oct 21, 2026
  5. added a commit that references this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bugpackages

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions