Open ddhorstman opened 2 years ago
I can't seem to recreate this issue. Can you paste in the schema you are using?
I'm encountering that same issue. It occurs every time I'm using comments before defining a model:
Works:
model ModelA {
// Comment
id Int @id
}
Fails:
// Comment
model ModelA {
id Int @id
}
Both using Aurora 1.3.3 running with node v16.13.0 on linux, with the following config:
{
"files": [
"./modelA.prisma"
],
"output": "./schema.prisma"
}
Comments before datasource
, generator
and enum
definitions work fine:
// Comment
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
// Comment
generator client {
provider = "prisma-client-js"
}
// Comment
enum TestEnum {
TEST
}
Describe the bug It would seem that the presence of comments in my files is confusing
aurora
. In my org, we like to use comments as dividers to make our files easier to navigate, like so:But the presence of a single
//-
sequence causes aurora to crash.To Reproduce
Author
andBook
schemas from README.md, and set up
aurora.config.json` to combine them.//-
anywhere in either file.aurora
Expected behavior The two schemas are combined into a single schema
Actual Behavior The following error is printed:
Desktop (please complete the following information):
Screenshots