[Nix-dev] Re: [Nix-commits] SVN commit: nix - 17371 - eelco - nix/trunk/src/libexpr

Eelco Dolstra e.dolstra at tudelft.nl
Thu Sep 24 10:31:05 CEST 2009


Hi,

Michael Raskin wrote:

> Eelco Dolstra wrote:
>> * tryEval shouldn't catch all exceptions of type Error, since not all
>>   of them leave the evaluator in a continuable state.  Also, it should
>>   be less chatty.
> 
> What are these that spoil the state?

For example, when using the Nix daemon, an derivation attribute that references
an non-existant file (e.g. foo = /no-such-file) will throw an Error deep in
remote-store.cc, which causes the client and the server to end up in
unsynchronised states wrt the protocol.  So any further derivation primop will fail.

> Erm, not that nice. I can list a set of other reasonable use-cases.
> TypeError: some packages use stdenv.glibc, and tryEval could treat this
> TypeError just like an assert.

Yes, maybe it should catch EvalError.  However I'm a bit scared of having an
"ignore all bugs" primop.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list