0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-29 16:47:28 +01:00

SERVER-58948 update idl_tool to support generated idl files

This commit is contained in:
Daniel Moody 2021-07-29 10:16:59 -05:00 committed by Evergreen Agent
parent ba892c6dcc
commit 2393de29ec

View File

@ -75,11 +75,15 @@ def idl_scanner(node, env, path):
for i in range(len(flags)):
if flags[i] == "--include":
include_paths.append(flags[i + 1])
resolver = idlc.CompilerImportResolver(include_paths)
with open(str(node), encoding="utf-8") as file_stream:
parsed_doc = idlc.parser.parse(
file_stream, str(node), idlc.CompilerImportResolver(include_paths)
)
try:
with open(str(node), encoding="utf-8") as file_stream:
parsed_doc = idlc.parser.parse(
file_stream, str(node), resolver
)
except OSError:
return nodes_deps_list
if not parsed_doc.errors and parsed_doc.spec.imports is not None:
nodes_deps_list.extend(