[Nix-dev] Re: [Nix-commits] SVN commit: nix - 15668 - MarcWeber - in nixos/branches/modular-nixos: etc system

Marc Weber marco-oweber at gmx.de
Wed May 20 15:01:13 CEST 2009


On Wed, May 20, 2009 at 09:17:29AM +0200, Nicolas Pierron wrote:
> Hi,
> 
> I don't understand why you have removed all " activateLib.* ".  This
> was made to have a central repository of functionalities provided to
> the current snippet of code.  By removing it, you reduce the error
> messages which should tell you where things started to go wrong (bad
> naming -> attribute does not exists).  Even if the solution sounds a
> bit stupid:
> 
> activateLib.systemConfig = "systemConfig"
> 
> should do the trick and wouldn't have require such modifications.

I agree. However maybe an addErrorContext call is fine as well ?
This requires only one additional line of code.
It's not as easy to spot the cause then though.
However in the long run we should have a wiki with a FAQ anyway.
we could list common causes of failures there.

I thought about it. And I finally decided that I'd like to get rid of
all the "Don't get infinite recursions" stuff etc.
Now modular-nixos boots again so we can readd those stuff.

I wasn't sure what this

{ deps = [ "x" ];
  text = "...";
}

means now.
In the past it meant: x is a requirement for the current text snippet.
Now you could ignore x if it isn't contained within the attr set also
allowing 
"If x has to be included to it before the current snippet. But the
 current snippet doesn't depend on it"

So indeed we could extend it to

{ after = [ "x" ]; # if the x attr doesn't exist ignore it
  depend = [ "y"]; # if y attr doesn't exist cause fatal error. We depend on it
  text = "...";
}

Sincerly
Marc Weber



More information about the nix-dev mailing list