mlabs-haskell / mlabs-tooling.nix

A flake that provides everything necessary to set up a project within our sopes. This includes the necessary maintenance as well as CI.
MIT License
7 stars 7 forks source link

source cleaning #41

Open MangoIV opened 1 year ago

MangoIV commented 1 year ago
aciceri commented 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?

MangoIV commented 1 year ago

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)

MangoIV commented 1 year ago

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

aciceri commented 1 year ago

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.