-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow excluding patterns #84
Conversation
expectDiscover | ||
[["M.hs"]] | ||
"library\n -- cabal-gild: discover .\n exposed-modules:" | ||
"library\n -- cabal-gild: discover .\n exposed-modules: M\n" |
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.
This is a new test since I changed all the existing discover .
to just discover
.
(Either E (), S, W) | ||
runGild arguments inputs files = | ||
runTest | ||
(Gild.mainWith arguments) | ||
( Map.fromList inputs, | ||
Map.mapWithKey (\d fs -> FilePath.combine d <$> fs) $ Map.fromList files | ||
Map.singleton "." (fmap FilePath.joinPath files) |
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.
This changed since now walk
is only ever called with "."
as the first argument.
This is arguably a breaking change since you can no longer discover modules outside the current directory, but that never would've worked with Cabal anyway so I don't think it matters. Note that the only special character is |
Fixes #66.
This is wildly inefficient, which is why it's still a draft. I think the best way forward is to change
MonadWalk
to be a wrapper aroundgetDirectoryFilesIgnore
. That way I should be able to efficiently support both excluding and including (#67).