language-tools
language-tools copied to clipboard
`RuntimeError: unreachable at std::panicking::rust_panic_with_hook::h47a0e203360b6c10 (<anonymous>:wasm-function[1251]:0x1c7025)`
Was converting a PostgreSQL schema to MongoDB by adding `@map("_id") and later noticed this:
prisma-fmt error'd during formatting. Please report this issue on [Prisma Language Tools](https://github.com/prisma/language-tools/issues).
Linter output:
RuntimeError: unreachable
at std::panicking::rust_panic_with_hook::h47a0e203360b6c10 (<anonymous>:wasm-function[1251]:0x1c7025)
at std::panicking::begin_panic_handler::{{closure}}::h888144d5e9a03cec (<anonymous>:wasm-function[1424]:0x1ca49b)
at std::sys_common::backtrace::__rust_end_short_backtrace::h81961607fd97e28e (<anonymous>:wasm-function[1562]:0x1caf9d)
at rust_begin_unwind (<anonymous>:wasm-function[1473]:0x1ca9a8)
at core::panicking::panic_fmt::h4ca53049f45e3264 (<anonymous>:wasm-function[1387]:0x1c9f65)
at core::result::unwrap_failed::h6d050dbd00b66340 (<anonymous>:wasm-function[1225]:0x1c640e)
at datamodel::transform::ast_to_dml::lift::LiftAstToDml::lift_scalar_field_type::hd7ac6e32d6a3a6da (<anonymous>:wasm-function[287]:0x1489e3)
at datamodel::transform::ast_to_dml::lift::LiftAstToDml::lift::hf8f05c0405cab6bb (<anonymous>:wasm-function[3]:0x32b8b)
at prisma_fmt::format::h000bf4ec3b281dd0 (<anonymous>:wasm-function[19]:0x7b303)
at format (<anonymous>:wasm-function[1202]:0x1c5662)
running lint() from prisma-fmt
running lint() from prisma-fmt
Hi! Is there any further information that you have here regarding the state of the Schema? @janpio / any updates @tomhoule
I at least don't see any such errors just doing this (or then updating the provider to "mongodb"):
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Post {
id String @id @map("_id")
userId String
user User @relation(fields: [userId], references: [id])
}
model User {
id String @id @map("_id")
posts Post[]
}
Unfortunately not. Tried to reproduce back then, but could not. But happened often enough that I saw it in the extension logs although it was not properly surfaced to me in any way. I think I also did not notice any problem in what I did - it was just this random error message in the logs.