[Nix-dev] Re: [Nix-commits] SVN commit: nix - 15941 - NicolasPierron - in nixos/branches/modular-nixos: maintainers/scripts modules

Eelco Dolstra e.dolstra at tudelft.nl
Fri Jun 12 13:29:06 CEST 2009


Hi,

Nicolas Pierron wrote:

> Author: NicolasPierron
> Date: 2009-06-11 17:59:47 +0000 (Thu, 11 Jun 2009)
> New Revision: 15941
> 
> You can view the changes in this commit at:
>    https://svn.nixos.org/viewvc/nix?rev=15941&view=rev
> 
> Added:
>    nixos/branches/modular-nixos/modules/module-list.mask
> Modified:
>    nixos/branches/modular-nixos/maintainers/scripts/gen-module-list.sh
>    nixos/branches/modular-nixos/modules/module-list.nix
> 
> Log:
> Replace special rule by a module-list.mask file which enumerates all
> patterns matching the files which should not figure in module-list.nix.

This just adds more complexity to maintaining module-list.nix.  I say we just
get rid of gen-module-list.sh.

Without it, when you add a module, you have to do the following:

- Add one trivial line to module-list.nix if you want the module to be included
by default.

And that's it.

But with it, you have to do the following:

- If you want the module included by default:
  - Check that the module's filename doesn't match the exceptions in
module-list.mask.  If so tweak module-list.mask.
  - Run gen-module-list.sh.
  - Check that it didn't screw up.  For instance, gen-module-list.sh fails to
evaluate the module properly if it contains assertions that refer to "config".
- If you don't want it included by default:
  - Add it as an exception to module-list.mask.
  - Run gen-module-list.sh just to make sure you didn't screw up.

And it has a nasty failure mode:

- If you don't want it included and you forget to add it to module-list.mask and
don't run gen-module-list.sh, everything will work fine until somebody else runs
it and commits the resulting file.

And running gen-module-list is also slower than just adding a line to
module-list.nix.

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



More information about the nix-dev mailing list