meta-rust / cargo-bitbake

cargo extension that can generate BitBake recipes utilizing the classes from meta-rust
Apache License 2.0
83 stars 57 forks source link

cargo-bitbake does not honor .cargo/config.toml, and modifies my Cargo.lock #67

Open jaskij opened 1 year ago

jaskij commented 1 year ago

As in the title - running cargo-bitbake modifies my Cargo.lock, and removes a dependency (valuable-derive).

The issue seems to revolve around honoring the dependency chain tracing-core->valuable->valuable-derive. In tracing the support (and requirement) for valuable depends on a configuration flag (--cfg tracing_unstable). It is set in my $HOME/.cargo/config.toml, but cargo-bitbake seems to not honor it.

I can confirm that manually adding the depenency, either in my Cargo.toml, or in the generated bitbake file, fixes the build.

Overall, this is kind of weird, and raises a few questions:

jaskij commented 1 year ago

cc @eivindbergem as this may be related to #58 - both revolve around dependency resoluton

BKDaugherty commented 1 year ago

@jaskij I was also surprised by this, and honestly don't really understand the intended interaction between Cargo.lock files and cargo bitbake. For my private organization, I added a quick flag that just looks at an existing Cargo.lock file and skips resolution. Here's the PR: https://github.com/meta-rust/cargo-bitbake/pull/71

Might be interesting to you!

jaskij commented 1 year ago

@BKDaugherty thanks! That does look interesting. Sadly, I'm already using the version from #70 because of git dependencies.