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

Error "file is a directory" on attempt to go to documentation/source (Windows) #247

Closed
DunetsNM opened this issue Jul 28, 2020 · 5 comments
Labels
os: windows type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@DunetsNM
Copy link
Contributor

Windows 10, VS Code, GHC 8.6.5
HLS reinstalled from scratch with precompiled 0.2.1 binaries

Trying to browse source from the tooltip:

image

Getting following error:

image

The file does exist and it's not a directory.

It is probably because file url has two slashes (file://...) but should have three (file:///), as described here microsoft/vscode#62251

@DunetsNM
Copy link
Contributor Author

is fix as simple as adding extra slash in module Development.IDE.Spans.Documentation ?

@lukel97 lukel97 added os: windows type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jul 28, 2020
@lukel97
Copy link
Collaborator

lukel97 commented Jul 28, 2020

It might be, did that fix the case on windows? I can test out adding an extra slash on macOS and see if that works

@DunetsNM
Copy link
Contributor Author

DunetsNM commented Jul 29, 2020

@bubba tried just now, it worked to some extent: opened new tab with raw html source, which is not very helpful but probably related to my local vs or machine configuration
image

lukel97 added a commit that referenced this issue Jul 31, 2020
Fixes flakey CI builds. Turns out it was trying to run every single test
in parallel at once, which is why when #247 added two extra tests it was
just enough to push it over the limit and cause things to fail
@DunetsNM
Copy link
Contributor Author

DunetsNM commented Aug 5, 2020

OK seems like bug needs to be fixed in two places

  1. add third slash in file: urls (trivial)

  2. Update VS Code extension that overrides file urls with custom command (see Show docs as docs, not as sources vscode-haskell#21) It doesn't understand backslashes from Windows file paths.

As alternative, slashes in paths can be normalized to forward slashes within HLS code?

Looking into this...

fendor pushed a commit to fendor/haskell-language-server that referenced this issue Aug 10, 2020
Fixes flakey CI builds. Turns out it was trying to run every single test
in parallel at once, which is why when haskell#247 added two extra tests it was
just enough to push it over the limit and cause things to fail
@DunetsNM
Copy link
Contributor Author

DunetsNM commented Sep 4, 2020

Fixed as of 0.4.0

@DunetsNM DunetsNM closed this as completed Sep 4, 2020
pepeiborra added a commit that referenced this issue Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: windows type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

2 participants