haskell / haskell/haskell-language-server

Work out how absolutizing paths should work

Open
#4,278 0 comments 1 reaction 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
3d 21h
Merged PRs (30d)
13

Description

## Is your enhancement request related to a problem? Please describe.

We realised in https://github.com/haskell/haskell-language-server/pull/4231 that we don't really know how we are supposed to absolutise paths. We have a few cases:

1. File paths that come from other tools, e.g. cabal. Probably these need to be relative to our working directory; or ideally we should avoid doing things that depend on our working directory at all.
2. File paths that come from the client. Probably these need to be relative to a LSP workspace folder, but it's not entirely clear.
- This is tricky: how do we know _which_ workspace folder to use? Maybe we have to guess from the request? At least it would be nice to have whatever weird heuristic we end up with written down in some code.

It would be nice to tidy this up, but it probably relies on https://github.com/haskell/haskell-language-server/issues/4277 so we can actually tell where this is happening.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read PR #4231 and issue #4277 first to locate the path handling; the issue names no file or test. Map the existing cases for tool- and client-provided paths, then establish and document the workspace and working-directory rules and verify the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
backend-api-design, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.