diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-07-02 12:54:39 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-07-02 18:03:21 -0400 |
commit | db0c24e627dd0fbcea2bb6b849221d6f8376805e (patch) | |
tree | 5db2e62a1e9e88ec1f9e8a67900534d0b7b55e8a /mesonbuild/backend/ninjabackend.py | |
parent | 098ac5e0a626e135058df9269e16a35266892ce4 (diff) | |
download | meson-db0c24e627dd0fbcea2bb6b849221d6f8376805e.zip meson-db0c24e627dd0fbcea2bb6b849221d6f8376805e.tar.gz meson-db0c24e627dd0fbcea2bb6b849221d6f8376805e.tar.bz2 |
genvslite: greatly simplify the implementation of non-genvslite backends
By avoiding Java-style variable naming, the code becomes considerably
more readable while simultaneously becoming *more* easy to understand.
It's no longer necessary to ask questions like "what's a captured
buildtype" when trying to read through the code for a backend, because
it can be dismissed as not relevant to the current context by re-reading
it as "context for vslite".
The primary goal here has been to revert regressions in the developer
experience for users of the ninja backend, so there may still be issues
in vs2010backend.py
Post-facto application of issues that were raised during review,
ignored, and merged despite such.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 2139847..27be9a9 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -575,13 +575,11 @@ class NinjaBackend(backends.Backend): raise MesonException(f'Could not determine vs dep dependency prefix string. output: {stderr} {stdout}') - def generate(self, - capture: bool = False, - captured_compile_args_per_buildtype_and_target: dict = None) -> T.Optional[dict]: - if captured_compile_args_per_buildtype_and_target: + def generate(self, capture: bool = False, vslite_ctx: dict = None) -> T.Optional[dict]: + if vslite_ctx: # We don't yet have a use case where we'd expect to make use of this, # so no harm in catching and reporting something unexpected. - raise MesonBugException('We do not expect the ninja backend to be given a valid \'captured_compile_args_per_buildtype_and_target\'') + raise MesonBugException('We do not expect the ninja backend to be given a valid \'vslite_ctx\'') ninja = environment.detect_ninja_command_and_version(log=True) if self.environment.coredata.get_option(OptionKey('vsenv')): builddir = Path(self.environment.get_build_dir()) |