Open brianbolnick opened 7 months ago
@brianbolnick thanks for repoting the issue, can you please provide a complete schema if possible so i can run it on my end?
@brianbolnick I changed the generation of imports in barrel files to use Set instead of array to prevent duplicate imports. Can you please check if this solves your problem or if it generates problems in other places of the schemas.
Please also be aware that the latest version is targeted for the use with prisma 5.2.x
so maybe a this bug could be a result of this version discrepancy.
Also zod 3.21.4 might make problems because of a type error in the schemas that happens in zod > 3.21.1
- a flag to use type assertion - useTypeAssertions = true
in generator config - is implemented that can circumvent this bug but that also overrides the type system, so please use at your own risk
Looks like it is still occurring with the current versions of prisma and zod, unfortunately. I'll try to revert back where possible, but may need to figure something else out until it's all fully supported :)
Well, that's odd. Is it possible to provide the full schema so I can reproduce the issue on my end?
Unfortunately it's a private repo and I can't share it :/ It's only affecting one model, so I'll see if I can put together a replica of it and any relations to it that you could use later.
Describe the bug Hi! Love the concept behind this repo. Just ran my first generate and it has a duplicate schema exported. I've tried with both single and multi-file outputs. The multi-file has seemed to shed some possible light. Wondering if it has anything to do with a double export 🤷:
Which leads to the index file including both of these:
It only happened with this one model, so it very likely could be an issue on our end. Here's the schema itself:
Screenshots N/A
Package versions (please complete the following information):
Additional context N/A