LSP fails on Windows due to path mismatch errors #7878

Open
opened 2026-02-16 18:08:33 -05:00 by yindo · 1 comment
Owner

Originally created by @pschiel on GitHub (Jan 28, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Steps to reproduce

Use various paths and observe that LSP returns no errors due to backslash mismatches.

Occurs in git bash and/or backslash paths.

- Write JS file with lint errors to "/c/Users/ops/lsp-test.js" containing: "const x = 1\nconst y = 2\nx = 3"
- Write JS file with lint errors to "E:/lsp-test.js" containing: "const x = 1\nconst y = 2\nx = 3"
- Write JS file with lint errors to "C:\\Users\\ops\\lsp-test2.js" containing: "var a;var b;a==b"
- Write JS file with lint errors to "E:\\lsp-test2.js" containing: "var a;var b;a==b"

Root Cause

path mismatches in contains() Checks cause LSP to fail read the file, and silently doesn't return diagnostics.

#6763 solves via path normalization

Plugins

OpenCode version

dev

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

not terminal related

Originally created by @pschiel on GitHub (Jan 28, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description ## Steps to reproduce Use various paths and observe that LSP returns no errors due to backslash mismatches. Occurs in git bash and/or backslash paths. ``` - Write JS file with lint errors to "/c/Users/ops/lsp-test.js" containing: "const x = 1\nconst y = 2\nx = 3" - Write JS file with lint errors to "E:/lsp-test.js" containing: "const x = 1\nconst y = 2\nx = 3" - Write JS file with lint errors to "C:\\Users\\ops\\lsp-test2.js" containing: "var a;var b;a==b" - Write JS file with lint errors to "E:\\lsp-test2.js" containing: "var a;var b;a==b" ``` ## Root Cause path mismatches in contains() Checks cause LSP to fail read the file, and silently doesn't return diagnostics. #6763 solves via path normalization ### Plugins - ### OpenCode version dev ### Screenshot and/or share link _No response_ ### Operating System Windows 11 ### Terminal not terminal related
yindo added the windowsbug labels 2026-02-16 18:08:33 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 28, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #8378: Path conversion bug between Windows and WSL - Client incorrectly appends Windows paths to WSL paths
  • #8567: Windows path handling issues with DOS paths (backslash paths) in file operations
  • #2972: File path handling issues on Windows with git bash-style paths (incorrect colon in path)
  • #1374: Fuzzy file search does not work correctly on Windows with backslash path separators

These issues all relate to cross-platform path handling on Windows. Your issue specifically involves LSP not detecting errors due to path mismatches with various Windows path formats (/c/, E:/, C:\, E:\). This appears to be a more specific manifestation of the broader Windows path handling problem.

Feel free to ignore if your case involves additional details not covered by these issues.

@github-actions[bot] commented on GitHub (Jan 28, 2026): This issue might be a duplicate of existing issues. Please check: - #8378: Path conversion bug between Windows and WSL - Client incorrectly appends Windows paths to WSL paths - #8567: Windows path handling issues with DOS paths (backslash paths) in file operations - #2972: File path handling issues on Windows with git bash-style paths (incorrect colon in path) - #1374: Fuzzy file search does not work correctly on Windows with backslash path separators These issues all relate to cross-platform path handling on Windows. Your issue specifically involves LSP not detecting errors due to path mismatches with various Windows path formats (/c/, E:/, C:\\, E:\\). This appears to be a more specific manifestation of the broader Windows path handling problem. Feel free to ignore if your case involves additional details not covered by these issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7878