On 4/16/2013 10:15 PM, Robert O'Callahan wrote: > I have a request ... can we require lists in moz.build files to be in > alphabetical order, and actually enforce with some build-system check? I'm > always annoyed by Makefiles where lists are sometimes unordered and it's > hard to find items and know where to add items.
Theoretically, yes. And I do empathize with the desire to have them alphabetical. However, it's not the easiest to implement. And it's all because of assignments behind condition blocks. A few months ago I experimented with Python's built-in AST module [1] to statically analyze moz.build files. I didn't make much progress after a few hours and decided my time was better spent elsewhere. We have bug 774381 [2] open to implement a style checking tool for moz.build files. However, because it's non-trivial and because I think time is better spent on making the build faster (making the export tier fully non-recursive is within grasp and experimenting with different C++ compilation techniques like PCH should be attainable once CPPSRCS and friends are in moz.build), I doubt you'll see any of the usual suspects work on it any time soon. But, if someone authors a patch [hopefully with decent test coverage], I'll gladly review it. If it's any consolation, the tool we're using to automatically convert Makefile.in variables to moz.build files sorts lists. I hope enough people realize the lists are sorted and follow the convention until a tool can enforce it. [1] http://docs.python.org/2/library/ast.html [2] https://bugzilla.mozilla.org/show_bug.cgi?id=774381 _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform