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

Improve binaryTargets documentation #1896

Closed
Tracked by #4721
janpio opened this issue Jun 17, 2021 · 0 comments
Closed
Tracked by #4721

Improve binaryTargets documentation #1896

janpio opened this issue Jun 17, 2021 · 0 comments
Labels
docs Documentation creation, updates or corrections serverless-initiative See #orm-discovery-deployment-and-docs

Comments

@janpio
Copy link
Contributor

janpio commented Jun 17, 2021

binaryTargets are a way to tell the Prisma Client (prisma-client-js) generator for which platforms (operating systems) it should download and store engine files. The current documentation is a good start, but not great as it is missing some bits and hard to understand for users.

Current documentation:

Problems:

  • No real explanation what setting a value actually does and when it should be used: It downloads additional engines to the ones it would download by default, for the current platform. It is useful when you build on one platform, but deploy to another platform (like e.g. build locally on Mac, but then deploy that build via a Zip file to AWS Lambda, or you build with netlify which runs on Debian but that then deploys to AWS Lambda, which runs on Redhat Linux). It is not necessary if you have a build step on your deployment platform itself as this will already download the correct binary.
  • Wrong explanation and connection made, like e.g. https://www.prisma.io/docs/concepts/components/prisma-schema/generators#custom-binary-targets (this has nothing to do with "custom binary targets", but of course has a similar goal in using a different than default binary)
  • Deployment guides can not and do not link to an explanation of what it is
  • The binaryTargets property is technically only a property of prisma-client-js, not all generators so is more or less documented in the wrong place in the schema. The list of supported platforms should probably be moved somewhere else more for the Client vs. at the current location with schema
  • Related content like https://www.prisma.io/docs/reference/api-reference/environment-variables-reference#prisma_cli_binary_targets, which is how you can define similar things for CLI, is not crosslinked
@janpio janpio added the docs Documentation creation, updates or corrections label Jun 17, 2021
@Jolg42 Jolg42 added serverless-initiative See #orm-discovery-deployment-and-docs topic: serverless labels Dec 5, 2022
@jharrell jharrell closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation creation, updates or corrections serverless-initiative See #orm-discovery-deployment-and-docs
Projects
None yet
Development

No branches or pull requests

5 participants