haskell-te: 29de4f7981d5fc35575c471814774b3af7118fe4
1: From: Chris Warburton
2: Date: Mon, 31 Jul 2017 17:54:08 +0100
3: State: new
4: Subject: Apply memory limits to individual buckets
5: Message-Id: <d9c91ce7c958cbd0-0-artemis@nixos>
6:
7: We can run MLSpec without a memory cutoff, but it's dangerous as it'll
8: gladly eat up all of our RAM.
9:
10: Instead, we apply a cutoff using withTimeout. That works, but it's a
11: little bit crappy since the whole point of using buckets is that we get
12: to use multiple processes. Hence we should allow our limits to be set on
13: the individual runners, rather than the invoker.
14:
15: One way to do this would be to augment `wrapper.sh` in nix-eval, e.g. to
16: accept a new env var like `NIX_EVAL_WRAP_PROGRAM`. If found, that would
17: be invoked with the given command (`runhaskell ...`) as an argument.
18:
19: We can then set it to a script which calls `wrapProgram`. Note that we'd
20: probably have to propagate any given limit through "manually", since it
21: may be running in a different environment to our invoking CLI.
22:
23: Note that MLSpec is used by hashspec as well, so this should apply to
24: both.
Generated by git2html.