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

Naming coflict after client generation in 6.6.0

Open isfan14 opened this issue 8 months ago • 6 comments

Bug description

Language tools does not seem to ignore generated/compiled schema.prisma file in the defined output dir on 6.6.0 using prisma.config.ts with multiple schema file. This behavior raising some naming conflict error as shown below.

Image

How to reproduce

  1. Set schema dir in prisma.config.ts to prisma/schema
  2. Set output dir in main schema.prisma to output = "../generated/client"
  3. Generate prisma client npx prisma generate
  4. Open source .prisma files and the schema.prisma in prisma/generated/client
  5. See error raised in the PROBLEMS tab

Expected behavior

Language tool should ignore schema.prisma file in the defined output dir.

Prisma information

  • Using Prisma 6.6.0
  • Using preview feature prisma.config.ts
import path from 'node:path';
import { defineConfig } from 'prisma/config';

import 'dotenv/config';

export default defineConfig({
  earlyAccess: true,
  schema: path.join('prisma', 'schema'),
});
  • Client generator in schema.prisma
generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["multiSchema", "postgresqlExtensions", "relationJoins", "prismaSchemaFolder", "fullTextSearchPostgres", "typedsql"]
  output          = "../generated/client"
  moduleFormat    = "esm"
}

Environment & setup

  • OS: Ubuntu 24.04.1 LTS in WSL in Windows 11
  • Editor: VS Code
  • Editor version: 1.99.3
  • Extension version: 6.6.0

isfan14 avatar Apr 22 '25 03:04 isfan14

I am also having this issue

bshearrer avatar Apr 30 '25 03:04 bshearrer

We are also facing this problem at work project with extension version 6.7.0.

favna avatar May 06 '25 14:05 favna

Same issue here

Image

jusemon avatar May 06 '25 17:05 jusemon

Looks like this issue is similar/related to https://github.com/prisma/language-tools/issues/1803 which has a comment potential workaround solution https://github.com/prisma/prisma/discussions/24413#discussioncomment-9670600

bshearrer avatar May 06 '25 18:05 bshearrer

I have the same issue, Prisma 6.13.0. Very annoying.

wowtah avatar Jul 31 '25 09:07 wowtah

Same issue. I'm using Prisma 6.15.0, without preview features.

fornaeffe avatar Aug 28 '25 15:08 fornaeffe