Closed snake575 closed 2 years ago
Did a little testing, the generator works on windows, but not on macOS (genererates only empty folders)
@snake575 I've tried with Ubuntu 20 and it works
Could you help me to find the cause on macOS? Does the input file generate normally?
I suspect it might be some limitation for bulk generation on macOS, and maybe using an await
to generate the files will solve it.
Could you do these tests? Thanks for your contribution
Hi @Cauen I tried on ubuntu and you're right, must be an issue with macOS 🤔
await
? Can you point me where to use an await?
Trying to run the test example making some changes to the source code to wait for a file to be generated before trying to generate another
https://github.com/Cauen/prisma-generator-pothos-codegen/blob/master/src/crudGenerator/index.ts
If you can do some testing and find the cause, I would be happy to accept a PR from you.
Otherwise, sometime soon I create a VM here to do some testing
@Cauen solved the issue on #10 using fs/promises
. It was the only way I could find to reliably have the generator working on macOS, however it may not be as performant.
This line never gets executed on macOS (have no idea why 🤷🏻♂️): https://github.com/Cauen/prisma-generator-pothos-codegen/blob/137bd72e19b089d79946bc62fb800ac261baa007/src/utils/filesystem.ts#L38
HI!, I was getting all empty folders on my project, so went to try the
inputs-simple-sqlite
example (deleting all the generated files) but got the same issue 🫤Repro: https://github.com/snake575/prisma-generator-pothos-example