Skip to content

Include only existent files (no dirs) in config files discovery #3

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

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

@georgefst
Copy link

I'm not sure this is quite correct? Since that function is also used by e.g. stackWorkDir, which actually expects a directory.

@jneira
Copy link
Collaborator Author

jneira commented Sep 21, 2020

@georgefst ugh, thanks for noting that, I saw the unused binding and I assumed with no further thinking that it should be used but we forgot to do it.
And the name of the function did not help too.

@jneira
Copy link
Collaborator Author

jneira commented Sep 21, 2020

Ok i think this version could be correct. It contains some duplication but i think names are clear and the diff is not big.
I've tested it with some projects and it worked fine. A test suite could be invaluable.

@jneira
Copy link
Collaborator Author

jneira commented Sep 22, 2020

@Avi-D-coder dont want to be pushy but could you take a quick look to fix the bug asap?

Copy link
Owner

@Avi-D-coder Avi-D-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct.
I have not yet tested it.
If you think it's ready feel free to merge and I'll cut a release.

@Avi-D-coder
Copy link
Owner

I'm not exactly clear about how to reproduce haskell/haskell-language-server#417, is it a standalone file or a project? What does tree look like?

@jneira
Copy link
Collaborator Author

jneira commented Sep 22, 2020

i've reproduced it running hls in console mode in a directory with only a standalone hs and create in its parent directory an empty directory named .cabal

@Avi-D-coder
Copy link
Owner

Avi-D-coder commented Sep 22, 2020

Thanks. I have no concerns. I used hls with this patch and everything seems to work. Is it ready to merge?

@jneira
Copy link
Collaborator Author

jneira commented Sep 22, 2020

Yeah, it is ready. Thanks for testing it.

@Avi-D-coder Avi-D-coder merged commit 76d206e into Avi-D-coder:master Sep 22, 2020
@jneira jneira deleted the fix-find-cabal branch September 29, 2020 06:31
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.

Implicit cradle failure: /home/user/.cabal: openFile: inappropriate type (is a directory)
3 participants