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

Only generate prisma client if it has not been generated #3775

Closed
itsdillon opened this issue Aug 22, 2022 · 2 comments · Fixed by #3780
Closed

Only generate prisma client if it has not been generated #3775

itsdillon opened this issue Aug 22, 2022 · 2 comments · Fixed by #3780
Assignees
Labels
kind/bug Something isn't working status/done

Comments

@itsdillon
Copy link
Member

itsdillon commented Aug 22, 2022

What is the problem?

Currently the prisma client is being generated on most commands as part of the codegen-tasks.ts file (

if (hasPrisma) {
let prismaSpinner = log.spinner(`Generating Prisma client`).start()
const result = await runPrisma(["generate"], true)
if (result.success) {
prismaSpinner.succeed(log.greenText("Generated Prisma client"))
} else {
prismaSpinner.fail()
console.log("\n" + result.stderr)
process.exit(1)
}
}
)

Since it's a big performance hit, we should only be generating the prisma client once.

@itsdillon itsdillon added kind/bug Something isn't working status/ready-to-work-on This issue is up for grabs labels Aug 22, 2022
@siddhsuresh
Copy link
Member

Hey @dillonraphael can I work on this?

@beerose
Copy link
Contributor

beerose commented Aug 23, 2022

Hey @dillonraphael can I work on this?

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants