Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cargo panics on cleaning a given package if there exists a build-dependency #8303

Closed
aDotInTheVoid opened this issue Jun 1, 2020 · 1 comment
Labels
C-bug Category: bug

Comments

@aDotInTheVoid
Copy link
Member

Problem

Cargo panics on cleaning a given package if there exists a build-dependency

Steps
Cargo.toml

[package]
name = "bug3"
version = "0.1.0"
authors = ["Nixon <nixon.emoony@gmail.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

[build-dependencies]
winapi="0.3"

build.rs

fn main() {}

src/main.rs

fn main() {
    println!("Hello, world!");
}

Notes

Output of cargo version:
cargo 1.43.0 (2cbe904 2020-05-03)

Backtrace

thread 'main' panicked at 'assertion failed: self.host', src/tools/cargo/src/cargo/core/profiles.rs:920:13
stack backtrace:
   0:        0x10fe85f9f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdfed66b3e2e8ce60
   1:        0x10feae8de - core::fmt::write::h9de7b13cfaa80b03
   2:        0x10fe7cfb7 - std::io::Write::write_fmt::h9197012b9d65a9a3
   3:        0x10fe89b6a - std::panicking::default_hook::{{closure}}::h7b209cdc44c5777f
   4:        0x10fe898ac - std::panicking::default_hook::hf135bc502e6f77db
   5:        0x10fe8a1d8 - std::panicking::rust_panic_with_hook::h7967810bc33e523b
   6:        0x10fefa78d - std::panicking::begin_panic::h7414d98c0be4ed86
   7:        0x10fa80107 - cargo::core::compiler::unit_dependencies::compute_deps::ha32d33dec3b96318
   8:        0x10fa7df8a - cargo::core::compiler::unit_dependencies::deps_of::hd28f168e6b72f5da
   9:        0x10fa7dd1b - cargo::core::compiler::unit_dependencies::deps_of_roots::h5ddb15b6fb8249da
  10:        0x10fa7c432 - cargo::core::compiler::unit_dependencies::build_unit_dependencies::hb96e1475bb43ef30
  11:        0x10f6f786e - cargo::ops::cargo_clean::clean::hccc035e46feacf55
  12:        0x10f64533d - cargo::commands::clean::exec::h52401136ab70b327
  13:        0x10f686328 - cargo::cli::main::hded602f842e07608
  14:        0x10f678bc0 - cargo::main::h0d62c47adf8ce237
  15:        0x10f67b5d6 - std::rt::lang_start::{{closure}}::ha264907e18bfc93f
  16:        0x10fe89ca8 - std::panicking::try::do_call::he58e98df0f664580
  17:        0x10fe93fdb - __rust_maybe_catch_panic
  18:        0x10fe8a6aa - std::rt::lang_start_internal::hfa21381d8ff23689
  19:        0x10f67b2b9 - main
@aDotInTheVoid aDotInTheVoid added the C-bug Category: bug label Jun 1, 2020
@ehuss
Copy link
Contributor

ehuss commented Jun 1, 2020

Thanks for the report. This is a duplicate of #8149, and has been fixed in 1.44.

@ehuss ehuss closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants