Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail fast on schema lookup failures #1357

Merged
merged 1 commit into from
May 8, 2024
Merged

Fail fast on schema lookup failures #1357

merged 1 commit into from
May 8, 2024

Conversation

lunaris
Copy link
Contributor

@lunaris lunaris commented May 7, 2024

Presently, if an input program is ill-formed (e.g. refers to attributes that do not appear in the schema), we will generate an ill-formed output program instead of failing with an error. Specifically we will generate Java code containing PANICs where we fail to dereference nils picked up as a result of failed schema lookups. This commit fixes this behaviour so that Java code generation proceeds as we do for other languages -- validating schema lookups and failing outright instead of generating ill-formed programs.

@lunaris lunaris requested a review from a team May 7, 2024 15:59
Presently, if an input program is ill-formed (e.g. refers to attributes
that do not appear in the schema), we will generate an ill-formed output
program instead of failing with an error. Specifically we will generate
Java code containing `PANIC`s where we fail to dereference `nil`s picked
up as a result of failed schema lookups. This commit fixes this
behaviour so that Java code generation proceeds as we do for other
languages -- validating schema lookups and failing outright instead of
generating ill-formed programs.
@lunaris lunaris merged commit b69848a into main May 8, 2024
22 checks passed
@lunaris lunaris deleted the wjones/no-emit-panic branch May 8, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment