reflex-platform icon indicating copy to clipboard operation
reflex-platform copied to clipboard

Reflex-platform should run lib.cleanSource on packages passed to project

Open matthewbauer opened this issue 6 years ago • 4 comments

Reflex-platform accepts the "packages" attrset that maps local packages Cabal names to the local directory containing the developed source code. This directory could have caches, backups, or other garbage files that may interfere with building.

Nix provides the lib.cleanSource function to delete these paths matching the wildcard. To make things easier on users, it might make sense to clean those paths passed in packages automatically.

matthewbauer avatar Jan 16 '19 21:01 matthewbauer

Any reason not to use https://github.com/hercules-ci/gitignore.nix instead?

srid avatar May 14 '20 02:05 srid

I've wanted that as well. However we did run into a very strange issue that seemed to come from gitignore.nix: https://github.com/obsidiansystems/obelisk/blob/d9df151ed175be4f2dff721676e412a88a0596c1/nixpkgs-overlays/default.nix#L8-L12

3noch avatar May 14 '20 04:05 3noch

lib.cleanSource (gitignoreSource src);

Isn't lib.cleanSource here redundant? I guess you need it only if you have a global gitignore configuration that ignores extra stuff (ref).

srid avatar May 14 '20 14:05 srid

It probably is but the point is that we had some very strange behavior after using gitignoreSource so it makes me hesitant to apply it to everyone.

3noch avatar May 14 '20 15:05 3noch