Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Guide users in filtering their source so that evaluations don’t happen too often. #51

Open
Profpatsch opened this issue Apr 4, 2019 · 0 comments
Labels
documentation Doc improvements needed feature request Request for new functionality P2 major: an upcoming release user-facing Improvement that increases user experience

Comments

@Profpatsch
Copy link
Collaborator

Profpatsch commented Apr 4, 2019

If you do a naive src = ./. somewhere, nix will have to re-import the whole directory into the store each time any file in ./. changes, which usually includes things like ./.git or ./dist or ./target, meaning lorri will start many useless evaluations.

See #6 as an example.

You can use builtins.filterSource and the functions in nixpkgs/lib/sources.nix to filter which files nix imports (and thus which files lorri watches), but they are extremely unintuitive and notoriously hard to use and debug.
pkgs/build-support/nix-gitignore or https://github.com/Profpatsch/nixperiments/blob/master/filterSourceGitignore.nix are another practical approach that uses the projects .gitignore files.

So we basically need three (four) things:

Related: #49

@Profpatsch Profpatsch added documentation Doc improvements needed feature request Request for new functionality P2 major: an upcoming release user-facing Improvement that increases user experience labels Apr 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Doc improvements needed feature request Request for new functionality P2 major: an upcoming release user-facing Improvement that increases user experience
Projects
None yet
Development

No branches or pull requests

1 participant