You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
Using a git dependency from a repository that contains multiple Cargo.toml files is complicated. If any of these files are invalid (such as files that are used as input for tests), or the result of complicated vendoring situations like Gecko, Cargo tries to make sense of them even if they will not actually contribute anything to the build. Using this same dependency as a path or published package works fine since only the appropriate package's Cargo.toml is read, but the git dependency is recursively walked for all Cargo.toml files that exist.
Possible Solution(s)
One easy way out - leave the current behaviour as default, but add an extra TOML property for git deps that makes it possible to specify a particular path inside the working tree which should be treated as the package root.
Notes
Output of cargo version:
cargo 1.35.0-nightly (63231f4 2019-03-27)
Without a solution to this problem, anyone using an unusual git dep must end up modifying its contents to remove the TOML files that Cargo can't understand. This is very frustrating, especially when the other dependency modes work just fine.
The text was updated successfully, but these errors were encountered:
Commit 3d6de41 (rust-lang#3998) made cargo
ignore Cargo.toml files that are invalid TOML in a git source.
This change further ignores Cargo.toml files that are valid TOML but
cannot really be loaded.
This is potentially an alternative fix for rust-lang#6822.
Ignore broken Cargo.toml in git sources
Commit 3d6de41 (#3998) made cargo
ignore Cargo.toml files that are invalid TOML in a git source.
This change further ignores Cargo.toml files that are valid TOML but
cannot really be loaded in a git source.
This is potentially an alternative fix for #6822.
This is more or less fixed by #7947. It would probably be good for some time in the future to have a way to restrict which directory Cargo looks at, but for now this should now work.
Problem
Using a git dependency from a repository that contains multiple Cargo.toml files is complicated. If any of these files are invalid (such as files that are used as input for tests), or the result of complicated vendoring situations like Gecko, Cargo tries to make sense of them even if they will not actually contribute anything to the build. Using this same dependency as a path or published package works fine since only the appropriate package's Cargo.toml is read, but the git dependency is recursively walked for all Cargo.toml files that exist.
Steps
cargo build
Possible Solution(s)
One easy way out - leave the current behaviour as default, but add an extra TOML property for git deps that makes it possible to specify a particular path inside the working tree which should be treated as the package root.
Notes
Output of
cargo version
:cargo 1.35.0-nightly (63231f4 2019-03-27)
Without a solution to this problem, anyone using an unusual git dep must end up modifying its contents to remove the TOML files that Cargo can't understand. This is very frustrating, especially when the other dependency modes work just fine.
The text was updated successfully, but these errors were encountered: