This patch modifies the code generator to only generate C-language #include <imported_schema.h> lines for imports that are actually used.
Imagine this transitive import scenario: schema A imports a definition from schema B. However, the definition imported from schema B was itself imported from schema C.
In this case, the code generated for schema A need not include the header file for schema B, as it only needs definitions from schema C.
This patch modifies the code generator to only generate C-language
#include <imported_schema.h>
lines for imports that are actually used.Imagine this transitive import scenario: schema A imports a definition from schema B. However, the definition imported from schema B was itself imported from schema C.
In this case, the code generated for schema A need not include the header file for schema B, as it only needs definitions from schema C.