Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to convert file URL with square brackets to URI #1157

Closed
JTRNS opened this issue Sep 6, 2024 · 0 comments · Fixed by denoland/deno#25509
Closed

Unable to convert file URL with square brackets to URI #1157

JTRNS opened this issue Sep 6, 2024 · 0 comments · Fixed by denoland/deno#25509
Assignees
Labels
bug Something isn't working

Comments

@JTRNS
Copy link

JTRNS commented Sep 6, 2024

Describe the bug

File names with square brackets, used in Fresh and other frameworks for dynamic file based routing, seem to break the extension.

Could not convert URL "file:///home/jtrns/tmp/deno-lsp-brackets/[main].tsx" to URI: unexpected character at index 41
Unable to convert fix: unexpected character at index 41
[Error - 11:30:53 AM] Request textDocument/codeAction failed.
  Message: Internal error
  Code: -32603

file:///home/jtrns/tmp/deno-lsp-brackets/[main].tsx".indexOf("[") // 41

To Reproduce

  1. Open empty directory in vscode
  2. Run Deno enable command
  3. Create a [main].ts
  4. Start writing code

Expected behavior

The LSP should be able to parse paths that contain brackets.

Versions

vscode:
Version: 1.93.0 (system setup)
Commit: 4849ca9bdf9666755eb463db297b69e5385090e3
Date: 2024-09-04T13:02:38.431Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

deno:
Version: 1.46.3 (stable, release, x86_64-unknown-linux-gnu)
v8 12.9.202.5-rusty
typescript 5.5.2

extension: v3.39.0

@nayeemrmn nayeemrmn self-assigned this Sep 6, 2024
@nayeemrmn nayeemrmn added bug Something isn't working windows Occurring only on the Windows operating system. labels Sep 8, 2024
@nayeemrmn nayeemrmn removed the windows Occurring only on the Windows operating system. label Sep 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants