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

VSCode extension panics when opening an empty prisma schema #1760

Closed
Druue opened this issue Jun 12, 2024 · 0 comments · Fixed by prisma/prisma#24515
Closed

VSCode extension panics when opening an empty prisma schema #1760

Druue opened this issue Jun 12, 2024 · 0 comments · Fixed by prisma/prisma#24515
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/regression A reported bug in functionality that used to work before. topic: linting topic: wasm
Milestone

Comments

@Druue
Copy link
Contributor

Druue commented Jun 12, 2024

Bug description

Highlighted here

Opening an empty prisma schema file i.e.
image

Yields the following error pop-up

image

With the following details in output

prisma-schema-wasm errored with: prisma-schema-wasm errored when invoking lint.
Cannot read properties of undefined (reading 'set_message')

TypeError: Cannot read properties of undefined (reading 'set_message')
    at module.exports.__wbg_setmessage_e113e9fee2d41bd4 (/Users/soph/.vscode/extensions/prisma.prisma-insider-31.0.3731/node_modules/@prisma/prisma-schema-wasm/src/prisma_schema_build.js:412:39)
    at prisma_schema_build.wasm.std::panicking::rust_panic_with_hook::h32c80a64fe4de396 (wasm://wasm/prisma_schema_build.wasm-00a79fbe:wasm-function[1184]:0x177d5c)
    at prisma_schema_build.wasm.std::panicking::begin_panic_handler::{{closure}}::hd496964d114e98b9 (wasm://wasm/prisma_schema_build.wasm-00a79fbe:wasm-function[1707]:0x193bc9)
    at prisma_schema_build.wasm.std::sys_common::backtrace::__rust_end_short_backtrace::h0d4686a7fe3981a4 (wasm://wasm/prisma_schema_build.wasm-00a79fbe:wasm-function[3159]:0x1ae64b)
    at prisma_schema_build.wasm.rust_begin_unwind (wasm://wasm/prisma_schema_build.wasm-00a79fbe:wasm-function[2488]:0x1a7e51)
    at prisma_schema_build.wasm.core::panicking::panic_fmt::hc7427f902a13f1a9 (wasm://wasm/prisma_schema_build.wasm-00a79fbe:wasm-function[2548]:0x1a8cc6)
    at prisma_schema_build.wasm.psl::validate_multi_file::h98389ae160d0c52a (wasm://wasm/prisma_schema_build.wasm-00a79fbe:wasm-function[607]:0x13ef6e)
    at prisma_schema_build.wasm.lint (wasm://wasm/prisma_schema_build.wasm-00a79fbe:wasm-function[101]:0xb7db1)
    at module.exports.lint (/Users/soph/.vscode/extensions/prisma.prisma-insider-31.0.3731/node_modules/@prisma/prisma-schema-wasm/src/prisma_schema_build.js:209:14)
    at lint (/Users/soph/.vscode/extensions/prisma.prisma-insider-31.0.3731/node_modules/@prisma/language-server/dist/lib/prisma-schema-wasm/lint.js:14:44)

How to reproduce

  1. Open an empty prisma schema file with version 5.15.0 of the vscode extension
  2. See error

Expected behavior

It shouldn't panic

Environment & setup

  • OS: MacOS, Windows
  • Editor: VS Code
  • Editor version: v1.88.1
  • Extension version: v5.15.0
@Druue Druue added bug/2-confirmed Bug has been reproduced and confirmed. kind/regression A reported bug in functionality that used to work before. topic: linting domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. topic: wasm labels Jun 12, 2024
@Druue Druue self-assigned this Jun 12, 2024
@Druue Druue added this to the 5.16.0 milestone Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/regression A reported bug in functionality that used to work before. topic: linting topic: wasm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant