[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18113 - eelco - nixpkgs/trunk/pkgs/top-level
Nicolas Pierron
nicolas.b.pierron at gmail.com
Wed Nov 4 20:14:00 CET 2009
On Wed, Nov 4, 2009 at 19:53, Michael Raskin <7c6f434c at mail.ru> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Eelco Dolstra wrote:
>> Log:
>> * Before selecting an attribute from `x', check whether it's an
>> attribute set. `tryEval' no longer catches this.
>
> By the way, that looks like a symptom that your watering tryEval down
> breaks the purity. Imagine our pattern of passing derivation or null.
> Let us have
> C = pkg: { a = A pkg; b = B pkg; };
> Now let A assert that the pkg is a package, and B just uses its outPath.
> "tryEval (C null)" now depends on execution order. It seems to be
> unfortunate.. Maybe catch all errors not damaging execution environment?
>
> Also, if A asserts and B aborts we again have execution order problem.
I disagree. There is no problem here because tryEval (C null) does
not evaluates it's content which means that the evaluation is correct
and you get the following result:
{ a = A null; b = B null; }
which is not yet evaluated. Such problem occur when you use it with
functions like toXML, then the evaluation is not defined by the
semantic. In practice, this may follow the alphabetical order (not
sure).
--
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
If you are doing something twice then you should try to do it once.
More information about the nix-dev
mailing list