Граф коммитов

26 Коммитов

Автор SHA1 Сообщение Дата
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Nathan Froyd 20f2bebd3f Bug 1547038 - ignore unrelated errors when checking compiler flags with ccache; r=chmanchester
Using `ccache` apparently interferes with how flag checking is done when
we're using `clang` as our compiler.  We can work around this by adding
a few more flags to flag checking.

Differential Revision: https://phabricator.services.mozilla.com/D28895

--HG--
extra : moz-landing-system : lando
2019-04-30 20:04:22 +00:00
Mike Hommey dd9123bf89 Bug 1515257 - Add a check_symbol function that checks whether a symbol can be linked against. r=firefox-build-system-reviewers,ted
Depends on D14950

Differential Revision: https://phabricator.services.mozilla.com/D14951

--HG--
extra : moz-landing-system : lando
2018-12-19 11:23:41 +00:00
Mike Hommey bcdb05188c Bug 1515257 - Add onerror argument to check_header(). r=firefox-build-system-reviewers,ted
Depends on D14948

Differential Revision: https://phabricator.services.mozilla.com/D14949

--HG--
extra : moz-landing-system : lando
2018-12-19 11:20:26 +00:00
Mike Hommey 148c9de331 Bug 1498450 - Avoid the footgun from @depends-function comparison r=froydnj
While we do have some uses of @depends-function comparison in some
templaces, related to host/target, we ought to be using `is` comparisons
rather than `==` anyways, so we switch those, and prevent other kinds of
comparisons being used at all.

This unveils the one noted in
https://phabricator.services.mozilla.com/D7713?id=21357#inline-30414
(and surprisingly only that one), that we remove entirely since it was
doing nothing in practice. Bug 1492305 will have to add it back in a
proper form.

Differential Revision: https://phabricator.services.mozilla.com/D8501

--HG--
extra : moz-landing-system : lando
2018-10-12 13:44:08 +00:00
Mike Hommey ec8fa73867 Bug 1426555 - Allow to add host compiler flags from python configure. r=chmanchester
Bug 1325632 added some facility to add target compiler flags. This
change extends it to add allow adding host compiler flags as well.

--HG--
extra : rebase_source : 424b405a1d8f9a4778ff75c3308c9622f050e194
2017-12-21 11:11:22 +09:00
Tom Ritter 59de60ae4b Bug 1407343 Silence multiple classes of warnings for the MinGW build, including not enabling format warnings unless -Wformat is set r=froydnj,glandium
MozReview-Commit-ID: ALmo1hbqVxC

--HG--
extra : rebase_source : a68475b90372cd5679c37474fb6705b2a5d48ddf
2017-11-16 12:36:33 -06:00
Nathan Froyd f51359bd19 Bug 1325632 - part 5 - ensure that we compile with -fno-sized-deallocation when possible; r=chmanchester
We currently turn off the C++14 sized-deallocation facility on MSVC, and
we'd like to ensure we do the same thing for clang and gcc.  To do so,
we add new functionality to moz.configure for checking and adding
compilation flags, similar to the facility for checking and adding
warning flags.  The newly added facility is then used to add
-fno-sized-deallocation to the compilation flags, when the option is
supported.

Once we do this, we can't define the sized deallocation functions in
mozalloc.h; the compiler will complain that we are using
-fno-sized-deallocation, yet defining these special functions that we'll
never use.  These functions were added for MinGW, where we needed to
compile with C++14 ahead of other platforms to be compatible with MSVC
headers.  But they're no longer necessary, though they would be if we
removed -fno-sized-deallocation; the compiler will complain if we do
that and we'll add them back at that point.
2017-11-15 14:53:16 -04:00
Nathan Froyd 2e127f22ea Bug 1325632 - part 4 - split out framework for testing flags; r=chmanchester
We have code to test whether particular flags are supported for the
compiler we're using.  Unfortunately, that code is tied up with checking
for warning flags.  We're about to add a separate facility for generic
compilation flags, and we'd like to avoid cutting and pasting code if
possible.  Let's split the core code out into a separate, reusable function.
2017-11-15 13:53:16 -05:00
Sylvestre Ledru 816ba0c177 Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 278ceb2d7d31da086216288bd54688fe25faa03b
2017-10-12 15:22:59 +02:00
Sebastian Hengst 3980c1732a Backed out changeset 4dc78384cb58 (bug 1406668) for flake8 linting failures. r=backout
--HG--
extra : rebase_source : 20f93207038c76e2804f255e4ebfdd5e03a8f7cc
2017-10-12 15:08:35 +02:00
Sylvestre Ledru a102c9f46a Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 658301cb32e9c042cd1931456e4e7b8f475900bd
2017-10-11 16:28:29 +02:00
Sebastian Hengst 7a40cdf1bb Backed out changeset b526011049ee (bug 1406668) for linting failures. r=backout
--HG--
extra : amend_source : fe8373f9572300c7fd090f529c6957fbf905d9ef
2017-10-12 14:41:28 +02:00
Sylvestre Ledru 4e4de3339f Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 3d22007ea6793961e7031603efe58cdc66e3c6c9
2017-10-11 16:28:29 +02:00
Mike Hommey 563880df0e Bug 1363585 - Forbid boolean operations on @depends functions. r=chmanchester
Doing something like "not foo" when foo is a @depends function is never
going to do what the user expects, while not necessarily leading to an
error (like, when used in set_config).

It is better to have an error in those cases where it's expected not to
work, at the expense of making templates a little more verbose, rather
than silently do something the user is not expecting.

--HG--
extra : rebase_source : 87ba80eccc5606322f6dd185d5cb5fc88471e51b
2017-05-10 11:35:22 +09:00
Sylvestre Ledru aaea07bd8e Bug 1351108 - Add the onerror argument to try_compile r=glandium
MozReview-Commit-ID: 9WNcdWhmUEB

--HG--
extra : rebase_source : 39ffa3de812c0cfc51a5505331acbf767a484821
2017-03-27 23:12:56 +02:00
Mike Hommey 6fa3828b4e Bug 1316844 - Remove unused dependencies. r=chmanchester
--HG--
extra : rebase_source : f9c4f39b198fbb83aa02b2eee65863695e7b75ca
2016-11-11 12:52:37 +09:00
Chris Manchester 732cc6b973 Bug 1304522 - Fix the "when" argument to check_header to actually make checks conditional. r=glandium
MozReview-Commit-ID: JlYUFsPRGAV

--HG--
extra : rebase_source : 8cd667969fefb043f9769f35ba1fd12fe209a2b4
2016-09-21 22:02:43 -07:00
Mike Hommey 93ac00658e Bug 1293837 - Change try_compile() to return True when the test passes. r=chmanchester
Currently, it returns either None or the contents of the compiler's stdout,
which is always expected to be an empty string, and is not very useful. So
instead, return True in the latter case.

--HG--
extra : rebase_source : ee69cdeab38d27178ce759591fb394da65e694ac
2016-08-10 10:00:43 +09:00
Mike Hommey 4eba7db364 Bug 1293579 - Use the new `dependable` function in a few places. r=chmanchester
--HG--
extra : rebase_source : 7062361fdb8e61b43a4044a3a7b1bf04f6ef3143
2016-08-09 15:55:10 +09:00
Mike Hommey 77ee4f3ce4 Bug 1292463 - Move MOZ_C{,XX}_SUPPORTS_WARNING to python configure. r=chmanchester 2016-08-10 10:50:01 +09:00
Mike Hommey 7a80b4e7ee Bug 1292463 - Rename compilechecks.configure and test_header_checks.py. r=chmanchester
to, respectively, compile-checks.configure and test_compile_checks.py.


--HG--
rename : build/moz.configure/compilechecks.configure => build/moz.configure/compile-checks.configure
2016-08-10 10:49:59 +09:00