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
Support prisma
#2083
Comments
Any updates? |
👀🥹 |
I think we/contributors should focus on the mentioned issues before there can be "any updates" in this thread... |
i should note that if you use the prisma data proxy, it works. so that's a workaround for now. the napi-based prisma engine does not work yet. |
Here's the current debug logs where it gets before crashing: > bun-debug index.ts
[SYS] close(20)
[0.04ms] ".env"
[SYS] close(32)
[SYS] close(36)
[SYS] openat(-2, /Users/jarred/Build/prisa/.env) = 52
[SYS] fstat(52) = 0
[SYS] read(52, 479) = 463 (0.015ms)
[SYS] read(52, 16) = 0 (0.001ms)
[SYS] close(52)
[SYS] openat(-2, /Users/jarred/Build/prisa/.env) = 52
[SYS] fstat(52) = 0
[SYS] read(52, 479) = 463 (0.005ms)
[SYS] read(52, 16) = 0 (0.001ms)
[SYS] close(52)
[SYS] openat(-2, /Users/jarred/Build/prisa/node_modules/.prisma/client/schema.prisma) = 52
[SYS] fstat(52) = 0
[SYS] read(52, 590) = 574 (0.003ms)
[SYS] read(52, 16) = 0 (0.001ms)
[SYS] close(52)
[bun]: async_hooks has not been implemented yet :(
[napi] napi_create_string_utf8: CustomGC
[napi] napi_create_threadsafe_function
[napi] napi_unref_threadsafe_function
[napi] napi_create_string_utf8: prisma log callback
[napi] napi_create_threadsafe_function
[napi] napi_unref_threadsafe_function
[napi] napi_is_array
[napi] napi_is_buffer
[napi] napi_get_array_length
[napi] napi_get_element
[napi] napi_get_value_string_utf8: datamodel
[napi] napi_get_element
[napi] napi_get_value_string_utf8: // This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
}
[napi] napi_get_element
[napi] napi_get_value_string_utf8: env
[napi] napi_get_element
[napi] napi_is_array
[napi] napi_is_buffer
[napi] napi_get_array_length
[napi] napi_get_element
// -- [ENVIRONMENT VARIABLES SKIPPED] --
[napi] napi_get_value_string_utf8: file:./dev.db
[napi] napi_get_element
[napi] napi_get_value_string_utf8: logQueries
[napi] napi_get_element
[napi] napi_get_value_bool
[napi] napi_get_element
[napi] napi_get_value_string_utf8: ignoreEnvVarErrors
[napi] napi_get_element
[napi] napi_get_value_bool
[napi] napi_get_element
[napi] napi_get_value_string_utf8: datasourceOverrides
[napi] napi_get_element
[napi] napi_is_array
[napi] napi_is_buffer
[napi] napi_get_array_length
[napi] napi_get_element
[napi] napi_get_value_string_utf8: logLevel
[napi] napi_get_element
[napi] napi_get_value_string_utf8: error
[napi] napi_get_element
[napi] napi_get_value_string_utf8: configDir
[napi] napi_get_element
[napi] napi_get_value_string_utf8: /Users/jarred/Build/prisa/prisma
[napi] napi_create_object
[napi] napi_create_string_utf8: aead147aa326ccb985dcfed5b065b4fdabd44b19
[napi] napi_create_string_utf8: 0.1.0
[napi] napi_is_array
[napi] napi_is_buffer
[napi] napi_get_array_length
[napi] napi_get_element
[napi] napi_get_value_string_utf8: datamodel
[napi] napi_get_element
[napi] napi_get_value_string_utf8: // This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
}
[napi] napi_get_element
[napi] napi_get_value_string_utf8: datasourceOverrides
[napi] napi_get_element
[napi] napi_is_array
[napi] napi_is_buffer
[napi] napi_get_array_length
[napi] napi_get_element
[napi] napi_get_value_string_utf8: ignoreEnvVarErrors
[napi] napi_get_element
[napi] napi_get_value_bool
[napi] napi_get_element
[napi] napi_get_value_string_utf8: env
[napi] napi_get_element
[napi] napi_is_array
[napi] napi_is_buffer
[napi] napi_get_array_length
[napi] napi_get_element
// -- [ENVIRONMENT VARIABLES SKIPPED] --
[napi] napi_get_value_string_utf8: file:./dev.db
[napi] napi_create_string_utf8:
[napi] napi_create_object
[napi] napi_create_string_utf8: generators
[napi] napi_create_array_with_length
[napi] napi_create_string_utf8:
[napi] napi_create_object
[napi] napi_create_string_utf8: name
[napi] napi_create_string_utf8: client
[napi] napi_create_string_utf8: provider
[napi] napi_create_string_utf8:
[napi] napi_create_object
[napi] napi_create_string_utf8: fromEnvVar
[napi] napi_get_null
[napi] napi_create_string_utf8: value
[napi] napi_create_string_utf8: prisma-client-js
[napi] napi_create_string_utf8: output
[napi] napi_get_null
[napi] napi_create_string_utf8: config
[napi] napi_create_string_utf8:
[napi] napi_create_object
[napi] napi_create_string_utf8: binaryTargets
[napi] napi_create_array_with_length
[napi] napi_create_string_utf8: previewFeatures
[napi] napi_create_array_with_length
[napi] napi_set_element
[napi] napi_create_string_utf8: datasources
[napi] napi_create_array_with_length
[napi] napi_create_string_utf8:
[napi] napi_create_object
[napi] napi_create_string_utf8: name
[napi] napi_create_string_utf8: db
[napi] napi_create_string_utf8: provider
[napi] napi_create_string_utf8: sqlite
[napi] napi_create_string_utf8: activeProvider
[napi] napi_create_string_utf8: sqlite
[napi] napi_create_string_utf8: url
[napi] napi_create_string_utf8:
[napi] napi_create_object
[napi] napi_create_string_utf8: fromEnvVar
[napi] napi_create_string_utf8: DATABASE_URL
[napi] napi_create_string_utf8: value
[napi] napi_get_null
[napi] napi_create_string_utf8: schemas
[napi] napi_create_array_with_length
[napi] napi_set_element
[napi] napi_create_string_utf8: warnings
[napi] napi_create_array_with_length
[napi] napi_get_value_string_utf8: {"traceparent":"00-10-10-00"}
[napi] napi_create_promise
[napi] napi_create_string_utf8: napi_resolve_deferred
[napi] napi_create_threadsafe_function
fish: Job 1, 'bun-debug index.ts' terminated by signal SIGSEGV (Address boundary error) The bug is probably in |
One bug in threadsafe function has been fixed by @cirospaciari in #3162 #3164 fixes the issue with now we have a null pointer dereference in the tokio / napi code. Guessing an argument is not set. |
guess what |
Fixed by @cirospaciari in #3176 |
With the addition of an interesting
async_hooks
workaround by @Jarred-Sumner, we only lack a few things to get Prisma support off the ground:@prisma/client
#2078String.raw
produces incorrect output #622After those issues are resolved, we should have
prisma
working in BunThe text was updated successfully, but these errors were encountered: