-
-
Notifications
You must be signed in to change notification settings - Fork 409
Rely on gitignore to exclude listed files in ghcide (#4665) #4736
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
base: master
Are you sure you want to change the base?
Conversation
013cd7b to
5db38c5
Compare
|
I don't think the CI failure is related to my PR. |
Looks like a flaky thing, it fixed itself |
5db38c5 to
4b705d1
Compare
|
Thanks, let's try again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments, otherwise LGTM!
Unfortunately, there are not automated tests for this cli mode, we'd need to add some, but that's some fair amount of work...
3ef4d76 to
7957387
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of issues when trying this patch on the HLS codebase, but otherwise I like the direction!
dfa2415 to
cc29abb
Compare
cc29abb to
b38f4d5
Compare
|
I won't lie, I have no clue about the broken pipe on windows error is related to my change. |
|
@blackheaven it is not caused by you. As already said, iirc there is not a single test case for the code path you are changing, so you can safely ignore any CI failures except pre-commit and |
|
Thanks a lot |
| Just _ -> \path -> do | ||
| let lookups = | ||
| if takeExtension path `elem` [".hs", ".lhs"] | ||
| then [path] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question, what should happen if a user explicitly asks for a file to load, but the file is .gitignored?
Should we perhaps still load it? I feel like, that might be more natural behaviour, but I am admittedly not sure.
If we do want to ignore ignored files, then I would still suggest that we should warn the user in this case, that we ingored a file they requested.
This aimes to fix #4665.
Note that I directly calling
git, as thgitignoreformat is non-trivial.I can roll a partial parsing implementation if requested.