Lack of zmodel schema error warnings
Description and expected behavior A clear and concise description of what the bug is and what's the expected behavior.
Twice, I've run into scenarios where I had an error in schema.zmodel but it was unknown to me after a successful zenstack generate without any warnings (nor in the IDE tool).
- For a
@@validateattribute, I usedstatus == DONEas opposed tostatus == "DONE"(whereDONEis one of the status enums) - I had a slight regex error in a data-level validation attribute.
No errors come up in the generate & push process. Then, only at runtime do I get an error related to .zenstack/models not having a valid export with no indication that it is related to errors in the schema.zmodel.
Please catch & flag these errors somewhere in the generation process so it's not a game of wack a mole :)
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- ZenStack version: 2.11.6
- Prisma version: 6.3.x
- Database type: Postgres
Additional context Add any other context about the problem here.
Hi @eleazareramos , thanks for filing this. Could you share more details about "I had a slight regex error in a data-level validation attribute."? Thanks!
Hi @ymc9 ! I no longer have the exact value, but it was a syntax issue where i missed closing a parenthesis! (an input which would throw an error on new RegExp() – but nothing was called out in the generate / build process!)
Closing for now and will reopen when a repro is available.