Mike Hommey wrote:
On Sat, Nov 30, 2013 at 12:39:59PM +0900, Mike Hommey wrote:
Incidentally, in those two weeks, I did two attempts at building
without unified sources, resulting in me filing 4 bugs in different
modules for problems caused by 6 different landings[1]. I think it is time
to seriously think about having regular non-unified builds (bug 942167).
If that helps, I can do that on birch until that bug is fixed.

Speaking of which, there are essentially two classes of such errors:
- missing headers.
- namespace spilling.

The latter is due to one source doing "using namespace foo", and some
other source forgetting the same because, in the unified case, they
benefit from the other source doing it. I think in the light of unified
sources, we should forbid non-scoped use of "using".

That is:

     using namespace foo;

would be forbidden, but

     namespace bar {
         using namespace foo;
     }

wouldn't. In most cases, bar could be mozilla anyways.

Thoughts?

Engineering-heavy solution:
* You can extend one of clang header checks(eg only include what you use) to make sure each cpp actually includes what they use.

* ditto re writing a clang analysis for namespace collisions.

Some clever contributor like JCranmer could knock this out in no time. We could then run these on debug builds on our infra without much extra overhead.

Throw resources at this solution:
Alternatively, forcing a non-unified debug build on our infra would catch most of these at higher infra cost.

Taras
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to