On 2015-08-31 6:36 PM, Nicholas Nethercote wrote:
We recently captured a (hopefully full) list of third party code for
rewriting purposes under
<https://dxr.mozilla.org/mozilla-central/source/tools/rewriting/ThirdPartyPaths.txt?offset=100>.
It looks like a useful starting point for finding third party code in
Mozilla.  If you see omissions, please file bugs!

This file was helpful to me while working on this bug, though I didn't
treat it as gospel. I also realized that there are some subtleties
that it doesn't capture, because there are at least three kinds of
"third-party" code.

1. "True" third-party code where we regularly update from upstream,
e.g. db/sqlite3/src/.

2. Code that was originally third-party that we imported and forked
and no longer update from upstream, e.g. ipc/chromium/.

3. Code where "we are upstream", i.e. other projects import code from
our tree. I believe gfx/qcms/ is one example.

The treatment of each kind depends on the context.

- For code formatting purposes, all three kinds are likely to not
follow our coding style, and so should be excluded from any kind of
automatic style checking or rewriting. (I believe this is the use case
intended for tools/rewriting/ThirdPartyPaths.txt.)

- For compiler warnings purposes, only kind 1 should get a blanket
ALLOW_COMPILER_WARNINGS; kinds 2 and 3 should be held to the higher
no-warnings standard, and so I added "XXX: These warnings should be
fixed" comments to moz.build files for kinds 2 and 3.

- There may be other cases I haven't thought of yet.

So I was wondering if ThirdPartyPaths.txt should be changed so that
each entry gets a value indicating which kind it is.

Hmm, in my mind, there is actually two categories here:

* Code that we have no business modifying according to our standards (be it about compiler warnings, formatting, etc.)
* Code that we can modify to match our standards.

ThirdPartyPaths.txt tries to capture the first, I think. Does that first category really need to be broken into two?

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

Reply via email to