cargo: reintroduce feature options, as a means to provide input for the interpreter #14660
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Without feature options there is no way for the superproject to reconcile differences between different invocations of
dependency()
. Until something along the lines of #14639 is completed, this makes it almost impossible to rely on Meson's Cargo interpreter when you have more than onedependency()
using Cargo subprojects.Reintroduce feature options as they were before afd8944 ("cargo: Fix feature resolution", Meson 1.7.0). However, the Cargo interpreter also "complete" the default_options provided by
_do_subproject_cargo()
with all the features that were enabled via Cargo.toml. This is also useful for themeson/meson.build
files, which now have access to the set of enabled features.Note however that the generated
meson.build
file is not independent of enabled features, because it still hardcodes the list of dependencies.