Skip to content

Failed to read definition file for path containing non-english character #1191

@OpenTypeFormat

Description

@OpenTypeFormat

When using the luau-lsp extension, it fails to find the definition file and gives me the message:
Failed to read definitions file c:\Users\Uytkownik\AppData\Roaming\Code\User\globalStorage\johnnymorganz.luau-lsp\globalTypes.PluginSecurity.d.luau. Extended types will not be provided

The path it is looking for is at C:\Users\Użytkownik\..., but something is causing it to skip over the non-english letter 'ż' and it instead looks in an incorrect path. Whatever path it has contains some kind of incorrect character.
Because, even if I create the path (C:\Users\Uytkownik\...) it still gives me that error. The only way to fix this is to manually point to the definitions using luau-lsp.types.definitionFiles.

For example:

"luau-lsp.types.definitionFiles": [
    // Does not work at all
    "c:\\Users\\Użytkownik\\AppData\\Roaming\\Code\\User\\globalStorage\\johnnymorganz.luau-lsp\\globalTypes.PluginSecurity.d.luau",

    // Works as long as the path exists
    "c:\\Users\\Uytkownik\\AppData\\Roaming\\Code\\User\\globalStorage\\johnnymorganz.luau-lsp\\globalTypes.PluginSecurity.d.luau",
  ]

The top will not work, the error message says it is looking for a path with Uytkownik. This happens even if the path exists.
The bottom will work as long as the path with Uytkownik exists


Tested it with a path that's in the project folder, same thing happens with the following path:

"luau-lsp.types.definitionFiles": [
    // Does not work at all
    "luau-typeś\\globalTypes.PluginSecurity.d.luau",
  ]

Giving the error: (notice the missing ś)
Failed to read definitions file c:\Development\Roblox\Projects\Test\Place\luau-type\globalTypes.PluginSecurity.d.luau. Extended types will not be provided

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions