language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

File watcher only works for default Client output path

Open janpio opened this issue 4 years ago • 3 comments

Currently hardcoded to watch .prisma/client: https://github.com/prisma/language-tools/blob/fbc846efa2046f1ac6ffc4a2987056bf1631a23b/packages/vscode/src/plugins/prisma-language-server/index.ts#L76-L84

janpio avatar Jun 16 '21 10:06 janpio

Meaning we would need to parse the generator block of the prisma-client-js to get the content of the "output" param, if present.

That can easily be done with "getConfig" but not from the extension unfortunately.

Jolg42 avatar Sep 30 '21 12:09 Jolg42

To be confirmed before investigating that watching the custom folder is actually needed: does TypeScript actually refreshes the types if the output is in custom dir?

Jolg42 avatar Sep 30 '21 12:09 Jolg42

Assuming the file watcher is needed to get types to work properly, types in a custom output dir should also work properly of course. (Might of course be that custom output dir avoids the problem why we have the additional file watcher in the first place)

janpio avatar Sep 30 '21 12:09 janpio