cargo-bitbake icon indicating copy to clipboard operation
cargo-bitbake copied to clipboard

Workspace dependencies are not resolved correctly

Open elaye opened this issue 1 year ago • 2 comments

Hello,

I'm having trouble using cargo-bitbake to generate a recipe for a crate that has workspace dependencies. For example, if a dependency is declared like this in one of the workspace members:

foo123 = { workspace = true }

I have the following error:

error: no matching package named `foo123` found
location searched: registry `crates-io`
required by package `foo v0.1.0 (...)`

Something interesting is that if instead of foo123 I use a name that exists on crates.io it will resolve to this crate instead of the crate defined in the workspace Cargo.toml.

I made a minimal example that reproduces this bug here.

Please let me know if I can be of any help for resolving this issue!

elaye avatar Jan 06 '23 16:01 elaye

Hello, just submitted a PR with a solution, if it's still an issue for you please try my fork and and let me know here whether it fixed the problem for you.

cargo install --git https://github.com/Bravo555/cargo-bitbake.git --branch upgrade-deps

Bravo555 avatar Feb 02 '23 15:02 Bravo555

@Bravo555 cargo bitbake runs without an error with your fork!

The generated recipe looks fine but I haven't tried it in a build yet.

elaye avatar Feb 08 '23 18:02 elaye