You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fail generation when a required template cannot render #695
Observed while validating #694 at ca72b9a plus local producer-template changes.
xrcg generate can log a template rendering exception, omit the corresponding generated file, and still return exit code 0.
Reproducer:
Use a catalog with one CloudEvents message and an Avro payload schema.
Generate --language ts --style producerhttp.
The existing src/types/_index.ts.jinja calls the unavailable stack() function.
The generator logs:
Template Rendering Error in src/types/_index.ts.jinja
jinja2.exceptions.UndefinedError: 'stack' is undefined
Yet assert xrcg.cli() == 0 succeeds. The generation regression that searches other generated sources for a schema URI also passes despite the missing file.
Expected: any failed required template causes a nonzero CLI exit code and an explicit failure result. Incomplete output must not be reported as a successful generation.
The stale TypeScript HTTP type-export template is being corrected in #696 as part of compiling its constructor-override API. This issue concerns propagation of rendering failures, independently of that template.
Activity
Add instance-local dataschema URI overrides to generated producers
Add instance-local dataschema URI overrides to generated producers
Add runtime dataschema URI overrides to generated producers (#696)