From 4406649a4b62f10f2e1a1433727a651c9c7257fb Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 20 Aug 2024 12:50:27 +0300 Subject: [PATCH] temporary logs Signed-off-by: Andrei Horodniceanu --- mesonbuild/dependencies/dub.py | 13 +++++++++++++ test cases/d/17 dub and meson project/meson.build | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/mesonbuild/dependencies/dub.py b/mesonbuild/dependencies/dub.py index 491703b186fc..da0286fb9299 100644 --- a/mesonbuild/dependencies/dub.py +++ b/mesonbuild/dependencies/dub.py @@ -347,6 +347,8 @@ def get_build_command() -> T.List[str]: helper_build = join_args(get_build_command()) source = DubDescriptionSource.Local ret, res, err = self._call_dubbin(describe_cmd) + mlog.log("Plain description:") + mlog.log(res) if ret == 0: return (json.loads(res), helper_build, source) @@ -366,6 +368,8 @@ def get_build_command() -> T.List[str]: helper_build = join_args(get_build_command() + [pack_spec]) source = DubDescriptionSource.External ret, res, err = self._call_dubbin(describe_cmd) + mlog.log("Direct description:") + mlog.log(res) if ret == 0: return (json.loads(res), helper_build, source) @@ -383,6 +387,14 @@ def _find_target_in_cache(self, desc: DubDescription, pkg_desc: DubPackDesc, tgt_desc: DubTargetDesc, dub_comp_id: str ) -> T.Tuple[T.Optional[str], T.Set[str]]: mlog.debug('Searching in DUB cache for compatible', pkg_desc['targetFileName']) + mlog.log('Description:') + mlog.log(desc) + mlog.log('pkg_desc:') + mlog.log(pkg_desc) + mlog.log('tgt_desc:') + mlog.log(tgt_desc) + mlog.log('comp_id:') + mlog.log(dub_comp_id) # recent DUB versions include a direct path to a compatible cached artifact if self._use_cache_describe: @@ -499,6 +511,7 @@ def _get_comp_versions_to_find(self, dub_comp_id: str) -> T.List[str]: def _call_dubbin(self, args: T.List[str], env: T.Optional[T.Dict[str, str]] = None) -> T.Tuple[int, str, str]: assert isinstance(self.dubbin, ExternalProgram) + mlog.log("Calling:", self.dubbin.get_command() + args, 'in', self.env.get_source_dir()) p, out, err = Popen_safe(self.dubbin.get_command() + args, env=env, cwd=self.env.get_source_dir()) return p.returncode, out.strip(), err.strip() diff --git a/test cases/d/17 dub and meson project/meson.build b/test cases/d/17 dub and meson project/meson.build index 8bc7d83e74a4..7ff4cdb88032 100644 --- a/test cases/d/17 dub and meson project/meson.build +++ b/test cases/d/17 dub and meson project/meson.build @@ -10,6 +10,10 @@ if not dub_ver.version_compare('>=1.35.0') error('MESON_SKIP_TEST: test requires dub >=1.35.0') endif +message('Build targets') +run_command('bash', '-c', 'ls -R ~/.dub/cache', check: true) +run_command('bash', '-c', 'find ~/.dub/cache -name db.json -print -execdir cat {} \;', check: true) + # Multiple versions supported urld = dependency('urld', method: 'dub', version: [ '>=3.0.0', '<3.0.1' ])