Skip to content

non-deterministic (40% chance) workspace error: "package" is a member of the wrong workspace #10864

@japaric

Description

@japaric

Problem

Several Cargo commands spuriously fail within a workspace. They sometimes work fine and sometimes produce a workspace error. See the 'steps' section for the actual error message.

Steps

$ git clone https://github.com/knurling-rs/defmt
$ cd defmt/firmware/qemu
$ git checkout 00b1813

$ rustup default nightly-2022-07-11

$ # run this command ten times
# # about 3-4 of those will fail with the following error
$ cargo clean
error: package `/tmp/defmt/firmware/defmt-itm/Cargo.toml` is a member of the wrong workspace
expected: /tmp/defmt/firmware/Cargo.toml
actual:   /tmp/defmt/Cargo.toml

Possible Solution(s)

nightly-2022-07-10 and older nightlies have no issues

Notes

Also observed on GitHub Actions with Ubuntu 20.04. Build logs.

Version

cargo 1.64.0-nightly (b1dd22e66 2022-07-09)
release: 1.64.0-nightly
commit-hash: b1dd22e668af5279e13a071ad4b17435bd6bfa4c
commit-date: 2022-07-09
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1n)
os: Arch Linux Rolling Release [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions