forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interpreter: don't create new Interpreter instances for subprojects
Instead, replace the state with new state. This means we don't have to re-calculate any of the methods or tell the sub-interpreter about the state of the super-interpreter, it's already there. Since all of the state that is not an implementation detail of the Interpreter itself is no longer bound to the interpreter this is all very trivial. This fixes a number of potential bugs created by side-effects from a failing, optional, subproject (Assume A => B => C, where C configures successfully but B fails after that) 1. If B called `meson_override_dependency()` or `meson.override_find_program()` those overrides would remain, even though the targets would not exist. 2. Targets from C would be built, even though B will not be, and A does not use them. 3. If C called `meson.override_dependency()` or `meson.override_find_program()` these overrides would remain, and could affect A 4. If B is optional, but a subproject D is called if B fails, and D calls C with different `default_options` than B, D will get a copy of C using those different options 5. Summary options for C will be printed, even though it is unused
- Loading branch information
Showing
4 changed files
with
62 additions
and
45 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
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