From db0c24e627dd0fbcea2bb6b849221d6f8376805e Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 2 Jul 2023 12:54:39 -0400 Subject: 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. --- mesonbuild/backend/xcodebackend.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mesonbuild/backend/xcodebackend.py') diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index f8a5c2370..c24074b70 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -254,14 +254,12 @@ class XCodeBackend(backends.Backend): obj_path = f'{project}.build/{buildtype}/{tname}.build/Objects-normal/{arch}/{stem}.o' return obj_path - def generate(self, - capture: bool = False, - captured_compile_args_per_buildtype_and_target: dict = None) -> T.Optional[dict]: + def generate(self, capture: bool = False, vslite_ctx: dict = None) -> T.Optional[dict]: # Check for (currently) unexpected capture arg use cases - if capture: raise MesonBugException('We do not expect the xcode backend to generate with \'capture = True\'') - if captured_compile_args_per_buildtype_and_target: - raise MesonBugException('We do not expect the xcode backend to be given a valid \'captured_compile_args_per_buildtype_and_target\'') + if vslite_ctx: + raise MesonBugException('We do not expect the xcode backend to be given a valid \'vslite_ctx\'') self.serialize_tests() # Cache the result as the method rebuilds the array every time it is called. self.build_targets = self.build.get_build_targets() -- cgit v1.2.3