Open MangoIV opened 1 year ago
I agree, what kind of source cleaning do you have in mind? Removing all the files that are not haskell sources? So Nix sources, markdown, etc...
Would you prefer something homemade around builtins.path
or an already existing project lke nix-filter?
I'm not sure about the solution we would aim for, but perhaps something like nix-filter
is a good idea; if it offers a flake part, even better. Currently I think I would expect
The filter should be configurable. Perhaps similar to how crane
does it. (you can skip the filter entirely, if you wish)
I currently think that blacklisting files is the better solution than whitelisting because we tend to have unexpected formats; e.g. goldens that would lead to unexpected errors and this would imply frequent adjustments on the user side
Yes better blacklisting in the most conservative possible way, we can always expose a flake-parts
option to extend the blacklist or change method (a whitelist or a custom predicate).
And what about also transforming haskell sources in a "normal form"? I don't know if this is something that someone already did and if it really makes sense (is worth? What are downsides?). I mean applying idempotent operations that do things like removing comments or applying a formatting.