language-tools
language-tools copied to clipboard
Use local project `prisma-fmt` instead of newest, bundled one from extension
Right now the VSCode extension includes/downloads a recent version of the prisma-fmt binary (after https://github.com/prisma/vscode/issues/56 this will be a specific, hardcoded version).
As people might be using an older version of Prisma2 CLI and Client, it could be helpful to actually use a binary that matches their current project setup. To achieve this, we could change the architecture of the VSCode extension:
It could also check the local packages (node_modules) for a binary that can be used instead. (This would require that the CLI of course also downloads the formatter binary or its functionality is included in one of the other binaries.)
Considerations
- How to communicate that to the user?
- Fallback to a pinned version if no local binary is available?
- What if schema does not actually match locally used CLI etc?
Internal discussion: https://prisma-company.slack.com/archives/CKCQQGXJM/p1584709632055300