Skip to content
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

RuntimeError: unreachable at std::panicking::rust_panic_with_hook::h47a0e203360b6c10 (<anonymous>:wasm-function[1251]:0x1c7025) #1078

Open
janpio opened this issue Mar 11, 2022 · 2 comments
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/bug A reported bug. topic: prisma-fmt topic: wasm

Comments

@janpio
Copy link
Contributor

janpio commented Mar 11, 2022

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
@janpio janpio added bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. labels Mar 11, 2022
@Druue
Copy link
Contributor

Druue commented Dec 9, 2022

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[]
}

@janpio
Copy link
Contributor Author

janpio commented Dec 9, 2022

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.

@tomhoule tomhoule removed their assignment Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/bug A reported bug. topic: prisma-fmt topic: wasm
Projects
None yet
Development

No branches or pull requests

3 participants