Then compilation succeeds and cargo tree -d returns an empty result as expected.
Notes
There are a lot of git related issues already open, but most of them are about unifying slightly different urls (like tag vs rev). In my case, the url is exactly the same and they are still not unified.
I think it's actually not related to the patch and purely caused by fe-o-godot-macros. I'll try to create a smaller repro when I have some more time ...
Problem
I'm using a
patch
section to redirect an indirect dependency to my own fork. The main crate directly references this dependency.my main cargo.toml
gdext_coroutines
referencesgodot
from the original repository:https://github.com/0x53A/gdext_coroutines/blob/41fafbd58fb6694f42b67b1c2794461fed52aee3/rust/Cargo.toml#L19-L20
fe-o-godot-macros
referencesgodot
from my fork, but without the additional featureshttps://github.com/0x53A/fe-o-godot-macros/blob/4ef212df813bd166782213bef6fbcf6ffff6db47/Cargo.toml#L11-L12
When I run
cargo build
in my main project, I get compile errors related to the feature"lazy-function-tables"
, as one example:It seems like cargo has a duplicated reference to
0x53A/gdext
and loses the features ("experimental-wasm", "lazy-function-tables") at some point.here is the output of
cargo tree -d
, which I would expect to be emptySteps
cargo build
and observe that it fails,cargo tree -d
prints a list of duplicated dependencies# doesn't work
block and enable the# works
blockcargo build
and observe that it works,cargo tree -d
is emptyPossible Solution(s)
It works when I set the correct repository and features in all packages (inside
gdext_coroutines
andfe-o-godot-macros
.Then compilation succeeds and
cargo tree -d
returns an empty result as expected.Notes
There are a lot of git related issues already open, but most of them are about unifying slightly different urls (like tag vs rev). In my case, the url is exactly the same and they are still not unified.
Version