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

Language server cannot correctly report diagnostics for sources containing multibyte characters #1721

Closed
kyoh86 opened this issue May 9, 2024 · 4 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: multi-byte

Comments

@kyoh86
Copy link

kyoh86 commented May 9, 2024

Bug description

If a source contains multi-byte characters, Prisma Language Server cannot report diagnostics with correct position.

e.g.

// 📅📅📅📅📅
enum Day {
  Monday
  Tuesday
  Wednesday
  Thursday,
  Friday
  Saturday
  Sunday
}

It must be reported that a problem is in the line Thursday, that is not an enum value definition.
But the problem is reported in a position of Friday.

While you put a charater 📅 more, the reported position also shift.

How to reproduce

  • Write prisma schema
  • Make it invalid
  • Put multi-byte character before the invalid line.

Expected behavior

The problem is reported in correct position.

Prisma information

// 📅📅📅📅📅
enum Day {
  Monday
  Tuesday
  Wednesday
  Thursday,
  Friday
  Saturday
  Sunday
}

Environment & setup

  • OS: Arch Linux
  • Editor: Neovim
  • Editor version: v0.10.0-dev-344906a
@iamel89
Copy link

iamel89 commented Jun 13, 2024

Same issue:
#1308

@janpio janpio added topic: multi-byte bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. labels Jun 13, 2024
@Druue
Copy link
Contributor

Druue commented Jul 4, 2024

Hey @kyoh86, a PR fixing issues with multibyte characters was part of our 5.16.0 release, can you please confirm if that version resolves this issue for you?

Thank you in advance! 🙏

@Druue Druue self-assigned this Jul 4, 2024
@kyoh86
Copy link
Author

kyoh86 commented Jul 4, 2024

@Druue Wow! It's fixed! Thanks so much!

@Druue Druue added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Jul 9, 2024
@Druue
Copy link
Contributor

Druue commented Jul 9, 2024

Cool, I'll be closing this as complete then :) ✨

@Druue Druue closed this as completed Jul 9, 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. kind/bug A reported bug. topic: multi-byte
Projects
None yet
Development

No branches or pull requests

4 participants