Skip to content

hie.yaml should take priority over cabal/stack as the project_root #505

@MangoIV

Description

@MangoIV

Hi!
I think wrt project root detection, it would be good to have hie.yaml take priority over cabal or stack project root detection, as, if it exists, it usually specifies a more specific cradle than the one specified by stack or cabal.

This is problematic in practice, since e.g. GHC has a ghc.cabal.in file in the ./compiler subdir, so haskell-tools detects the project root to be ./compiler(and not ./.) but then the hie.yaml still starts the cradle from ./. which is no ./compiler and thus fails.

An alternative fix to the issue at hand would be to allow the user to set the project root dir when invoking the language server via the Hls command.

Tell me which solution you would prefer and if I should tackle one of them.

Hope you're doing well!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions