Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package meson for openSUSE:Factory checked in at 2022-02-17 00:29:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/meson (Old) and /work/SRC/openSUSE:Factory/.meson.new.1956 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "meson" Thu Feb 17 00:29:45 2022 rev:80 rq:954739 version:0.61.2 Changes: -------- --- /work/SRC/openSUSE:Factory/meson/meson.changes 2022-02-09 20:37:55.790193675 +0100 +++ /work/SRC/openSUSE:Factory/.meson.new.1956/meson.changes 2022-02-17 00:29:45.781441237 +0100 @@ -1,0 +2,6 @@ +Tue Feb 15 10:57:22 UTC 2022 - Paolo Stivanin <i...@paolostivanin.com> + +- Update to 0.61.2: + + No changelog provided. + +------------------------------------------------------------------- Old: ---- meson-0.61.1.tar.gz meson-0.61.1.tar.gz.asc New: ---- meson-0.61.2.tar.gz meson-0.61.2.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ meson.spec ++++++ --- /var/tmp/diff_new_pack.pH7z2c/_old 2022-02-17 00:29:46.777441065 +0100 +++ /var/tmp/diff_new_pack.pH7z2c/_new 2022-02-17 00:29:46.785441063 +0100 @@ -28,7 +28,7 @@ %{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim} %bcond_with setuptools Name: meson%{name_ext} -Version: 0.61.1 +Version: 0.61.2 Release: 0 Summary: Python-based build system License: Apache-2.0 ++++++ meson-0.61.1.tar.gz -> meson-0.61.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/PKG-INFO new/meson-0.61.2/PKG-INFO --- old/meson-0.61.1/PKG-INFO 2022-01-17 11:52:18.275322200 +0100 +++ new/meson-0.61.2/PKG-INFO 2022-02-14 20:24:02.893610000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: meson -Version: 0.61.1 +Version: 0.61.2 Summary: A high performance build system Home-page: https://mesonbuild.com Author: Jussi Pakkanen @@ -24,6 +24,7 @@ Classifier: Programming Language :: Python :: 3.9 Classifier: Topic :: Software Development :: Build Tools Requires-Python: >=3.6 +Provides-Extra: ninja Provides-Extra: progress Provides-Extra: typing License-File: COPYING diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/man/meson.1 new/meson-0.61.2/man/meson.1 --- old/meson-0.61.1/man/meson.1 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/man/meson.1 2022-02-14 20:03:13.000000000 +0100 @@ -1,4 +1,4 @@ -.TH MESON "1" "January 2022" "meson 0.61.1" "User Commands" +.TH MESON "1" "February 2022" "meson 0.61.2" "User Commands" .SH NAME meson - a high productivity build system .SH DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/meson.egg-info/PKG-INFO new/meson-0.61.2/meson.egg-info/PKG-INFO --- old/meson-0.61.1/meson.egg-info/PKG-INFO 2022-01-17 11:52:11.000000000 +0100 +++ new/meson-0.61.2/meson.egg-info/PKG-INFO 2022-02-14 20:23:55.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: meson -Version: 0.61.1 +Version: 0.61.2 Summary: A high performance build system Home-page: https://mesonbuild.com Author: Jussi Pakkanen @@ -24,6 +24,7 @@ Classifier: Programming Language :: Python :: 3.9 Classifier: Topic :: Software Development :: Build Tools Requires-Python: >=3.6 +Provides-Extra: ninja Provides-Extra: progress Provides-Extra: typing License-File: COPYING diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/meson.egg-info/SOURCES.txt new/meson-0.61.2/meson.egg-info/SOURCES.txt --- old/meson-0.61.1/meson.egg-info/SOURCES.txt 2022-01-17 11:52:11.000000000 +0100 +++ new/meson-0.61.2/meson.egg-info/SOURCES.txt 2022-02-14 20:23:55.000000000 +0100 @@ -1167,6 +1167,7 @@ test cases/common/210 link custom_i multiple from multiple/meson.build test cases/common/210 link custom_i multiple from multiple/prog.c test cases/common/211 dependency get_variable method/meson.build +test cases/common/211 dependency get_variable method/test.json test cases/common/212 source set configuration_data/a.c test cases/common/212 source set configuration_data/all.h test cases/common/212 source set configuration_data/f.c @@ -1850,6 +1851,10 @@ test cases/d/10 d cpp/meson.build test cases/d/11 dub/meson.build test cases/d/11 dub/test.d +test cases/d/12 root include directory/meson.build +test cases/d/12 root include directory/some/meson.build +test cases/d/12 root include directory/some/dlang/code.d +test cases/d/12 root include directory/some/dlang/meson.build test cases/d/2 static library/app.d test cases/d/2 static library/libstuff.d test cases/d/2 static library/meson.build @@ -3006,6 +3011,11 @@ test cases/rust/16 internal c dependencies/main.rs test cases/rust/16 internal c dependencies/meson.build test cases/rust/16 internal c dependencies/test.py +test cases/rust/17 staticlib link staticlib/branch.rs +test cases/rust/17 staticlib link staticlib/leaf.rs +test cases/rust/17 staticlib link staticlib/meson.build +test cases/rust/17 staticlib link staticlib/prog.c +test cases/rust/17 staticlib link staticlib/test.json test cases/rust/2 sharedlib/meson.build test cases/rust/2 sharedlib/prog.rs test cases/rust/2 sharedlib/stuff.rs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/meson.egg-info/requires.txt new/meson-0.61.2/meson.egg-info/requires.txt --- old/meson-0.61.1/meson.egg-info/requires.txt 2022-01-17 11:52:11.000000000 +0100 +++ new/meson-0.61.2/meson.egg-info/requires.txt 2022-02-14 20:23:55.000000000 +0100 @@ -1,4 +1,7 @@ +[ninja] +ninja>=1.8.2 + [progress] tqdm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/backend/backends.py new/meson-0.61.2/mesonbuild/backend/backends.py --- old/meson-0.61.1/mesonbuild/backend/backends.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/backend/backends.py 2022-02-14 20:03:13.000000000 +0100 @@ -1206,14 +1206,14 @@ def get_regen_filelist(self) -> T.List[str]: '''List of all files whose alteration means that the build definition needs to be regenerated.''' - deps = [str(Path(self.build_to_src) / df) - for df in self.interpreter.get_build_def_files()] + deps = OrderedSet([str(Path(self.build_to_src) / df) + for df in self.interpreter.get_build_def_files()]) if self.environment.is_cross_build(): - deps.extend(self.environment.coredata.cross_files) - deps.extend(self.environment.coredata.config_files) - deps.append('meson-private/coredata.dat') + deps.update(self.environment.coredata.cross_files) + deps.update(self.environment.coredata.config_files) + deps.add('meson-private/coredata.dat') self.check_clock_skew(deps) - return deps + return list(deps) def generate_regen_info(self) -> None: deps = self.get_regen_filelist() @@ -1225,7 +1225,7 @@ with open(filename, 'wb') as f: pickle.dump(regeninfo, f) - def check_clock_skew(self, file_list: T.List[str]) -> None: + def check_clock_skew(self, file_list: T.Iterable[str]) -> None: # If a file that leads to reconfiguration has a time # stamp in the future, it will trigger an eternal reconfigure # loop. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/backend/ninjabackend.py new/meson-0.61.2/mesonbuild/backend/ninjabackend.py --- old/meson-0.61.1/mesonbuild/backend/ninjabackend.py 2022-01-17 11:50:38.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/backend/ninjabackend.py 2022-02-14 20:03:13.000000000 +0100 @@ -735,6 +735,9 @@ self.introspection_data[name] = {} # Generate rules for all dependency targets self.process_target_dependencies(target) + + self.generate_shlib_aliases(target, self.get_target_dir(target)) + # If target uses a language that cannot link to C objects, # just generate for that language and return. if isinstance(target, build.Jar): @@ -899,7 +902,6 @@ final_obj_list = obj_list elem = self.generate_link(target, outname, final_obj_list, linker, pch_objects, stdlib_args=stdlib_args) self.generate_dependency_scan_target(target, compiled_sources, source2object, generated_source_files) - self.generate_shlib_aliases(target, self.get_target_dir(target)) self.add_build(elem) def should_use_dyndeps_for_target(self, target: 'build.BuildTarget') -> bool: @@ -1660,7 +1662,10 @@ self.generate_generator_list_rules(target) # dependencies need to cause a relink, they're not just for odering - deps = [os.path.join(t.subdir, t.get_filename()) for t in target.link_targets] + deps = [ + os.path.join(t.subdir, t.get_filename()) + for t in itertools.chain(target.link_targets, target.link_whole_targets) + ] orderdeps: T.List[str] = [] @@ -1704,14 +1709,15 @@ args.extend(rustc.get_linker_always_args()) args += self.generate_basic_compiler_args(target, rustc, False) - args += ['--crate-name', target.name] + # This matches rustc's default behavior. + args += ['--crate-name', target.name.replace('-', '_')] depfile = os.path.join(target.subdir, target.name + '.d') args += ['--emit', f'dep-info={depfile}', '--emit', 'link'] args += target.get_extra_args('rust') args += rustc.get_output_args(os.path.join(target.subdir, target.get_filename())) linkdirs = mesonlib.OrderedSet() external_deps = target.external_deps.copy() - for d in target.link_targets: + for d in itertools.chain(target.link_targets, target.link_whole_targets): linkdirs.add(d.subdir) if d.uses_rust(): # specify `extern CRATE_NAME=OUTPUT_FILE` for each Rust diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/compilers/d.py new/meson-0.61.2/mesonbuild/compilers/d.py --- old/meson-0.61.1/mesonbuild/compilers/d.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/compilers/d.py 2022-02-14 20:03:13.000000000 +0100 @@ -105,6 +105,8 @@ return ['-of=' + outputname] def get_include_args(self, path: str, is_system: bool) -> T.List[str]: + if path == "": + path = "." return ['-I=' + path] def compute_parameters_with_absolute_paths(self, parameter_list: T.List[str], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/coredata.py new/meson-0.61.2/mesonbuild/coredata.py --- old/meson-0.61.1/mesonbuild/coredata.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/coredata.py 2022-02-14 20:03:13.000000000 +0100 @@ -47,7 +47,7 @@ # # Pip requires that RCs are named like this: '0.1.0.rc1' # But the corresponding Git tag needs to be '0.1.0rc1' -version = '0.61.1' +version = '0.61.2' backendlist = ['ninja', 'vs', 'vs2010', 'vs2012', 'vs2013', 'vs2015', 'vs2017', 'vs2019', 'vs2022', 'xcode'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/interpreter/compiler.py new/meson-0.61.2/mesonbuild/interpreter/compiler.py --- old/meson-0.61.1/mesonbuild/interpreter/compiler.py 2021-12-26 17:24:25.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/interpreter/compiler.py 2022-02-14 20:03:13.000000000 +0100 @@ -189,8 +189,7 @@ def compiler(self) -> 'Compiler': return self.held_object - @staticmethod - def _dep_msg(deps: T.List['dependencies.Dependency'], endl: str) -> str: + def _dep_msg(self, deps: T.List['dependencies.Dependency'], endl: str) -> str: msg_single = 'with dependency {}' msg_many = 'with dependencies {}' if not deps: @@ -200,6 +199,8 @@ names = [] for d in deps: if isinstance(d, dependencies.InternalDependency): + FeatureNew.single_use('compiler method "dependencies" kwarg with internal dep', '0.57.0', self.subproject, + location=self.current_node) continue if isinstance(d, dependencies.ExternalLibrary): name = '-l' + d.name @@ -440,7 +441,7 @@ code.rel_to_builddir(self.environment.source_dir)) testname = kwargs['name'] extra_args = functools.partial(self._determine_args, kwargs['no_builtin_args'], kwargs['include_directories'], kwargs['args']) - deps, msg = self._determine_dependencies(kwargs['dependencies']) + deps, msg = self._determine_dependencies(kwargs['dependencies'], endl=None) result, cached = self.compiler.compiles(code, self.environment, extra_args=extra_args, dependencies=deps) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/interpreter/interpreter.py new/meson-0.61.2/mesonbuild/interpreter/interpreter.py --- old/meson-0.61.1/mesonbuild/interpreter/interpreter.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/interpreter/interpreter.py 2022-02-14 20:03:13.000000000 +0100 @@ -546,7 +546,7 @@ except KeyError: continue if len(di) == 1: - FeatureNew.single_use('stdlib without variable name', '0.56.0', self.subproject) + FeatureNew.single_use('stdlib without variable name', '0.56.0', self.subproject, location=self.current_node) kwargs = {'native': for_machine is MachineChoice.BUILD, } name = l + '_stdlib' @@ -608,11 +608,11 @@ variables = kwargs.get(argname, {}) if isinstance(variables, dict): if dict_new and variables: - FeatureNew.single_use('variables as dictionary', '0.56.0', self.subproject) + FeatureNew.single_use(f'{argname} as dictionary', '0.56.0', self.subproject, location=self.current_node) else: varlist = mesonlib.stringlistify(variables) if list_new: - FeatureNew.single_use('variables as list of strings', '0.56.0', self.subproject) + FeatureNew.single_use(f'{argname} as list of strings', '0.56.0', self.subproject, location=self.current_node) variables = collections.OrderedDict() for v in varlist: try: @@ -668,7 +668,7 @@ kwargs: 'TYPE_kwargs') -> None: value, message = args if message is None: - FeatureNew.single_use('assert function without message argument', '0.53.0', self.subproject) + FeatureNew.single_use('assert function without message argument', '0.53.0', self.subproject, location=node) if not value: if message is None: @@ -1018,7 +1018,7 @@ def func_configuration_data(self, node: mparser.BaseNode, args: T.Optional[dict], kwargs: 'TYPE_kwargs') -> ConfigurationDataObject: initial_values = args[0] if initial_values is not None: - FeatureNew.single_use('configuration_data dictionary', '0.49.0', self.subproject) + FeatureNew.single_use('configuration_data dictionary', '0.49.0', self.subproject, location=node) else: initial_values = {} return ConfigurationDataObject(self.subproject, initial_values) @@ -1105,7 +1105,7 @@ version = kwargs['version'] if isinstance(version, mesonlib.File): - FeatureNew.single_use('version from file', '0.57.0', self.subproject) + FeatureNew.single_use('version from file', '0.57.0', self.subproject, location=node) self.add_build_def_file(version) ifname = version.absolute_path(self.environment.source_dir, self.environment.build_dir) @@ -1202,7 +1202,7 @@ @noKwargs def func_message(self, node, args, kwargs): if len(args) > 1: - FeatureNew.single_use('message with more than one argument', '0.54.0', self.subproject) + FeatureNew.single_use('message with more than one argument', '0.54.0', self.subproject, location=node) args_str = [stringifyUserArguments(i) for i in args] self.message_impl(args_str) @@ -1278,7 +1278,7 @@ @noKwargs def func_warning(self, node, args, kwargs): if len(args) > 1: - FeatureNew.single_use('warning with more than one argument', '0.54.0', self.subproject) + FeatureNew.single_use('warning with more than one argument', '0.54.0', self.subproject, location=node) args_str = [stringifyUserArguments(i) for i in args] mlog.warning(*args_str, location=node) @@ -1286,7 +1286,7 @@ @noKwargs def func_error(self, node, args, kwargs): if len(args) > 1: - FeatureNew.single_use('error with more than one argument', '0.58.0', self.subproject) + FeatureNew.single_use('error with more than one argument', '0.58.0', self.subproject, location=node) args_str = [stringifyUserArguments(i) for i in args] raise InterpreterException('Problem encountered: ' + ' '.join(args_str)) @@ -1323,7 +1323,7 @@ # compilers we don't add anything for cython here, and instead do it # When the first cython target using a particular language is used. if 'vala' in langs and 'c' not in langs: - FeatureNew.single_use('Adding Vala language without C', '0.59.0', self.subproject) + FeatureNew.single_use('Adding Vala language without C', '0.59.0', self.subproject, location=self.current_node) args.append('c') success = True @@ -1655,14 +1655,12 @@ raise InterpreterException('Unknown target_type.') @permittedKwargs({'input', 'output', 'fallback', 'command', 'replace_string'}) - @FeatureDeprecatedKwargs('custom_target', '0.47.0', ['build_always'], - 'combine build_by_default and build_always_stale instead.') @noPosargs def func_vcs_tag(self, node, args, kwargs): if 'input' not in kwargs or 'output' not in kwargs: raise InterpreterException('Keyword arguments input and output must exist') if 'fallback' not in kwargs: - FeatureNew.single_use('Optional fallback in vcs_tag', '0.41.0', self.subproject) + FeatureNew.single_use('Optional fallback in vcs_tag', '0.41.0', self.subproject, location=node) fallback = kwargs.pop('fallback', self.project_version) if not isinstance(fallback, str): raise InterpreterException('Keyword argument fallback must be a string.') @@ -1707,8 +1705,8 @@ @typed_kwargs( 'custom_target', COMMAND_KW, - CT_BUILD_ALWAYS.evolve(deprecated='0.47.0'), - CT_BUILD_ALWAYS_STALE.evolve(since='0.47.0'), + CT_BUILD_ALWAYS, + CT_BUILD_ALWAYS_STALE, CT_BUILD_BY_DEFAULT, CT_INPUT_KW, CT_INSTALL_DIR_KW, @@ -1728,7 +1726,7 @@ def func_custom_target(self, node: mparser.FunctionNode, args: T.Tuple[str], kwargs: 'kwargs.CustomTarget') -> build.CustomTarget: if kwargs['depfile'] and ('@BASENAME@' in kwargs['depfile'] or '@PLAINNAME@' in kwargs['depfile']): - FeatureNew.single_use('substitutions in custom_target depfile', '0.47.0', self.subproject) + FeatureNew.single_use('substitutions in custom_target depfile', '0.47.0', self.subproject, location=node) # Don't mutate the kwargs kwargs = kwargs.copy() @@ -1877,7 +1875,7 @@ env = self.unpack_env_kwarg(kwargs) if kwargs['timeout'] <= 0: - FeatureNew.single_use('test() timeout <= 0', '0.57.0', self.subproject) + FeatureNew.single_use('test() timeout <= 0', '0.57.0', self.subproject, location=node) prj = self.subproject if self.is_subproject() else self.build.project_name @@ -2229,7 +2227,7 @@ if 'configuration' in kwargs: conf = kwargs['configuration'] if isinstance(conf, dict): - FeatureNew.single_use('configure_file.configuration dictionary', '0.49.0', self.subproject) + FeatureNew.single_use('configure_file.configuration dictionary', '0.49.0', self.subproject, location=node) conf = ConfigurationDataObject(self.subproject, conf) elif not isinstance(conf, ConfigurationDataObject): raise InterpreterException('Argument "configuration" is not of type configuration_data') @@ -2260,7 +2258,7 @@ conf.mark_used() elif 'command' in kwargs: if len(inputs) > 1: - FeatureNew.single_use('multiple inputs in configure_file()', '0.52.0', self.subproject) + FeatureNew.single_use('multiple inputs in configure_file()', '0.52.0', self.subproject, location=node) # We use absolute paths for input and output here because the cwd # that the command is run from is 'unspecified', so it could change. # Currently it's builddir/subdir for in_builddir else srcdir/subdir. @@ -2535,7 +2533,7 @@ kwargs: 'TYPE_kwargs') -> build.EnvironmentVariables: init = args[0] if init is not None: - FeatureNew.single_use('environment positional arguments', '0.52.0', self.subproject) + FeatureNew.single_use('environment positional arguments', '0.52.0', self.subproject, location=node) msg = ENV_KW.validator(init) if msg: raise InvalidArguments(f'"environment": {msg}') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/interpreter/interpreterobjects.py new/meson-0.61.2/mesonbuild/interpreter/interpreterobjects.py --- old/meson-0.61.1/mesonbuild/interpreter/interpreterobjects.py 2021-12-26 17:24:25.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/interpreter/interpreterobjects.py 2022-02-14 20:03:13.000000000 +0100 @@ -116,6 +116,7 @@ @noPosargs @noKwargs + @FeatureNew('feature_option.allowed()', '0.59.0') def allowed_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> bool: return self.value != 'disabled' @@ -124,6 +125,7 @@ def auto_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> bool: return self.value == 'auto' + @FeatureNew('feature_option.require()', '0.59.0') @permittedKwargs({'error_message'}) def require_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> coredata.UserFeatureOption: if len(args) != 1: @@ -144,6 +146,7 @@ raise InterpreterException(prefix + error_message) return self.as_disabled() + @FeatureNew('feature_option.disable_auto_if()', '0.59.0') @noKwargs def disable_auto_if_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> coredata.UserFeatureOption: if len(args) != 1: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/interpreter/mesonmain.py new/meson-0.61.2/mesonbuild/interpreter/mesonmain.py --- old/meson-0.61.1/mesonbuild/interpreter/mesonmain.py 2022-01-02 21:12:32.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/interpreter/mesonmain.py 2022-02-14 20:03:13.000000000 +0100 @@ -87,13 +87,13 @@ FeatureNew.single_use(f'Passing executable/found program object to script parameter of {name}', '0.55.0', self.subproject, location=self.current_node) largs.append(prog) - largs.extend(args) - return self.interpreter.backend.get_executable_serialisation(largs) - elif isinstance(prog, mesonlib.File): - FeatureNew.single_use(f'Passing file object to script parameter of {name}', - '0.57.0', self.subproject, location=self.current_node) - found = self.interpreter.find_program_impl([prog]) - largs.append(found) + else: + if isinstance(prog, mesonlib.File): + FeatureNew.single_use(f'Passing file object to script parameter of {name}', + '0.57.0', self.subproject, location=self.current_node) + found = self.interpreter.find_program_impl([prog]) + largs.append(found) + largs.extend(args) es = self.interpreter.backend.get_executable_serialisation(largs) es.subproject = self.interpreter.subproject @@ -133,7 +133,7 @@ FeatureNew.single_use( f'Calling "{name}" with File, CustomTarget, Index of CustomTarget, ' 'Executable, or ExternalProgram', - '0.55.0', self.interpreter.subproject) + '0.55.0', self.interpreter.subproject, location=self.current_node) return script_args @typed_pos_args( @@ -185,10 +185,10 @@ kwargs: 'TYPE_kwargs') -> None: if args[1]: FeatureNew.single_use('Calling "add_dist_script" with multiple arguments', - '0.49.0', self.interpreter.subproject) + '0.49.0', self.interpreter.subproject, location=self.current_node) if self.interpreter.subproject != '': FeatureNew.single_use('Calling "add_dist_script" in a subproject', - '0.58.0', self.interpreter.subproject) + '0.58.0', self.interpreter.subproject, location=self.current_node) script_args = self._process_script_args('add_dist_script', args[1]) script = self._find_source_script('add_dist_script', args[0], script_args) self.build.dist_scripts.append(script) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/interpreter/primitives/array.py new/meson-0.61.2/mesonbuild/interpreter/primitives/array.py --- old/meson-0.61.1/mesonbuild/interpreter/primitives/array.py 2021-11-02 20:58:13.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/interpreter/primitives/array.py 2022-02-14 20:03:13.000000000 +0100 @@ -94,7 +94,8 @@ def op_plus(self, other: TYPE_var) -> T.List[TYPE_var]: if not isinstance(other, list): if not isinstance(self.current_node, PlusAssignmentNode): - FeatureNew.single_use('list.<plus>', '0.60.0', self.subproject, 'The right hand operand was not a list.') + FeatureNew.single_use('list.<plus>', '0.60.0', self.subproject, 'The right hand operand was not a list.', + location=self.current_node) other = [other] return self.held_object + other diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/interpreter/type_checking.py new/meson-0.61.2/mesonbuild/interpreter/type_checking.py --- old/meson-0.61.1/mesonbuild/interpreter/type_checking.py 2021-12-26 17:24:25.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/interpreter/type_checking.py 2022-02-14 20:03:13.000000000 +0100 @@ -282,10 +282,16 @@ CT_BUILD_BY_DEFAULT: KwargInfo[T.Optional[bool]] = KwargInfo('build_by_default', (bool, type(None)), since='0.40.0') -CT_BUILD_ALWAYS: KwargInfo[T.Optional[bool]] = KwargInfo('build_always', (bool, NoneType)) +CT_BUILD_ALWAYS: KwargInfo[T.Optional[bool]] = KwargInfo( + 'build_always', (bool, NoneType), + deprecated='0.47.0', + deprecated_message='combine build_by_default and build_always_stale instead.', +) CT_BUILD_ALWAYS_STALE: KwargInfo[T.Optional[bool]] = KwargInfo( - 'build_always_stale', (bool, NoneType)) + 'build_always_stale', (bool, NoneType), + since='0.47.0', +) INCLUDE_DIRECTORIES: KwargInfo[T.List[T.Union[str, IncludeDirs]]] = KwargInfo( 'include_dirs', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/mcompile.py new/meson-0.61.2/mesonbuild/mcompile.py --- old/meson-0.61.1/mesonbuild/mcompile.py 2021-12-26 17:24:25.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/mcompile.py 2022-02-14 20:03:13.000000000 +0100 @@ -322,20 +322,18 @@ ) def run(options: 'argparse.Namespace') -> int: - cdata = coredata.load(options.wd) bdir = Path(options.wd) - buildfile = bdir / 'meson-private' / 'build.dat' - if not buildfile.is_file(): - raise MesonException(f'Directory {options.wd!r} does not seem to be a Meson build directory.') + validate_builddir(bdir) + if options.targets and options.clean: + raise MesonException('`TARGET` and `--clean` can\'t be used simultaneously') + + cdata = coredata.load(options.wd) b = build.load(options.wd) setup_vsenv(b.need_vsenv) cmd = [] # type: T.List[str] env = None # type: T.Optional[T.Dict[str, str]] - if options.targets and options.clean: - raise MesonException('`TARGET` and `--clean` can\'t be used simultaneously') - backend = cdata.get_option(mesonlib.OptionKey('backend')) assert isinstance(backend, str) if backend == 'ninja': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/mesonlib/universal.py new/meson-0.61.2/mesonbuild/mesonlib/universal.py --- old/meson-0.61.1/mesonbuild/mesonlib/universal.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/mesonlib/universal.py 2022-02-14 20:03:13.000000000 +0100 @@ -1416,7 +1416,7 @@ else: o = o.decode(errors='replace').replace('\r\n', '\n') if e is not None: - if sys.stderr.encoding: + if sys.stderr is not None and sys.stderr.encoding: e = e.decode(encoding=sys.stderr.encoding, errors='replace').replace('\r\n', '\n') else: e = e.decode(errors='replace').replace('\r\n', '\n') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/mesonmain.py new/meson-0.61.2/mesonbuild/mesonmain.py --- old/meson-0.61.1/mesonbuild/mesonmain.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/mesonmain.py 2022-02-14 20:03:13.000000000 +0100 @@ -152,6 +152,11 @@ if os.environ.get('MESON_FORCE_BACKTRACE'): raise return 1 + except PermissionError: + if os.environ.get('MESON_FORCE_BACKTRACE'): + raise + traceback.print_exc() + return 2 except Exception as e: if os.environ.get('MESON_FORCE_BACKTRACE'): raise diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/minstall.py new/meson-0.61.2/mesonbuild/minstall.py --- old/meson-0.61.1/mesonbuild/minstall.py 2022-01-17 11:50:38.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/minstall.py 2022-02-14 20:03:13.000000000 +0100 @@ -33,7 +33,7 @@ ) from .coredata import major_versions_differ, MesonVersionMismatchException from .coredata import version as coredata_version -from .mesonlib import Popen_safe, RealPathAction, is_windows, setup_vsenv +from .mesonlib import MesonException, Popen_safe, RealPathAction, is_windows, setup_vsenv from .scripts import depfixer, destdir_join from .scripts.meson_exe import run_exe try: @@ -427,13 +427,13 @@ makedirs: T.Optional[T.Tuple[T.Any, str]] = None) -> bool: outdir = os.path.split(to_file)[0] if not os.path.isfile(from_file) and not os.path.islink(from_file): - raise RuntimeError(f'Tried to install something that isn\'t a file: {from_file!r}') + raise MesonException(f'Tried to install something that isn\'t a file: {from_file!r}') # copyfile fails if the target file already exists, so remove it to # allow overwriting a previous install. If the target is not a file, we # want to give a readable error. if os.path.exists(to_file): if not os.path.isfile(to_file): - raise RuntimeError(f'Destination {to_file!r} already exists and is not a file') + raise MesonException(f'Destination {to_file!r} already exists and is not a file') if self.should_preserve_existing_file(from_file, to_file): append_to_log(self.lf, f'# Preserving old file {to_file}\n') self.preserved_file_count += 1 @@ -465,10 +465,10 @@ if not os.path.isabs(target): abs_target = os.path.join(full_dst_dir, target) if not os.path.exists(abs_target): - raise RuntimeError(f'Tried to install symlink to missing file {abs_target}') + raise MesonException(f'Tried to install symlink to missing file {abs_target}') if os.path.exists(link): if not os.path.islink(link): - raise RuntimeError(f'Destination {link!r} already exists and is not a symlink') + raise MesonException(f'Destination {link!r} already exists and is not a symlink') self.remove(link) if not self.printed_symlink_error: self.log(f'Installing symlink pointing to {target} to {link}') @@ -713,7 +713,7 @@ self.log(f'File {t.fname!r} not found, skipping') continue else: - raise RuntimeError(f'File {t.fname!r} could not be found') + raise MesonException(f'File {t.fname!r} could not be found') file_copied = False # not set when a directory is copied fname = check_for_stampfile(t.fname) outdir = get_destdir_path(destdir, fullprefix, t.outdir) @@ -725,7 +725,7 @@ install_name_mappings = t.install_name_mappings install_mode = t.install_mode if not os.path.exists(fname): - raise RuntimeError(f'File {fname!r} could not be found') + raise MesonException(f'File {fname!r} could not be found') elif os.path.isfile(fname): file_copied = self.do_copyfile(fname, outname, makedirs=(dm, outdir)) self.set_mode(outname, install_mode, d.install_umask) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/mesonbuild/modules/gnome.py new/meson-0.61.2/mesonbuild/modules/gnome.py --- old/meson-0.61.1/mesonbuild/modules/gnome.py 2022-01-17 11:50:38.000000000 +0100 +++ new/meson-0.61.2/mesonbuild/modules/gnome.py 2022-02-14 20:03:13.000000000 +0100 @@ -223,12 +223,13 @@ ] def annotations_validator(annotations: T.List[T.Union[str, T.List[str]]]) -> T.Optional[str]: - """Validate gdbus-codegen annotations argument""" badlist = 'must be made up of 3 strings for ELEMENT, KEY, and VALUE' - if all(isinstance(annot, str) for annot in annotations): + if not annotations: + return None + elif all(isinstance(annot, str) for annot in annotations): if len(annotations) == 3: return None else: @@ -360,7 +361,7 @@ rv.append(script) if kwargs['gtk_update_icon_cache'] and not self.install_gtk_update_icon_cache: self.install_gtk_update_icon_cache = True - prog = self._get_native_binary(state, 'gtk4-update-icon-cache', 'gtk-4.0', 'gtk4_update_icon_cache', required=False) + prog = self._get_native_binary(state, 'gtk4-update-icon-cache', 'gtk4', 'gtk4_update_icon_cache', required=False) found = isinstance(prog, build.Executable) or prog.found() if not found: prog = self._get_native_binary(state, 'gtk-update-icon-cache', 'gtk+-3.0', 'gtk_update_icon_cache') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/packaging/createmsi.py new/meson-0.61.2/packaging/createmsi.py --- old/meson-0.61.1/packaging/createmsi.py 2022-01-09 21:49:57.000000000 +0100 +++ new/meson-0.61.2/packaging/createmsi.py 2022-02-14 20:03:13.000000000 +0100 @@ -72,6 +72,7 @@ 'distutils.version', 'distutils.command.build_ext', 'distutils.command.build', + 'distutils.command.install', 'filecmp', ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/run_unittests.py new/meson-0.61.2/run_unittests.py --- old/meson-0.61.1/run_unittests.py 2021-12-26 17:24:25.000000000 +0100 +++ new/meson-0.61.2/run_unittests.py 2022-02-14 20:03:13.000000000 +0100 @@ -122,13 +122,16 @@ try: import pytest # noqa: F401 - # Need pytest-xdist for `-n` arg - import xdist # noqa: F401 pytest_args = [] - # Don't use pytest-xdist when running single unit tests since it wastes - # time spawning a lot of processes to distribute tests to in that case. - if not running_single_tests(sys.argv, cases): - pytest_args += ['-n', 'auto'] + try: + # Need pytest-xdist for `-n` arg + import xdist # noqa: F401 + # Don't use pytest-xdist when running single unit tests since it wastes + # time spawning a lot of processes to distribute tests to in that case. + if not running_single_tests(sys.argv, cases): + pytest_args += ['-n', 'auto'] + except ImportError: + print('pytest-xdist not found, tests will not be distributed across CPU cores') # Let there be colors! if 'CI' in os.environ: pytest_args += ['--color=yes'] @@ -143,7 +146,7 @@ pass return subprocess.run(python_command + ['-m', 'pytest'] + pytest_args).returncode except ImportError: - print('pytest-xdist not found, using unittest instead') + print('pytest not found, using unittest instead') # Fallback to plain unittest. return unittest.main(defaultTest=cases, buffer=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/setup.cfg new/meson-0.61.2/setup.cfg --- old/meson-0.61.1/setup.cfg 2022-01-17 11:52:18.275322200 +0100 +++ new/meson-0.61.2/setup.cfg 2022-02-14 20:24:02.893610000 +0100 @@ -41,6 +41,8 @@ meson = mesonbuild.mesonmain:main [options.extras_require] +ninja = + ninja>=1.8.2 progress = tqdm typing = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/common/211 dependency get_variable method/meson.build" "new/meson-0.61.2/test cases/common/211 dependency get_variable method/meson.build" --- "old/meson-0.61.1/test cases/common/211 dependency get_variable method/meson.build" 2021-10-23 18:50:29.000000000 +0200 +++ "new/meson-0.61.2/test cases/common/211 dependency get_variable method/meson.build" 2022-02-14 20:03:13.000000000 +0100 @@ -19,6 +19,7 @@ 'pkg-config didn\'t get default when we should have.') assert(dep.get_variable(pkgconfig : 'prefix', default_value : default) != default, 'pkg-config got default when we shouldn\'t have.') + assert(dep.get_variable(pkgconfig : 'pkgvarnotfound', default_value : '') == '') endif dep_ct = dependency('llvm', method : 'config-tool', required : false) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/common/211 dependency get_variable method/test.json" "new/meson-0.61.2/test cases/common/211 dependency get_variable method/test.json" --- "old/meson-0.61.1/test cases/common/211 dependency get_variable method/test.json" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/common/211 dependency get_variable method/test.json" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1,9 @@ +{ + "stdout": [ + { + "line": ".*pkgvarnotfound.*", + "match": "re", + "count": 0 + } + ] + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/d/12 root include directory/meson.build" "new/meson-0.61.2/test cases/d/12 root include directory/meson.build" --- "old/meson-0.61.1/test cases/d/12 root include directory/meson.build" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/d/12 root include directory/meson.build" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1,7 @@ +project('some', 'd') + +project_dep = declare_dependency( + include_directories: ['.'], +) +subdir('some') + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/d/12 root include directory/some/dlang/code.d" "new/meson-0.61.2/test cases/d/12 root include directory/some/dlang/code.d" --- "old/meson-0.61.1/test cases/d/12 root include directory/some/dlang/code.d" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/d/12 root include directory/some/dlang/code.d" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1,7 @@ +void foo() {} + +version (Windows) +{ + import core.sys.windows.dll; + mixin SimpleDllMain; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/d/12 root include directory/some/dlang/meson.build" "new/meson-0.61.2/test cases/d/12 root include directory/some/dlang/meson.build" --- "old/meson-0.61.1/test cases/d/12 root include directory/some/dlang/meson.build" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/d/12 root include directory/some/dlang/meson.build" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1,8 @@ +code_lib = library('code', + ['code.d'], + dependencies: [project_dep]) + +code_dep = declare_dependency( + link_with: code_lib, + dependencies: project_dep +) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/d/12 root include directory/some/meson.build" "new/meson-0.61.2/test cases/d/12 root include directory/some/meson.build" --- "old/meson-0.61.1/test cases/d/12 root include directory/some/meson.build" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/d/12 root include directory/some/meson.build" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1 @@ +subdir('dlang') \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/frameworks/7 gnome/gdbus/meson.build" "new/meson-0.61.2/test cases/frameworks/7 gnome/gdbus/meson.build" --- "old/meson-0.61.1/test cases/frameworks/7 gnome/gdbus/meson.build" 2022-01-17 11:50:38.000000000 +0100 +++ "new/meson-0.61.2/test cases/frameworks/7 gnome/gdbus/meson.build" 2022-02-14 20:03:13.000000000 +0100 @@ -6,6 +6,16 @@ ['com.example.Hello()', 'org.freedesktop.DBus.Deprecated', 'true'] ], ) + +# check that empty annotations work +gdbus_src2 = gnome.gdbus_codegen( + 'generated-gdbus-no-docbook2', + 'data/com.example.Sample.xml', + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [], +) + assert(gdbus_src.length() == 2, 'expected 2 targets') assert(gdbus_src[0].full_path().endswith('.c'), 'expected 1 c source file') assert(gdbus_src[1].full_path().endswith('.h'), 'expected 1 c header file') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/rust/1 basic/meson.build" "new/meson-0.61.2/test cases/rust/1 basic/meson.build" --- "old/meson-0.61.1/test cases/rust/1 basic/meson.build" 2021-10-23 18:53:23.000000000 +0200 +++ "new/meson-0.61.2/test cases/rust/1 basic/meson.build" 2022-02-14 20:03:13.000000000 +0100 @@ -1,6 +1,6 @@ project('rustprog', 'rust') -e = executable('program', 'prog.rs', +e = executable('rust-program', 'prog.rs', rust_args : ['-C', 'lto'], # Just a test install : true ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/rust/1 basic/subdir/meson.build" "new/meson-0.61.2/test cases/rust/1 basic/subdir/meson.build" --- "old/meson-0.61.1/test cases/rust/1 basic/subdir/meson.build" 2020-08-15 18:27:05.000000000 +0200 +++ "new/meson-0.61.2/test cases/rust/1 basic/subdir/meson.build" 2022-02-14 20:03:13.000000000 +0100 @@ -1,2 +1,2 @@ -e = executable('program2', 'prog.rs', install : true) +e = executable('rust-program2', 'prog.rs', install : true) test('rusttest2', e) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/rust/1 basic/test.json" "new/meson-0.61.2/test cases/rust/1 basic/test.json" --- "old/meson-0.61.1/test cases/rust/1 basic/test.json" 2020-08-15 18:27:05.000000000 +0200 +++ "new/meson-0.61.2/test cases/rust/1 basic/test.json" 2022-02-14 20:03:13.000000000 +0100 @@ -1,8 +1,8 @@ { "installed": [ - {"type": "exe", "file": "usr/bin/program"}, - {"type": "pdb", "file": "usr/bin/program"}, - {"type": "exe", "file": "usr/bin/program2"}, - {"type": "pdb", "file": "usr/bin/program2"} + {"type": "exe", "file": "usr/bin/rust-program"}, + {"type": "pdb", "file": "usr/bin/rust-program"}, + {"type": "exe", "file": "usr/bin/rust-program2"}, + {"type": "pdb", "file": "usr/bin/rust-program2"} ] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/branch.rs" "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/branch.rs" --- "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/branch.rs" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/branch.rs" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1,4 @@ +#[no_mangle] +pub extern "C" fn what_have_we_here() -> i32 { + leaf::HOW_MANY * leaf::HOW_MANY +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/leaf.rs" "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/leaf.rs" --- "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/leaf.rs" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/leaf.rs" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1 @@ +pub const HOW_MANY: i32 = 5; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/meson.build" "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/meson.build" --- "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/meson.build" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/meson.build" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1,8 @@ +project('staticlib link staticlib', 'c', 'rust') + +leaf = static_library('leaf', 'leaf.rs', rust_crate_type : 'rlib') +# Even though leaf is linked using link_with, this gets implicitly promoted to link_whole because +# it is an internal Rust project. +branch = static_library('branch', 'branch.rs', link_with: leaf, rust_crate_type : 'staticlib', install : true) +e = executable('prog', 'prog.c', link_with : branch, install : true) +test('linktest', e) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/prog.c" "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/prog.c" --- "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/prog.c" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/prog.c" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1,7 @@ +#include <stdio.h> + +int what_have_we_here(); + +int main(void) { + printf("printing %d\n", what_have_we_here()); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/test.json" "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/test.json" --- "old/meson-0.61.1/test cases/rust/17 staticlib link staticlib/test.json" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.61.2/test cases/rust/17 staticlib link staticlib/test.json" 2022-02-14 20:03:13.000000000 +0100 @@ -0,0 +1,7 @@ +{ + "installed": [ + {"type": "exe", "file": "usr/bin/prog"}, + {"type": "pdb", "file": "usr/bin/prog"}, + {"type": "file", "file": "usr/lib/libbranch.a"} + ] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.61.1/test cases/warning/6 list add/test.json" "new/meson-0.61.2/test cases/warning/6 list add/test.json" --- "old/meson-0.61.1/test cases/warning/6 list add/test.json" 2021-11-02 20:58:07.000000000 +0100 +++ "new/meson-0.61.2/test cases/warning/6 list add/test.json" 2022-02-14 20:03:13.000000000 +0100 @@ -1,7 +1,7 @@ { "stdout": [ { - "line": "WARNING: Project targeting '>=0.59.0' but tried to use feature introduced in '0.60.0': list.<plus>. The right hand operand was not a list." + "line": "test cases/warning/6 list add/meson.build:4: WARNING: Project targeting '>=0.59.0' but tried to use feature introduced in '0.60.0': list.<plus>. The right hand operand was not a list." } ] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/unittests/allplatformstests.py new/meson-0.61.2/unittests/allplatformstests.py --- old/meson-0.61.1/unittests/allplatformstests.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/unittests/allplatformstests.py 2022-02-14 20:03:13.000000000 +0100 @@ -2369,7 +2369,7 @@ endian = 'little' '''.format(os.path.join(testdir, 'cross_pkgconfig.py')))) crossfile.flush() - self.meson_cross_file = crossfile.name + self.meson_cross_files = [crossfile.name] env = {'PKG_CONFIG_LIBDIR': os.path.join(testdir, 'native_pkgconfig')} @@ -2397,7 +2397,7 @@ endian = 'little' '''.format(os.path.join(testdir, 'cross_pkgconfig')))) crossfile.flush() - self.meson_cross_file = crossfile.name + self.meson_cross_files = [crossfile.name] env = {'PKG_CONFIG_LIBDIR': os.path.join(testdir, 'native_pkgconfig')} @@ -2631,8 +2631,8 @@ testdir = os.path.join(self.unit_test_dir, '70 cross') # Do a build to generate a cross file where the host is this target self.init(testdir, extra_args=['-Dgenerate=true']) - self.meson_cross_file = os.path.join(self.builddir, "crossfile") - self.assertTrue(os.path.exists(self.meson_cross_file)) + self.meson_cross_files = [os.path.join(self.builddir, "crossfile")] + self.assertTrue(os.path.exists(self.meson_cross_files[0])) # Now verify that this is detected as cross self.new_builddir() self.init(testdir) @@ -3601,14 +3601,14 @@ ''')) # Test native C stdlib - self.meson_native_file = machinefile + self.meson_native_files = [machinefile] self.init(testdir) self.build() # Test cross C stdlib self.new_builddir() - self.meson_native_file = None - self.meson_cross_file = machinefile + self.meson_native_files = [] + self.meson_cross_files = [machinefile] self.init(testdir) self.build() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/unittests/baseplatformtests.py new/meson-0.61.2/unittests/baseplatformtests.py --- old/meson-0.61.1/unittests/baseplatformtests.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/unittests/baseplatformtests.py 2022-02-14 20:03:13.000000000 +0100 @@ -56,8 +56,8 @@ # Get the backend self.backend = getattr(Backend, os.environ['MESON_UNIT_TEST_BACKEND']) self.meson_args = ['--backend=' + self.backend.name] - self.meson_native_file = None - self.meson_cross_file = None + self.meson_native_files = [] + self.meson_cross_files = [] self.meson_command = python_command + [get_meson_script()] self.setup_command = self.meson_command + self.meson_args self.mconf_command = self.meson_command + ['configure'] @@ -192,10 +192,10 @@ args += ['--prefix', self.prefix] if self.libdir: args += ['--libdir', self.libdir] - if self.meson_native_file: - args += ['--native-file', self.meson_native_file] - if self.meson_cross_file: - args += ['--cross-file', self.meson_cross_file] + for f in self.meson_native_files: + args += ['--native-file', f] + for f in self.meson_cross_files: + args += ['--cross-file', f] self.privatedir = os.path.join(self.builddir, 'meson-private') if inprocess: try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/unittests/helpers.py new/meson-0.61.2/unittests/helpers.py --- old/meson-0.61.1/unittests/helpers.py 2022-01-17 11:50:38.000000000 +0100 +++ new/meson-0.61.2/unittests/helpers.py 2022-02-14 20:03:13.000000000 +0100 @@ -17,7 +17,7 @@ def is_ci(): - if 'CI' in os.environ: + if 'MESON_CI_JOBNAME' in os.environ: return True return False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/unittests/linuxcrosstests.py new/meson-0.61.2/unittests/linuxcrosstests.py --- old/meson-0.61.1/unittests/linuxcrosstests.py 2021-11-02 20:58:07.000000000 +0100 +++ new/meson-0.61.2/unittests/linuxcrosstests.py 2022-02-14 20:03:13.000000000 +0100 @@ -44,7 +44,7 @@ def setUp(self): super().setUp() - self.meson_cross_file = os.path.join(self.src_root, 'cross', 'ubuntu-armhf.txt') + self.meson_cross_files = [os.path.join(self.src_root, 'cross', 'ubuntu-armhf.txt')] def test_cflags_cross_environment_pollution(self): ''' @@ -66,7 +66,7 @@ https://github.com/mesonbuild/meson/issues/3089 ''' testdir = os.path.join(self.unit_test_dir, '33 cross file overrides always args') - self.meson_cross_file = os.path.join(testdir, 'ubuntu-armhf-overrides.txt') + self.meson_cross_files = [os.path.join(testdir, 'ubuntu-armhf-overrides.txt')] self.init(testdir) compdb = self.get_compdb() self.assertRegex(compdb[0]['command'], '-D_FILE_OFFSET_BITS=64.*-U_FILE_OFFSET_BITS') @@ -137,7 +137,7 @@ def setUp(self): super().setUp() - self.meson_cross_file = os.path.join(self.src_root, 'cross', 'linux-mingw-w64-64bit.txt') + self.meson_cross_files = [os.path.join(self.src_root, 'cross', 'linux-mingw-w64-64bit.txt')] def test_exe_wrapper_behaviour(self): ''' @@ -154,7 +154,7 @@ self.wipe() os.mkdir(self.builddir) # Change cross file to use a non-existing exe_wrapper and it should fail - self.meson_cross_file = os.path.join(testdir, 'broken-cross.txt') + self.meson_cross_files = [os.path.join(testdir, 'broken-cross.txt')] # Force tracebacks so we can detect them properly env = {'MESON_FORCE_BACKTRACE': '1'} error_message = "An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/unittests/linuxliketests.py new/meson-0.61.2/unittests/linuxliketests.py --- old/meson-0.61.1/unittests/linuxliketests.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/unittests/linuxliketests.py 2022-02-14 20:03:13.000000000 +0100 @@ -1030,7 +1030,7 @@ endian = 'little' ''')) crossfile.flush() - self.meson_cross_file = crossfile.name + self.meson_cross_files = [crossfile.name] self.init(testdir) def test_reconfigure(self): @@ -1501,21 +1501,28 @@ def test_identity_cross(self): testdir = os.path.join(self.unit_test_dir, '61 identity cross') + constantsfile = tempfile.NamedTemporaryFile(mode='w') + constantsfile.write(textwrap.dedent('''\ + [constants] + py_ext = '.py' + ''')) + constantsfile.flush() + nativefile = tempfile.NamedTemporaryFile(mode='w') nativefile.write(textwrap.dedent('''\ [binaries] - c = ['{}'] - '''.format(os.path.join(testdir, 'build_wrapper.py')))) + c = ['{}' + py_ext] + '''.format(os.path.join(testdir, 'build_wrapper')))) nativefile.flush() - self.meson_native_file = nativefile.name + self.meson_native_files = [constantsfile.name, nativefile.name] crossfile = tempfile.NamedTemporaryFile(mode='w') crossfile.write(textwrap.dedent('''\ [binaries] - c = ['{}'] - '''.format(os.path.join(testdir, 'host_wrapper.py')))) + c = ['{}' + py_ext] + '''.format(os.path.join(testdir, 'host_wrapper')))) crossfile.flush() - self.meson_cross_file = crossfile.name + self.meson_cross_files = [constantsfile.name, crossfile.name] # TODO should someday be explicit about build platform only here self.init(testdir) @@ -1531,7 +1538,7 @@ c = ['{}'] '''.format(os.path.join(testdir, 'host_wrapper.py')))) crossfile.flush() - self.meson_cross_file = crossfile.name + self.meson_cross_files = [crossfile.name] # TODO should someday be explicit about build platform only here self.init(testdir, override_envvars=env) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.61.1/unittests/rewritetests.py new/meson-0.61.2/unittests/rewritetests.py --- old/meson-0.61.1/unittests/rewritetests.py 2022-01-17 11:50:45.000000000 +0100 +++ new/meson-0.61.2/unittests/rewritetests.py 2022-02-14 20:03:13.000000000 +0100 @@ -15,9 +15,10 @@ import subprocess import json import os +import shutil import unittest -from distutils.dir_util import copy_tree +from mesonbuild.mesonlib import windows_proof_rmtree from .baseplatformtests import BasePlatformTests class RewriterTests(BasePlatformTests): @@ -26,7 +27,9 @@ self.maxDiff = None def prime(self, dirname): - copy_tree(os.path.join(self.rewrite_test_dir, dirname), self.builddir) + if os.path.exists(self.builddir): + windows_proof_rmtree(self.builddir) + shutil.copytree(os.path.join(self.rewrite_test_dir, dirname), self.builddir) def rewrite_raw(self, directory, args): if isinstance(args, str):