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

Make sure all paths to config files are made absolute #1895

Closed
anka-213 opened this issue Jun 5, 2021 · 3 comments
Closed

Make sure all paths to config files are made absolute #1895

anka-213 opened this issue Jun 5, 2021 · 3 comments
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@anka-213
Copy link
Contributor

anka-213 commented Jun 5, 2021

This causes test failures when using the latest version of lsp

See this PR for a demonstration of the test failures: #1894

A git bisect points me to this PR: haskell/lsp#326

Lsp changing the current directory was causing other problems and had to be removed. It's unfortunate that this is blocking the 9.0 upgrade, but it will need to be fixed on the hls plugins side. It should be a simple matter of making sure all relative paths to config files are made absolute using the workspace root

Originally posted by @pepeiborra in #1649 (comment)

@Ailrun Ailrun added the type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. label Jun 5, 2021
@pepeiborra
Copy link
Collaborator

pepeiborra commented Jun 6, 2021

Most of the test failures in #1649 are actually caused by test expectations that include file paths:

  • All the tests in tests/functional/Progress.hs match for progress messages that include a file path
  • The code action tests match for diagnostics on a file path

Those paths need fixing because the working directory is no longer the workspace root. Alternatively, make the tests more robust by fixing those expectations to not include paths. I can send a PR tomorrow if you don't get there first.

The only remaining failure is for the test that checks that the hlint plugin honors the .hlint.yaml file, which will probably require changes in the hlint plugin itself

@pepeiborra
Copy link
Collaborator

The code action tests are failing because they use a direct cradle with relative paths in it. This is a valid thing to do and in order to support it, we'll need to change the working directory to the cradle location in ghcide since lsp no longer does this implicitly.

@anka-213
Copy link
Contributor Author

I believe this has been fixed by @pepeiborra in #1897.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants