Skip to content

Stan should normalize incoming file paths to be relative #556

@keithfancher

Description

@keithfancher

Related to the HLS issue haskell/haskell-language-server#3174 and its associated PR haskell/haskell-language-server#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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions