Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions tests/testsuite/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7560,6 +7560,40 @@ fn unpublished_cyclic_dev_dependencies() {
);
}

#[cargo_test]
fn unpublished_cyclic_dev_dependencies_nightly() {
registry::init();
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
edition = "2015"
authors = []
license = "MIT"
description = "foo"
documentation = "foo"

[dev-dependencies]
foo = { path = ".", version = "0.0.1" }
"#,
)
.file("src/lib.rs", "")
.build();

p.cargo("package --no-verify --exclude-lockfile -Zpackage-workspace")
.masquerade_as_nightly_cargo(&["package-workspace"])
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] crates-io is replaced with remote registry dummy-registry;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error looks pretty weird. What is the actual error?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot reproduce this error with cargo 1.89.0-nightly (64a124607 2025-05-30) outside cargo-test-support (not setting CARGO_HOME).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to replace crates.io

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I know, but is there a real world repro?

include `--registry dummy-registry` or `--registry crates-io`

"#]])
.run();
}

// A failing case from <https://github.com/rust-lang/cargo/issues/15059>
#[cargo_test]
fn unpublished_dependency() {
Expand Down