diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-03-10 07:17:58 +0000 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-03-10 18:07:32 +0200 |
commit | 8ca2cf03a5529281c02a888775b03ccc5524a4d8 (patch) | |
tree | be2b693270cbd55ae7fbac9db487500cda773a67 | |
parent | e4ec7989e87546a35ad8e0abb1a724c8d1fbf553 (diff) | |
download | meson-8ca2cf03a5529281c02a888775b03ccc5524a4d8.zip meson-8ca2cf03a5529281c02a888775b03ccc5524a4d8.tar.gz meson-8ca2cf03a5529281c02a888775b03ccc5524a4d8.tar.bz2 |
Show info about possible subproject promotion when appropriate
Move call to print_nested_info down into do_subproject()
So we don't print info about possible subproject promotion unless subproject
failure is due to directory non-existence
And we do do that for subproject('foo'), as well as for dependency(fallback:
['foo', ...])
-rw-r--r-- | mesonbuild/interpreter.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 1bb8aab..c6503ed 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1771,6 +1771,12 @@ external dependencies (including libraries) must go to "dependencies".''') try: resolved = r.resolve(dirname) except RuntimeError as e: + # if the reason subproject execution failed was because + # the directory doesn't exist, try to give some helpful + # advice if it's a nested subproject that needs + # promotion... + self.print_nested_info(dirname) + msg = 'Subproject directory {!r} does not exist and cannot be downloaded:\n{}' raise InterpreterException(msg.format(os.path.join(self.subproject_dir, dirname), e)) subdir = os.path.join(self.subproject_dir, resolved) @@ -2317,7 +2323,6 @@ to directly access options of other subprojects.''') # we won't actually read all the build files. return fallback_dep if not dep: - self.print_nested_info(name) assert(exception is not None) raise exception |