Closed jhrcek closed 4 months ago
Hello @jaspervdj could you please check this when you have some time?
Converting to draft while I'm groping in the dark, trying to make CI pass..
Actually feel free to leave the CI changes out, I can try to get them in as a separate PR.
Ok, thank you. Forgive my sausage fingers, I wanted to force push (-f) the branch with CI change commits reset but instead I deleted the branch in my remote (-d) :sweat_smile: I reopened the PR in https://github.com/haskell/stylish-haskell/pull/483
An attempt to resolve https://github.com/haskell/stylish-haskell/issues/478
The intention is to make it possible to avoid dependency on getCurrentDirectory (which is problematic in haskell-language-server where multiple things running concurrently might depend on current directory and having to setCurrentDirectory just for stylish-haskell to be able to find the right config might lead to various race conditions).
The way to achieve it is to introduce new datatype
ConfigSearchStrategy
whose constructorSearchFromDirectory startDir
makes it possible to supply a directory explicitly.See this HLS PR for an example of how this new functionality would be used: https://github.com/haskell/haskell-language-server/pull/4338