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

10026 Коммитов

Автор SHA1 Сообщение Дата
criss 16f898657c Backed out changeset 894fc83e19a0 (bug 1717051) for causing busting macth commands. a=backout 2021-09-30 10:36:36 +03:00
Mitchell Hentges 4f9389c204 Bug 1732787: Clean up vendored "pystache" and "funcsigs" pkgs r=ahal
* `pystache` is unused.
* `funcsigs` is only needed for WPT - use the WPT version instead.
* `moz.build` has a bunch of obsolete/redundant references, clean
  them up.
* `mohawk` isn't used directly, but is rather depended-on via
  `taskcluster`. So, remove it from `requirements.in`.

Differential Revision: https://phabricator.services.mozilla.com/D126732
2021-09-29 15:19:23 +00:00
Mitchell Hentges ab439e4045 Bug 1717051: Always populate Mach pths r=firefox-build-system-reviewers,glandium
The previous behaviour was to:
* Never add a `pthfile` to the Mach virtualenv, and
* Always add Mach's paths to the `sys.path` when Mach initializes

However, this meant that `pip` would needlessly install packages
that already exist in the vendored environment.

Tweak `pth` behaviour so that `pip` behaves more efficiently.

Differential Revision: https://phabricator.services.mozilla.com/D120402
2021-09-29 15:09:36 +00:00
Mitchell Hentges 6901d2f440 Bug 1723031: In CI, assert Mach pypi package deps using system Python r=ahal
There's an existing algorithm to check if a virtualenv's installed
packages are up-to-date with its requirements. This patch
extracts that logic so that, in cases where we can't automatically
download needed pip packages, we can at least assert that the ones
installed to the system Python are sufficient to meet our requirements.

The current only case in which this system-checking logic is applied
is when starting the Mach virtualenv and the `MOZ_AUTOMATION` or
`MACH_USE_SYSTEM_PYTHON` environment variable is set.

Differential Revision: https://phabricator.services.mozilla.com/D122890
2021-09-29 13:06:00 +00:00
Mitchell Hentges 5c31466081 Bug 1723031: Remove pytest from vendored packages r=ahal
`pytest` has platform-specific dependencies (`colorama` on Windows), but
our vendoring logic currently doesn't support having platform-specific
packages.

Since `python-test` jobs don't have to be isolated from the network,
migrate `pytest` to be a `pypi:` dependency.

Differential Revision: https://phabricator.services.mozilla.com/D126285
2021-09-28 20:21:39 +00:00
Mitchell Hentges 703f93a367 Bug 1723031: Set zstandard requirement lower bound to 0.11.1 r=ahal
Windows and Mac workers have `zstandard==0.11.1` installed.

Differential Revision: https://phabricator.services.mozilla.com/D126284
2021-09-28 14:59:31 +00:00
Mitchell Hentges 65ca53bf8a Bug 1730712: Use local vendored `certifi` instead of WPT's r=ahal
Both of them are version `2018.4.16`, but our local one is vendored in a
`pip`-compatible way (it includes a `.dist-info` directory).

FWIW, we'll probably need to keep these two versions in-sync (CI
should already be verifying this in the virtualenv-compatibility
tests) because:
* `certifi` is needed by `sentry-sdk`, a Mach-global dependency
* Web platform tests should use the version of `certifi` that
  exists in the upstream `certifi` repo. These tests may operate in
  a context that includes Mach and its dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D126282
2021-09-28 14:59:30 +00:00
Mitchell Hentges f823e6ffbe Bug 1724279: Mark `zstandard` as an optional Mach dependency r=ahal
It's only needed for some commands.
Additionally, as we start verifying Python environments in CI, some of
the tasks don't have `zstandard` installed.

Differential Revision: https://phabricator.services.mozilla.com/D126281
2021-09-28 14:59:30 +00:00
Mitchell Hentges 9c77153d02 Bug 1723031: Allow flexible dependency-specification in the Mach venv r=ahal
There's some trade-offs in play here: the major issue is that we can't
pin `psutil`'s because it's pre-installed on some CI workers with a
different version (5.4.2).

Additionally, we can't "just" bump that version, because CI workers jump
between different revisions to do work, so a specific pinned version
won't work when we try to update such a package.

One option is that we could avoid validating package versions in CI, but
then that will cause surprises (heck, I didn't know we were still using
`psutil==5.4.2` instead of `5.8.0` until now). By doing validation, we
make it more explicit and avoid accidentally depending on behaviour of
too new of such a package.

However, in most cases, we manage the installation environment and can
pin dependencies. So, I've made the top-level Mach virtualenv the _only_
one that is able to use requirement specifiers other than "==".

Differential Revision: https://phabricator.services.mozilla.com/D122889
2021-09-28 14:59:29 +00:00
Mitchell Hentges d76d2cf32e Bug 1723031: Vendors `packaging`, `pyparsing` library r=ahal
This will allow us to parse and compare pip package versions the same
way that `pip` does.

`pyparsing` was added because it's needed by `packaging`.

Differential Revision: https://phabricator.services.mozilla.com/D122888
2021-09-28 14:59:29 +00:00
Mitchell Hentges ff01350ad5 Bug 1712151: Add test to verify virtualenv compatibility r=ahal
This adds two main compatibility guarantees:
1. Vendored dependencies <=> Pypi-downloaded dependencies
2. Global Mach dependencies <=> command-specific dependencies

As part of this, a new `vendored:` action was added to the virtualenv
definition format. Otherwise similar to `pth:` paths, `vendored:`
packages are assumed to be "pip install"-able.

Some validation (the `.dist-info`/`PKG-INFO` checks) was added to
`requirements.py` to verify that `pth:` and `vendored:` are correctly
used.

Differential Revision: https://phabricator.services.mozilla.com/D122900
2021-09-28 14:59:28 +00:00
Mitchell Hentges 0eb329a6f8 Bug 1717051: Reuse "requirements" logic in mach_initialize r=ahal
Rather than re-implementing it as `search_path()`, use the existing
`MachEnvRequirements` tool to parse `mach_virtualenv_requirements.txt`

Differential Revision: https://phabricator.services.mozilla.com/D126280
2021-09-28 14:59:28 +00:00
Toshihito Kikuchi 128797b4a6 Bug 1723593 - Port Windows 11 ASan fix to clang-12. r=glandium
This is needed to run ASan binaries on Windows 11.

Differential Revision: https://phabricator.services.mozilla.com/D126520
2021-09-28 12:25:09 +00:00
Andi-Bogdan Postelnicu ebad6463ab Bug 1731582 - starting with clang-13 some member functions from `StringRef` have been renamed. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D126319
2021-09-28 07:52:17 +00:00
Andi-Bogdan Postelnicu 8e5068999f Bug 1731582 - starting with clang-13 `Expr::isRValue` has been changed to `Expr::isPRValue`. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D126318
2021-09-28 07:52:16 +00:00
criss f2dcba95fa Backed out 10 changesets (bug 1712151, bug 1724279, bug 1730712, bug 1717051, bug 1723031, bug 1731145) for causing failures on test_yaml.py
Backed out changeset 7f64d538701b (bug 1723031)
Backed out changeset 394152994966 (bug 1723031)
Backed out changeset 9bfeb01bcc9a (bug 1723031)
Backed out changeset 3d283616a57d (bug 1730712)
Backed out changeset bc677b409650 (bug 1724279)
Backed out changeset 784c94c2f528 (bug 1723031)
Backed out changeset 6e1bde40e3b4 (bug 1723031)
Backed out changeset 7adf7e2136a3 (bug 1712151)
Backed out changeset 2aef162b9a1b (bug 1717051)
Backed out changeset 9beeb6d3d95b (bug 1731145)
2021-09-28 00:32:38 +03:00
Mitchell Hentges 99ad911a95 Bug 1723031: In CI, assert Mach pypi package deps using system Python r=ahal
There's an existing algorithm to check if a virtualenv's installed
packages are up-to-date with its requirements. This patch
extracts that logic so that, in cases where we can't automatically
download needed pip packages, we can at least assert that the ones
installed to the system Python are sufficient to meet our requirements.

The current only case in which this system-checking logic is applied
is when starting the Mach virtualenv and the `MOZ_AUTOMATION` or
`MACH_USE_SYSTEM_PYTHON` environment variable is set.

Differential Revision: https://phabricator.services.mozilla.com/D122890
2021-09-27 20:27:22 +00:00
Mitchell Hentges e3fe6a2819 Bug 1723031: Set zstandard requirement lower bound to 0.11.1 r=ahal
Windows and Mac workers have `zstandard==0.11.1` installed.

Differential Revision: https://phabricator.services.mozilla.com/D126284
2021-09-27 20:27:22 +00:00
Mitchell Hentges ebfd0e90fe Bug 1730712: Use local vendored `certifi` instead of WPT's r=ahal
Both of them are version `2018.4.16`, but our local one is vendored in a
`pip`-compatible way (it includes a `.dist-info` directory).

FWIW, we'll probably need to keep these two versions in-sync (CI
should already be verifying this in the virtualenv-compatibility
tests) because:
* `certifi` is needed by `sentry-sdk`, a Mach-global dependency
* Web platform tests should use the version of `certifi` that
  exists in the upstream `certifi` repo. These tests may operate in
  a context that includes Mach and its dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D126282
2021-09-27 20:27:21 +00:00
Mitchell Hentges 4384055cd5 Bug 1724279: Mark `zstandard` as an optional Mach dependency r=ahal
It's only needed for some commands.
Additionally, as we start verifying Python environments in CI, some of
the tasks don't have `zstandard` installed.

Differential Revision: https://phabricator.services.mozilla.com/D126281
2021-09-27 20:27:21 +00:00
Mitchell Hentges f3f13dfc13 Bug 1723031: Allow flexible dependency-specification in the Mach venv r=ahal
There's some trade-offs in play here: the major issue is that we can't
pin `psutil`'s because it's pre-installed on some CI workers with a
different version (5.4.2).

Additionally, we can't "just" bump that version, because CI workers jump
between different revisions to do work, so a specific pinned version
won't work when we try to update such a package.

One option is that we could avoid validating package versions in CI, but
then that will cause surprises (heck, I didn't know we were still using
`psutil==5.4.2` instead of `5.8.0` until now). By doing validation, we
make it more explicit and avoid accidentally depending on behaviour of
too new of such a package.

However, in most cases, we manage the installation environment and can
pin dependencies. So, I've made the top-level Mach virtualenv the _only_
one that is able to use requirement specifiers other than "==".

Differential Revision: https://phabricator.services.mozilla.com/D122889
2021-09-27 20:27:20 +00:00
Mitchell Hentges bed2f17cdc Bug 1723031: Vendors `packaging`, `pyparsing` library r=ahal
This will allow us to parse and compare pip package versions the same
way that `pip` does.

`pyparsing` was added because it's needed by `packaging`.

Differential Revision: https://phabricator.services.mozilla.com/D122888
2021-09-27 20:27:20 +00:00
Mitchell Hentges 74b09f92ce Bug 1712151: Add test to verify virtualenv compatibility r=ahal
This adds two main compatibility guarantees:
1. Vendored dependencies <=> Pypi-downloaded dependencies
2. Global Mach dependencies <=> command-specific dependencies

As part of this, a new `vendored:` action was added to the virtualenv
definition format. Otherwise similar to `pth:` paths, `vendored:`
packages are assumed to be "pip install"-able.

Some validation (the `.dist-info`/`PKG-INFO` checks) was added to
`requirements.py` to verify that `pth:` and `vendored:` are correctly
used.

Differential Revision: https://phabricator.services.mozilla.com/D122900
2021-09-27 20:27:19 +00:00
Mitchell Hentges b9d0572034 Bug 1717051: Reuse "requirements" logic in mach_initialize r=ahal
Rather than re-implementing it as `search_path()`, use the existing
`MachEnvRequirements` tool to parse `mach_virtualenv_requirements.txt`

Differential Revision: https://phabricator.services.mozilla.com/D126280
2021-09-27 20:27:19 +00:00
Alex Lopez 63022efc7a Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-27 18:12:51 +00:00
Tetsuharu Ohzeki 2eebd6e256 Bug 1732328 - Remove the vestiges of LayerScope. r=gfx-reviewers,jrmuizel
`Layer::GetDisplayListLog()` also still contains the metion to
LayerScope to dump display list.

But this change does not remove it because it's a part of debugging display list.
If we remove it, I think we should open a new bug for it.

Differential Revision: https://phabricator.services.mozilla.com/D126512
2021-09-25 16:22:25 +00:00
Butkovits Atila eb735ac57e Backed out changeset 53b1fa0faa6d (bug 1696251) for breaking the static-analysis integration. a=backout 2021-09-23 13:06:40 +03:00
Alex Lopez a8e7083c84 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-21 20:38:16 +00:00
Mike Hommey e19e94bc52 Bug 1729760 - Set -stdlib=libc++ for mac builds at the toolchain level. r=firefox-build-system-reviewers,nalexander
It's currently added manually to CXXFLAGS and bindgen flags, and is
notably missing from HOST_CXXFLAGS. However, setting it at the toolchain
level makes it inherited anywhere it's needed, including host builds and
bindgen.

Differential Revision: https://phabricator.services.mozilla.com/D126153
2021-09-21 04:45:34 +00:00
Butkovits Atila c06a3dd9fa Backed out changeset 510dd46a9de7 (bug 1696251) for causing Android build bustages. 2021-09-21 05:16:50 +03:00
Alex Lopez fe61e94ec8 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-20 20:21:07 +00:00
Andi-Bogdan Postelnicu e2cab5c39c Bug 1731542 - remove `infer` from our static-analysis pipeline. r=static-analysis-reviewers,marco
Differential Revision: https://phabricator.services.mozilla.com/D126070
2021-09-20 12:47:44 +00:00
Noemi Erli 91aa2e2b9c Backed out changeset 5f5b612878f3 (bug 1696251) for causing multiple bustages 2021-09-18 02:22:39 +03:00
Mike Hommey 397ece0e6e Bug 1500802 - Remove now unused mingw32-gcc toolchain. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D125923
2021-09-17 20:55:42 +00:00
Mike Hommey 636982aa2e Bug 1500804 - Build nsis with mingw-clang rather than mingw-gcc. r=tjr
While here, build the Linux portions with a sysroot.

Differential Revision: https://phabricator.services.mozilla.com/D125922
2021-09-17 20:55:42 +00:00
Alex Lopez bf860fe7dc Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-17 19:00:39 +00:00
Andrew Osmond 66fd73b08c Bug 1729051 - Simplify imgFrame to only use shared surfaces for raster images. r=jrmuizel
In practice we already only use SourceSurfaceSharedData as our
rasterized image backing. This means we no longer need to lock the data
to keep it in memory (when we used volatile memory), nor to try to
optimize the surface for the DrawTarget.

Differential Revision: https://phabricator.services.mozilla.com/D124476
2021-09-17 15:50:04 +00:00
Mike Hommey a6e466b943 Bug 1731175 - Build clang-mingw off clang-12 rather than from scratch. r=firefox-build-system-reviewers,andi
The build-clang step in the clang-mingw toolchains just replicates what
we already do for clang, except with no patched applied, which could
arguably seen as an issue. Instead of rebuilding what we essentially
already have as a result of the clang-12 toolchain, we use the clang-12
toolchain directly instead.

Differential Revision: https://phabricator.services.mozilla.com/D125912
2021-09-17 08:26:33 +00:00
Benjamin Beurdouche 4fcdfbc981 Bug 1729163 - land NSS 2199f01d7f1e UPGRADE_NSS_RELEASE, r=beurdouche
Differential Revision: https://phabricator.services.mozilla.com/D125872
2021-09-16 19:27:33 +00:00
Mike Hommey 4dbe34f810 Bug 1730825 - Build NSIS as a relocatable binary. r=firefox-build-system-reviewers,andi
The reason the error mentioned in build-mingw32-nsis.sh happens is that
the default mode NSIS builds in is a fully-installed mode, where it
hardcodes the locations of its data files. This is why nsis needs to
be used from the same place it's built for. But there's another mode,
enabled with NSIS_CONFIG_CONST_DATA_PATH=no, that makes it relocatable,
and makes it find its data files relatively to the nsis binary.

However, there's a bug in the nsis build scripts, which makes the nsis
binary installed in the destination directory instead of a bin/
subdirectory, while the source code itself looks for data files relative
to the parent directory of the directory that contains the executable.
So we need to set PREFIX_BIN to force the executable to be installed in
a bin/ subdirectory.

There is also an issue in nsis itself when it's executed by anything
other than a shell, which we patch out.

Differential Revision: https://phabricator.services.mozilla.com/D125638
2021-09-15 08:33:06 +00:00
Chris Peterson 339c7d8961 Bug 1729598 - Remove now-unused MustUseChecker and MOZ_MUST_USE_TYPE attribute. r=static-analysis-reviewers,andi
Depends on D125504

Differential Revision: https://phabricator.services.mozilla.com/D125505
2021-09-15 05:10:51 +00:00
Mike Hommey cfaeef1efd Bug 1730078 - Build clang stage 1 with system gcc. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D125162
2021-09-15 02:39:53 +00:00
Mike Hommey 41711584ee Bug 1730078 - Only use the sysroot for the final stage of the clang compilation. r=firefox-build-system-reviewers,andi
Using the sysroot with GCC requires some unnecessary complication, and
we don't really care if the first stages are not using the sysroot.

Differential Revision: https://phabricator.services.mozilla.com/D125161
2021-09-15 02:39:53 +00:00
Mike Hommey d03a4d2efb Bug 1730078 - Don't build some things during early stages of the clang compilation. r=firefox-build-system-reviewers,andi,mhentges
Building sanitizers in older versions of clang emit errors when built with
newer GCC because of some narrowing conversions. We only really need the
sanitizers in the final stage anyways, so we force-disable them (and
everything else that might enable "sanitizer-common") in early stages.

Building the lli tool (also used in tests) fails as well, and we don't
need it until the final stage (where we need it to ship it).

Differential Revision: https://phabricator.services.mozilla.com/D125159
2021-09-15 02:39:52 +00:00
Mike Hommey 3631977b63 Bug 1730078 - Build clang-tidy with clang. r=firefox-build-system-reviewers,andi
There are complications with building a 1-stage clang with gcc, so just
use clang. Eventually, the clang-tidy toolchains will be removed in
favor of providing clang-tidy from the clang toolchain itself anyways.

Differential Revision: https://phabricator.services.mozilla.com/D125158
2021-09-15 02:39:52 +00:00
Mike Hommey da41cd5a40 Bug 1730078 - Build binutils with system gcc. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D125156
2021-09-15 02:39:51 +00:00
Mitchell Hentges 451716c8fc Bug 1717104: `VirtualenvManager` should not allow mixing pythons r=ahal
Tweak the `VirtualenvManager` API to accept a single base "python"
executable during initialization, then to consistently use it for
up-to-date checking, construction, etc.

This constraint allows future simplification for behaviour involving
the "base" python.

Differential Revision: https://phabricator.services.mozilla.com/D124516
2021-09-13 15:42:54 +00:00
Mitchell Hentges 75d14b24c3 Bug 1717104: Align virtualenv_name with requirements definition r=ahal
Maps virtualenvs one-to-one with their associated requirements
definition.

For example:
```
Name: "docs"
Virtualenv location: <snip>/_virtualenvs/docs
Requirements location: $topsrcdir/build/docs_virtualenv_packages.txt
```

An issue to be resolved in the future is that it's tricky to know that,
when you define a new virtualenv, you have to *know* that a requirements
definition needs to exist in `build/`.

As part of this change, the default virtualenv ("common") was
split from the build virtualenv ("build").
This required changes to the python-test virtualenv since
python-tests depend on `glean_parser`, but were getting it
implicitly from the "build" virtualenv's requirements.
This addition to the `python-test` virtualenv is temporary and
will be removed when bug 1724273 is resolved.

Differential Revision: https://phabricator.services.mozilla.com/D122891
2021-09-13 15:42:53 +00:00
Mitchell Hentges b253caafb5 Bug 1724274: Don't allow Thunderbird requirements to include PyPI pkgs r=ahal
Thunderbird can't currently define its own Mach commands, which means
that it doesn't define its own virtualenvs.

However, it does add some tweaks to the `common` virtualenv requirements
(for build scripts, I believe).

So, we should allow it to continue making those tweaks, but we should
remove the capability of specifying PyPI packages. This is needed for
lockfile-generation, since lockfiles are created and placed in the
Mozilla repo, and we don't want "conditional lockfiles" based on the
existence of a "comm" repo.

This will not regress existing Thunderbird expectations.

Differential Revision: https://phabricator.services.mozilla.com/D124515
2021-09-13 15:42:52 +00:00
Emilio Cobos Álvarez 8d7ad39477 Bug 1730022 - Improve debuggability of nsIContent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125192
2021-09-10 16:39:15 +00:00