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
Labels
documentation
Doc improvements needed
feature request
Request for new functionality
P2
major: an upcoming release
user-facing
Improvement that increases user experience
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 innixpkgs/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:
builtins.filterSource
(Improve sources.nix in nixpkgs to make it easier to ignore stuff #84)Related: #49
The text was updated successfully, but these errors were encountered: