summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-09-29 13:55:29 -0400
committerColin Walters <walters@verbum.org>2010-09-29 14:26:30 -0400
commitef84d840a7822c20f30fe7a93526713acfabd57a (patch)
treed479c8318ea47dd5e1c99ef7f4691396c57d2e11 /giscanner/maintransformer.py
parentefa132538fde19eb2ce5e93866bbbff26a0d09ff (diff)
downloadgobject-introspection-ef84d840a7822c20f30fe7a93526713acfabd57a.tar.gz
scanner: Abort if we would be generating an empty namespace
Kind of silly we weren't doing this before; an empty namespace is always going to be unintentional. The "oops I forgot to include .h" files actually happened with Clutter, but it wasn't caught since the build didn't obviously fail.
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index e45ff795..89f7ff65 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -47,6 +47,12 @@ class MainTransformer(object):
# Public API
def transform(self):
+ contents = list(self._namespace.itervalues())
+ if len(contents) == 0:
+ message.fatal("""Namespace is empty; likely causes are:
+* Not including .h files to be scanned
+* Broken --identifier-prefix
+""")
## WORKAROUND ##
# Dirty hack for now...maybe eventually we'll support the "typedef GSList FooSet"
# pattern.