Edition 3 post-2 build-dependencies problem
GloamXun opened this issue · comments
Hi, I'm trying to follow the guide in edition 3 post-2. After I add build-dependencies as blog_os crate is, the cargo build
command doesn't compile kernel and bootloader_api.
[build-dependencies]
kernel = { path = "kernel", artifact = "bin", target = "x86_64-unknown-none" }
My Cargo.toml is:
[package]
name = "my_os"
version = "0.1.0"
edition = "2021"
[workspace]
members = ["kernel"]
[dependencies]
[build-dependencies]
kernel = { path = "kernel", artifact = "bin", target = "x86_64-unknown-none" }
And the Cargo.toml in kernel crate is:
[package]
name = "kernel"
version = "0.1.0"
edition = "2021"
[dependencies]
bootloader_api = "0.11"
The output of cargo build
is:
cargo build
Compiling my_os v0.1.0 (/home/gloamxun/Project/my_os)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
And when I try to get the output of 'cargo tree', it goes like this:
cargo tree
thread 'main' panicked at src/cargo/core/resolver/features.rs:323:14:
activated_features for invalid package: features did not find PackageId { name: "kernel", version: "0.1.0", source: "/home/gloamxun/Project/my_os/kernel" } HostDep
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Is there something wrong with my configuration?
Sorry to bother you. I continue to follow the rest of the post. I finish the build.rs
. I found that the cargo tree
command still had the same problem, but It was finally built.
cargo tree
currently has a problem with artifact dependencies, see rust-lang/cargo#10593. There is an open PR to fix this, but it's still waiting for review.
cargo tree
currently has a problem with artifact dependencies, see rust-lang/cargo#10593. There is an open PR to fix this, but it's still waiting for review.
Thank you for your reply. It seems like it's not a big problem, the whole project works fine. By the way, when edition 3 is fully completed, I can assist with Chinese translation.
Thank you!