Rely on gitignore to exclude listed files in ghcide (#4665)#4736
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 |
fendor
left a comment
There was a problem hiding this comment.
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
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.
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.
There was a problem hiding this comment.
We could add an option in the CLI to by-pass gitignore, but I guess it'll be more complex.
Any idea which form the warning would take?
There was a problem hiding this comment.
The warning should probably just be printed via the Recorder, so nothing fancy.
017975b to
f81a6b6
Compare
f81a6b6 to
fa2c3cf
Compare
|
Our CI is broken for good right now, @wz1000 is looking into it, but we don't know how long it is going to be broken... |
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.