summaryrefslogtreecommitdiff
path: root/buildscripts/idl
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2018-12-18 12:19:09 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2018-12-18 12:19:09 -0500
commit9af799a2ea8419e5836cf7c10e45872b5b79bf0e (patch)
tree81e657e18d641b29d38377cc7654ba5ef0ea9871 /buildscripts/idl
parentcb3781cc41ac45a906107f83c8e17f6227e7c414 (diff)
downloadmongo-9af799a2ea8419e5836cf7c10e45872b5b79bf0e.tar.gz
SERVER-38446 idlc.py fails to report errors correct during dependency analysis
Diffstat (limited to 'buildscripts/idl')
-rw-r--r--buildscripts/idl/idl/compiler.py10
-rw-r--r--buildscripts/idl/idl/errors.py3
2 files changed, 7 insertions, 6 deletions
diff --git a/buildscripts/idl/idl/compiler.py b/buildscripts/idl/idl/compiler.py
index 8b2b6c1ee5b..7b1485f63ff 100644
--- a/buildscripts/idl/idl/compiler.py
+++ b/buildscripts/idl/idl/compiler.py
@@ -201,12 +201,12 @@ def compile_idl(args):
parsed_doc = parser.parse(file_stream, args.input_file,
CompilerImportResolver(args.import_directories))
- # Stop compiling if we only need to scan import dependencies
- if args.write_dependencies:
- _write_dependencies(parsed_doc.spec)
- return True
-
if not parsed_doc.errors:
+ # Stop compiling if we only need to scan import dependencies
+ if args.write_dependencies:
+ _write_dependencies(parsed_doc.spec)
+ return True
+
_update_import_includes(args, parsed_doc.spec, header_file_name)
bound_doc = binder.bind(parsed_doc.spec)
diff --git a/buildscripts/idl/idl/errors.py b/buildscripts/idl/idl/errors.py
index d294b1bbd0e..ed5ff18c204 100644
--- a/buildscripts/idl/idl/errors.py
+++ b/buildscripts/idl/idl/errors.py
@@ -183,9 +183,10 @@ class ParserErrorCollection(object):
def dump_errors(self):
# type: () -> None
"""Print the list of errors."""
- ', '.join(self.to_list())
+ print("Errors found while compiling IDL")
for error_msg in self.to_list():
print("%s\n\n" % error_msg)
+ print("Found %s errors" % (len(self.to_list())))
def count(self):
# type: () -> int