zod-prisma icon indicating copy to clipboard operation
zod-prisma copied to clipboard

Is this library alive?

Open aiji42 opened this issue 1 year ago • 30 comments

This is a survival check.

I find this library very useful and I like it very much. However, I am very disappointed that maintenance has stopped and there is no way to fix bugs and support the latest prisma(v4).

@CarterGrimmeisen Do you intend to continue the maintenance of this library? If not, please recruit maintainers and give them proper authority.

P.S. There is another similar library, but I personally don't like it because it generates a lot of files when running genarate.

aiji42 avatar Sep 02 '22 11:09 aiji42

This is a survival check.

I find this library very useful and I like it very much. However, I am very disappointed that maintenance has stopped and there is no way to fix bugs and support the latest prisma(v4).

@CarterGrimmeisen Do you intend to continue the maintenance of this library? If not, please recruit maintainers and give them proper authority.

P.S. There is another similar library, but I personally don't like it because it generates a lot of files when running genarate.

I would say even more!

josephpierres avatar Sep 13 '22 22:09 josephpierres

The author seems to be inresponsive, I wonder if anyone is willing to maintain a active fork and we can merge bug fixes there? @DiegoDoniss @batidodecoco @IgnusG @sourcec0de @MatthiasDunker @omar-dulaimi @aiji42 @michiim @GaelS

Sorry for disturbing, but it will benefit a lot of us if someone step forward.

NexZhu avatar Sep 21 '22 09:09 NexZhu

@aiji42 zod-prisma generates 1 model for each Prisma model in your schema. But prisma-zod-generator have a different purpose; it generates schemas for all actions Prisma client provides, which makes it useful for CRUD operations.

I might implement a feature soon to generate models only; which would result in an output similar to what you get here.

omar-dulaimi avatar Sep 21 '22 10:09 omar-dulaimi

@NexZhu Thanks for the mention. But to be honest, I don't think I can maintain yet another generator. As you know I have built many so far for the Prisma community, and it takes a lot of my free time.

I have been job searching these past months for remote full time roles, so until I get employed, I'm afraid I can't promise anything.

omar-dulaimi avatar Sep 21 '22 10:09 omar-dulaimi

@omar-dulaimi Thank you for your reaction, I was surprised because I did not expect to get your view as the owner of prisma-zod-generator.

I might implement a feature soon to generate models only; which would result in an output similar to what you get here.

I am really looking forward to this. If this is implemented, I will switch to your library.

aiji42 avatar Sep 21 '22 10:09 aiji42

The author seems to be inresponsive, I wonder if anyone is willing to maintain a active fork and we can merge bug fixes there? @DiegoDoniss @batidodecoco @IgnusG @sourcec0de @MatthiasDunker @omar-dulaimi @aiji42 @michiim @GaelS

Sorry for disturbing, but it will benefit a lot of us if someone step forward.

Unfortunately I'm not very deep into prisma yet so I wouldn't know what to do with most of these other PRs 😞

@Frando however already re-packaged this library together with my fix at @frando/zod-prisma. Maybe they can merge in some of the other popular/critical PRs as well. I'd suggest to list the ones that are interesting for you guys here.

If @Frando agrees we can then re-create them against their fork.

IgnusG avatar Sep 21 '22 10:09 IgnusG

I've also published a fork @daotl/zod-prisma, cuz I need this PR from @michiim to be merged: https://github.com/CarterGrimmeisen/zod-prisma/pull/111 This one generates enums instead of importing from @prisma/client and is important if you want the generated schemas to also be useable in the frontend code. @IgnusG I've also merged your PR: https://github.com/CarterGrimmeisen/zod-prisma/pull/128

If no one else is willing to maintain a fork, I can merge other requested PRs in my fork: https://github.com/daotl/zod-prisma

NexZhu avatar Sep 22 '22 07:09 NexZhu

I'm not currently using zod-prisma in a production app, and am not sure if I will as we're still experimenting at the moment. So if @NexZhu is up for maintaing a fork, that'd be great. Feel free to use my fork or the commits in it. If things stabilize, I'll stop my fork and point to a maintained version instead.

Frando avatar Sep 26 '22 15:09 Frando

OK, feel free to open issues or PRs in my fork until the author picks it up or anyone more suitable appears. https://github.com/daotl/zod-prisma

NexZhu avatar Sep 27 '22 05:09 NexZhu

Sorry for the late reply! Seems like I've been mentioned, I like this project and I always try to use it whenever possible. There are some improvements that needs to be done to ensure a good experience between Prisma and Zod

We could go with somebody's fork and perhaps rename the package to avoid confusion

arielpacciaroni avatar Sep 29 '22 00:09 arielpacciaroni

At @calcom we're using this library extensively, we could offer a sponsorship or maybe adopt and maintain this library as well. cc @PeerRich @hariombalhara

zomars avatar Sep 29 '22 14:09 zomars

happy to continue maintaining under calcom/zod-prisma

PeerRich avatar Oct 06 '22 22:10 PeerRich

Whats the conclusion? Wheres the project going, which fork?

Nikola-Milovic avatar Oct 30 '22 19:10 Nikola-Milovic

Whats the conclusion? Wheres the project going, which fork?

weve not had a chance to fork this yet

PeerRich avatar Oct 30 '22 20:10 PeerRich

@PeerRich Please do pings us

Nikola-Milovic avatar Oct 31 '22 08:10 Nikola-Milovic

passing this decision to @zomars

just fyi: we do have a lot of other things on our plate

PeerRich avatar Oct 31 '22 16:10 PeerRich

I think somebody should create a discord server for this generator or all prisma generators in general.

omar-dulaimi avatar Nov 01 '22 06:11 omar-dulaimi

@omar-dulaimi that's probably a thing already in the Prisma discord, or at least it should reside there

Nikola-Milovic avatar Nov 01 '22 06:11 Nikola-Milovic

@omar-dulaimi that's probably a thing already in the Prisma discord, or at least it should reside there

I thought Prisma only has Slack. Must be new or not official.

omar-dulaimi avatar Nov 01 '22 06:11 omar-dulaimi

@omar-dulaimi yeah my mistake, same thing stands just for slack

Nikola-Milovic avatar Nov 01 '22 06:11 Nikola-Milovic

Hey just noticed this. I was seriously considering switching to prisma-zod-generator and just realized that is maintained by you @omar-dulaimi 😅

What are you thoughts of this? We rather contribute to an active project and what do you think are the main differences between this generator and yours?

zomars avatar Nov 03 '22 22:11 zomars

Hey @zomars

I think it would be great if the author managed this again, because somebody stepping up and managing it won't last for long; it's just what I imagine.

This project creates one Zod schema for each Prisma model you have in your Prisma schema. However Prisma Zod Generator takes this a few steps further, by generating schemas for nearly everything Prisma client generates. This includes all operations like findMany, aggregate, upsert, etc and all schemas needed inside each one of them for the data, where, etc and even enums.

A current PR provides the ability to generate Select schemas, and the one after it will provide Include schemas. Once they get merged, I'm considering providing an option to generate models only, to give you guys what you have here in this project. The output will not be exactly as you get here, but very similar and does the same thing. Hopefully soon.

omar-dulaimi avatar Nov 04 '22 10:11 omar-dulaimi