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

Workspace dependencies are not resolved correctly #60

Open
elaye opened this issue Jan 6, 2023 · 2 comments · May be fixed by #61
Open

Workspace dependencies are not resolved correctly #60

elaye opened this issue Jan 6, 2023 · 2 comments · May be fixed by #61

Comments

@elaye
Copy link

elaye commented Jan 6, 2023

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!

Bravo555 added a commit to Bravo555/cargo-bitbake that referenced this issue Feb 2, 2023
The dependencies were upgraded to handle [workspace inheritance
introduced in cargo 1.64][1]. MSRV was set to the minimal version
required to compile (1.65 due to usage of let else in cargo).

This PR resolves meta-rust#60. On the same note meta-rust#46 should also probably get
closed since AFAIK it's already been resolved.

[1]: rust-lang/cargo#10859

Signed-off-by: Marcel Guzik <[email protected]>
@Bravo555 Bravo555 linked a pull request Feb 2, 2023 that will close this issue
@Bravo555
Copy link

Bravo555 commented Feb 2, 2023

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

@elaye
Copy link
Author

elaye commented Feb 8, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants