You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the prismaSchemaFolder preview feature with a multi-file schema setup, the language server fails to discover schema files on Windows. The language server constructs glob patterns using forward slashes internally, but vscode.workspace.findFiles and the underlying VS Code glob engine on Windows sometimes produces fsPath values with backslashes. When the extension compares these paths for deduplication or watching, the mismatch causes some schema files to appear as unknown or to not be watched for changes.
Steps to Reproduce
Enable prismaSchemaFolder in a Prisma 5+ project on Windows.
Open VS Code on Windows. Observe that sometimes only some of the .prisma files get syntax highlighting and autocompletion; others show no language features.
Editing user.prisma does not trigger validation of product.prisma (cross-file reference broken).
Root Cause
Path comparison in the language server file watcher and document store uses string equality. On Windows, uri.fsPath returns C:\Users\...\prisma\schema\user.prisma while the glob result may be C:/Users/.../prisma/schema/user.prisma. These compare as unequal.
Proposed Fix
Normalise all paths to uri.toString() (scheme+authority+path, always forward-slash) before storing and comparing. Alternatively, use vscode.Uri.file(path).toString() to canonicalise before equality checks.
Environment
OS: Windows 11 Enterprise 10.0.26200
Prisma: 5.x with prismaSchemaFolder preview enabled
Activity
fix: address review feedback - improve tests and rename variable
fix: rename fsPath to schemaUri and add comment about test limitations