kowainik / kowainik/stan

Stan should normalize incoming file paths to be relative

Open
#556 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
597
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Related to the HLS issue https://github.com/haskell/haskell-language-server/issues/3174 and its associated PR https://github.com/haskell/haskell-language-server/pull/4023.

Stan's `checksMap` and `createCabalExtensionsMap` use *relative* paths, but Stan will happily take absolute paths for queried HIE files. Paths coming in from HLS, for example, were absolute, causing Map misses and resulting in the above issue. The result of these misses is that Stan didn't detect *any* enabled language extensions, and, e.g., would spam the user with suggestions to enable `StrictData`.

I would suggest normalizing incoming files, ensuring they're relative as expected, to avoid issues like this in the future. And/or documenting that Stan expects relative paths.

Thank you!

Contributor guide

Open the contributing guide

Research direction

Start by tracing the incoming HIE file paths into Stan's `checksMap` and `createCabalExtensionsMap`, using the linked HLS issue and PR for context. Confirm how absolute paths produce map misses, then verify that incoming paths are handled consistently with the relative paths used by those maps.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.