Getting errors with building Rust flatpaks that depend on git dependencies

I’m trying to build a new version of bodev, but I’m getting an issue where Cargo fails to load the correct version of a dependency.

I’m using flatpak-cargo-generator to generate the generated-sources.json file.

The dependency is a git dependency so I guess that’s why it fails to load the correct version.

This worked fine for previous releases I’m struggling to understand the state of the vendored dependencies inside of the build step, and this is one place where cargo error messages are not that good :slight_smile:

Thanks for your help!

So why didn’t you raise it on that repo? As it sounds like the sources get generated wrong? Or isn’t that the case?

I’m the maintainer of bodev. If the sources are generated wrong it’s the fault of flatpak-cargo-generator (cargo works just fine when online). I ran flatpak-cargo-generator (latest version) on the latest Cargo.lock, that corresponds to the commit used for the main repo.

Do you mean opening an issue on flatpak/flatpak-build-tools ? Yes good idea.

Looks like there’s some weird stuff in the Cargo.toml that even cargo vendor can’t handle. The issue is actually with libcosmic and/or cargo it appears. Though it’s a bit annoying that there is now way to work around it in flatpak.

I got the source of the issue, it’s a weird cargo behavior possibly a bug: Cargo duplicates the same packages that is part of a cyclic git dependency cycle · Issue #15745 · rust-lang/cargo · GitHub, and a testament of the alpha state of libcosmic :laughing:

This topic was automatically closed after 9 hours. New replies are no longer allowed.