This adds support for parsing the new `autolib` member
(https://github.com/rust-lang/cargo/pull/14591).
This is a quick and easy fix, suitable for backport. A larger more
involved fix will be to stop splatting out the cargo dictionaries, and
instead pass the fields we know about 1 by 1, and warning the user if we
come across unknown fields.
Fixes: #13826
In the case the main project has a .wrap file for a cargo subproject,
that subproject's Cargo.lock must be loaded before we can recursively
fetch all its dependencies.
The library name defaults to its package name, but it can be different.
For example:
- package name: cairo-sys-rs
- library name: cairo-sys
- dependency name: ffi
Introduce a global Cargo interpreter state that keeps track of enabled
features on each crate.
Before generating AST of a Cargo subproject, it downloads every
sub-subproject and resolves the set of features enabled on each of them
recursively. When it later generates AST for one its dependencies, its
set of features and dependencies is already determined.
Cargo.lock is essentially identical to subprojects/*.wrap files. When a
(sub)project has a Cargo.lock file this allows automatic fallback for
its cargo dependencies.
By adding the option name to UserOption object, it is now possible to
display the name of the affected option when the given option value is
not valid.
Fixes#12635
Cargo implements this configuration option to override the entry point
of the library.
To get test coverage, I've modified one of the two Cargo subprojects
in the test to use a non-default library entrypoint. The other still
uses the default.
Previously, creating a meson wrap with "method=cargo"
for https://github.com/sunfishcode/is-terminal would fail,
because its Cargo.toml contains a [target] section without
dependencies.
Instead, we now fall back to an empty list in case of no specified dependencies
(like everywhere else in "_convert_manifest")