-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make Prisma generate independent of environment #593
Comments
Internal note: This happens without schema parser, i.e. no VSCode support VSCode support tracked here prisma/language-tools#17 |
Matt: Update spec to include "Disallow env vars in provider" |
Env vars are now disallowed in the provider argument of datasources (PR). This will be available in |
Updating from prisma 2.0.0-beta.2 to 2.0.0-beta.3 I am now receiving the following error
I am setting an empty string for |
@marcjulian Can you please open a new issue about this? |
Added the issue 2321 |
prisma generate
fails when a particular environment variable is not available. The reason(s) for this are:If
DB_PROVIDER
is used, then the generate CLI needs to resolve it to proceed as it needs to know the data source. A potential solution is to dis-allow environment variables in provider. This issue: prisma/prisma-client-js#184 also ties into this discussion.Decision: Disallow env vars in
provider
If
DB_URL
is used, then for SQLite, we need to be able to resolve the relative path to the SQLite file at generate time, to be able to use it at runtime. A potential solution is to limit SQLite to absolute paths but that is not the best DX.Decision: Do not resolve SQLite path when generation
Had a quick chat with @schickling and the result is above marked decisions.
Another alternative is to fail only on the required env vars (like provider) but let others pass through. That would require the datamodel parser to bake the field information in the parse tree and that can be used to fail conditionally.
This information is from top of my head and might be outdated, I will sync with @timsuchanek on this.
The text was updated successfully, but these errors were encountered: