-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: merge local and engines completions #1348
Conversation
🤖 Pull request artifacts
|
if (prismaFmt === undefined && local === undefined) { | ||
return undefined | ||
} | ||
|
||
if (prismaFmt !== undefined && local === undefined) { | ||
return prismaFmt | ||
} | ||
|
||
if (prismaFmt === undefined && local !== undefined) { | ||
return local | ||
} | ||
|
||
return { | ||
isIncomplete: false, | ||
items: prismaFmt!.items.concat(local!.items), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (prismaFmt === undefined && local === undefined) { | |
return undefined | |
} | |
if (prismaFmt !== undefined && local === undefined) { | |
return prismaFmt | |
} | |
if (prismaFmt === undefined && local !== undefined) { | |
return local | |
} | |
return { | |
isIncomplete: false, | |
items: prismaFmt!.items.concat(local!.items), | |
} | |
if (prismaFmt && local) { | |
return { | |
isIncomplete: false, | |
items: [...prismaFmt.items, ...local.items], | |
} | |
} else if (prismaFmt) { | |
return prismaFmt | |
} else if (local) { | |
return local | |
} | |
return undefined |
Maybe this instead?
It looks like the tests are failing currently, so I think we cannot merge the completions for now until we figure out how to resolve this |
Yeah! The tests are currently failing due to not expecting certain completions to be available but they all of a sudden are. I'd hedge that this is more than updating the expects of the test suites and rather, being more specific about when completions will be available. |
After taking another look at the test failures for
and now only the following, which is less correct
for
and now only raw, which is less correct
for
and now only the referential actions, which is less correct
|
I think we can avoid/delay this work if instead of prisma/prisma-engines#3541 we open a TypeScript PR so we can have all datasource completions on one side. It's quite easy to do, only need to change the completions.json file here
It will also have the benefit of working from the beginning of the line. (Bug in rust code is tracked here: prisma/prisma#17000) |
closes #1347