-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
14 changed files
with
344 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Cargo features are resolved globally | ||
|
||
When configuring a Cargo dependency, Meson will now resolve its complete | ||
dependency tree and feature set before generating the subproject AST. | ||
This solves many cases of Cargo subprojects being configured with missing | ||
features that the main project had to enable by hand using e.g. | ||
`default_options: ['foo-rs:feature-default=true']`. | ||
|
||
Note that there could still be issues in the case there are multiple Cargo | ||
entry points. That happens if the main Meson project makes multiple `dependency()` | ||
calls for different Cargo crates that have common dependencies. | ||
|
||
Breaks: This change removes per feature Meson option That were previously | ||
possible to set as show above or from command line `-Dfoo-rs:feature-foo=true`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
__all__ = [ | ||
'interpret', | ||
'Interpreter', | ||
'load_wraps', | ||
] | ||
|
||
from .interpreter import interpret, load_wraps | ||
from .interpreter import Interpreter, load_wraps |
Oops, something went wrong.