Skip to content

Wrong workspace publication order in the presence of dev-dependencies #15412

Open
@fpoli

Description

@fpoli

Problem

cargo +nightly publish -Zpackage-workspace --workspace ignores the dev-dependencies when computing the order in which to publish the packages of a workspace.

Steps

  1. Create a new workspace in which crate X has a dev-dependency on crate Y.
  2. cargo +nightly publish -Zpackage-workspace --workspace.
  3. cargo tries to publish X first, but fails to do so because Y has not been published yet.

Possible Solution(s)

A possible workaround: #1169 (comment) However, in our case we declare the dev dependency in X as Y = { workspace = true }. So, the workaround cannot be applied easily.

Notes

Original discussion: #1169 (comment)

Version

cargo +nightly --version --verbose:

cargo 1.88.0-nightly (0e93c5bf6 2025-04-05)
release: 1.88.0-nightly
commit-hash: 0e93c5bf6a1d5ee7bc2af63d1afb16cd28793601
commit-date: 2025-04-05
host: aarch64-apple-darwin
libgit2: 1.9.0 (sys:0.20.0 vendored)
libcurl: 8.7.1 (sys:0.4.80+curl-8.12.1 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 3.4.1 11 Feb 2025
os: Mac OS 14.6.1 [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-publishS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewZ-package-workspaceNightly: package-workspace

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions