Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve finding of Cabal files #585

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Bodigrim
Copy link

@Bodigrim Bodigrim commented Mar 13, 2025

Might fix haskell/haskell-language-server#4515 or at least eliminate a few suspects.

In an unlikely event of several Cabal file in the same folder
Stan currently chooses to return the first of them, but inadverently
forgets to prepend a directory name.

Merging (x : _xs) case with [cabalFile] has a nice side effect
of making the search a bit faster: previous version of the code
would necessarily scan the entire folder looking for the second
Cabal file (because if it is to be found, outcomes will be different),
but now we shall stop after finding the first one.

Related to haskell/haskell-language-server#4515
.git folder can contain a maze of thousands of subfolders,
this is definitely not a place to look for Cabal files.

Related to haskell/haskell-language-server#4515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Space leak caused by stan plugin
1 participant