On Mon, Aug 31, 2015 at 11:09 AM, Ehsan Akhgari <ehsan.akhg...@gmail.com> wrote: >> >> Should we hold third-party code to the same warning levels as Mozilla's >> home-grown code? > > Yeah, I think in practice it's impossible to hold such code to our > standards.
I agree. I wrote the following in the comment describing ALLOW_COMPILER_WARNINGS. This is commonplace (almost mandatory, in fact) in directories containing third-party code that we regularly update from upstream and thus do not control, but is otherwise discouraged. > 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. Nick _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform