[Nix-dev] Rust prebuilt package overlay.
William Casarin
jb55 at jb55.com
Sun Apr 16 14:57:55 CEST 2017
Nicolas Pierron <nicolas.b.pierron at nbp.name> writes:
> On Fri, Apr 14, 2017 at 4:40 PM, William Casarin <jb55 at jb55.com> wrote:
>>
>> $ nix-shell -p rustChannels.stable.rust
>>
>> [...]
>> while evaluating ‘tokenizer_rec’ at /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:6:46, called from /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:41:20:
>> compiling pattern ‘([
>> ]+(=|[[][[][a-zA-Z0-9_."*-]+[]][]]|[[][a-zA-Z0-9_."*-]+[]]|[a-zA-Z0-9_-]+|"[^"]*")[
>> [... same line repeated 4094 times ...]
>> ]+(=|[[][[][a-zA-Z0-9_."*-]+[]][]]|[[][a-zA-Z0-9_."*-]+[]]|[a-zA-Z0-9_-]+|"[^"]*")).*’: out of memory
>>
>> Looks like some kind of infinite recursion bug?
>> Seems to work fine on my nixos box though 🤔
>
> There is a constant[1] that you can modify in the overlay, by
> increasing it, it would make a smaller pattern and consume less
> memory, but it would make take more time to parse the content of the
> file.
This worked. Increasing it to 180 fixed it. I was watching activity
monitor and noticed spikes of 14GB memory usage (12GB compressed) so
about ~2-3GB real. It looks like generatePatterns is creating 14GB+
of strings!?
Thanks for the help,
--
https://jb55.com
More information about the nix-dev
mailing list