[Nix-dev] Incremental recompilation
Kosyrev Serge
_deepfire at feelingofgreen.ru
Sat Apr 30 19:46:13 CEST 2016
Nicolas Pierron <nicolas.b.pierron at gmail.com> writes:
> Also, I admit I thought on how to solve this issue in the first place,
> but the main problem I got is not even building, this is only about
> making a copy of the source directory into the nix store.
> When your project sources are larger than 1 GB (without the VCS), you
> don't want to be reading all the bytes before being able to start any
> compilation.
>
> Thus, none of the approaches proposed before are practical for larger projects.
> So, how can we make it such that it will scale?
>
> The only approach I can think of would be to:
> - Upload each individual file to the Nix store, when they would be needed.
> - Make a symlink fram to re-build fake source directories.
> - Use hash-by-content to prevent recompilation. (when using "gcc
> -M" to filter out directory content, you want to make sure you get
> the same set of headers, and only cause a recompilation if some of the
> header changed)
One small nitpick: using the global nix store for developer builds is questionable.
Global store:
1. Shouldn't be subject to volatility inherent to developer code:
- tens to hundreds rebuilds per day
- hundreds to tens of thousands of objects per day
2. Isn't GC-able by the developer, only by system administrator
If we agree, then the way to go is providing for composition of stores
-- the effective store to become a sum of system-wide and user-local stores.
--
с уважениeм / respectfully,
Косырев Сергей
More information about the nix-dev
mailing list