From ab3aeeffe92bc874d5f5a04af0ae9dc568a09ce7 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 29 Dec 2018 14:51:15 +0200 Subject: Print warning if using "default_options" without a "fallback". --- mesonbuild/interpreter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 0571eba..bbc98d4 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3070,6 +3070,8 @@ external dependencies (including libraries) must go to "dependencies".''') if disabled: mlog.log('Dependency', mlog.bold(display_name), 'skipped: feature', mlog.bold(feature), 'disabled') return DependencyHolder(NotFoundDependency(self.environment), self.subproject) + if'default_options' in kwargs and 'fallback' not in kwargs: + mlog.warning('The "default_options" keyworg argument does nothing without a "fallback" keyword argument.') # writing just "dependency('')" is an error, because it can only fail if name == '' and required and 'fallback' not in kwargs: -- cgit v1.1