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

7463 Коммитов

Автор SHA1 Сообщение Дата
Alex Ionescu 5327fad352 Bug 1741896 Accept/prevent first load prompts for CNN during automated recording r=perftest-reviewers,kimberlythegeek
Differential Revision: https://phabricator.services.mozilla.com/D131508
2022-01-03 07:12:51 +00:00
Mike Hommey d179837cf2 Bug 1747533 - Update clang pass manager flags handling. r=firefox-build-system-reviewers,andi
- Avoid the flag selection silently not enabling the new pass manager
  when --enable-new-pass-manager is passed explicitly.
- Avoid adding the -fexperimental-new-pass-manager to clang >= 13, which
  has it enabled by default. Likewise for the linker flags.
- Remove the force-enable of the new pass manager with clang < 12 on
  automation, since we're using version 13 anyways.
- Account for the fact that both lld and ld64 can pass the
  -import-hot-multiplier flag to the LTO plugin on mac builds, which
  effectively will set it for the first time on mac, and might improve
  performance.

Differential Revision: https://phabricator.services.mozilla.com/D134860
2021-12-31 08:41:16 +00:00
Mitchell Hentges 8f5aad46e5 Bug 1732946: Guard against "pip install" venv conflicts r=ahal
`pip install`'s standard behaviour is to satisfy the new requirement,
even if it conflicts with existing packages. If a conflict _does_
occur, `pip` will simply warn about it after the installation has
already damaged the environment.

By using the `--constraint` feature, we force `pip` to consider
already-installed packages before installing new ones. If a conflict
is detected, an error is raised and `pip` stops without damaging
the environment.

Since we're capturing system packages (when needed) with this feature,
we can now allow virtualenvs that do pip-installations to safely work
with system-using Mach environments.

Differential Revision: https://phabricator.services.mozilla.com/D126925
2021-12-30 01:08:06 +00:00
Mitchell Hentges e045b404e8 Bug 1730712: Avoid redundant venv rebuilds in nested Mach calls r=perftest-reviewers,ahal,AlexandruIonescu
Port some `sys.path` modifications to the centralized system.
Not only is this cleaner (ad-hoc global modifications are spicy), but
this also avoids "reordering" issues that can creep in during nested
calls, causing virtualenvs to be unnecessarily recreated.

Differential Revision: https://phabricator.services.mozilla.com/D134481
2021-12-30 01:05:07 +00:00
Mike Hommey a98b7b380c Bug 1747757 - Remove -l from OS_LIBS set from gyp. r=firefox-build-system-reviewers,mhentges
NSS gyp files use -l$lib, and while OS_LIBS accepts this form and passes
it through, it's not actually a recognized way to link libraries on
clang-cl builds. So, re-normalize the values to not include -l, which
will add it back in the backend when appropriate, or switch to $lib.lib
on platforms that use this form.

Differential Revision: https://phabricator.services.mozilla.com/D134736
2021-12-29 22:18:51 +00:00
Mitchell Hentges 37a1a70a52 Bug 1730712: Maintain sys.path consistency in nested Mach calls r=ahal
This patch resolves cases like the following:
1. The system Python has `zstandard`.
2. `MOZ_AUTOMATION=1 ./mach python --virtualenv psutil <script>`
   is run, adding `psutil` to the import scope.
3. `<script>` runs Mach a _second_ time, and this time Mach needs to
   be able to import `zstandard` (in this case, it should be able
   to fetch it from the system Python's site-packages).

The previous behaviour would add the "site-packages" of the //invoking//
Python interpreter, but ancestor packages would get dropped.

To rectify this issue, this patch changes "import inheritance" to keep
more of the `sys.path`, rather than just
`<external-python>.all_site_packages_dirs()`.

Note: the original implementation of this patch passed forward *all*
of the `sys.path` when creating virtualenvs. However, this caused issues
when Mach ran `pip`, because `pip` was no longer able to discover the
"standard library" (it was failing because it assumed all paths defined
in a virtualenv's site were non-standard-library paths, and the original
implementation broke that assumption).

As part of this, a distinction was defined between the "current" Python
interpreter (external_python) and the top-level Python interpreter
(original_python). This was needed to enable discovering which paths
are "standard library paths".

Differential Revision: https://phabricator.services.mozilla.com/D134201
2021-12-29 21:10:22 +00:00
Kelsey Gilbert 0b8af194b9 Bug 1747745 - Fix git worktree support in `./mach bootstrap`. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D134719
2021-12-29 20:20:53 +00:00
Aki Sasaki b480a06e9a Bug 1747280 - nuke comm/ after cross-channel. r=mhentges,releng-reviewers,jmaher DONTBUILD
We clean up our Gecko clone between tasks via `hg robustcheckout --purge`, which runs `hg purge`. This is very effective, *but* it doesn't detect or clean up any nested clones.

Because we run cross-channel on Gecko workers, and because we clone `comm/` in cross-channel and haven't cleaned it up, and because `hg purge` doesn't detect or clean up nested clones, and because our current virtualenv setup code traverses the tree and can error out on `comm/` clones, let's clean up `comm/` after running cross-channel.

We'll be moving TB cross-channel to different tasks/workers in bug 1742711, and ideally we can update robustcheckout and/or `hg purge` to be able to detect and/or clean up nested clones.

Differential Revision: https://phabricator.services.mozilla.com/D134582
2021-12-28 18:56:47 +00:00
Iulian Moraru ddbe8b52ac Backed out changeset 68098f573c46 (bug 1747280) for causing Bug 1747545. CLOSED TREE 2021-12-24 20:28:14 +02:00
Mike Hommey 8ea7516844 Bug 1747347 - Use configure autobootstrap code to install toolchains in mach bootstrap. r=firefox-build-system-reviewers,andi
This uses the same trick as bug 1743832 under the hood. We could go the
other way around, extracting the configure code to a separate module,
but the longer term goal here is to have configure figure out which
things to bootstrap for the selected build type.

As a side effect, mach bootstrap will stop re-bootstrapping things that
are already up-to-date, at least for things using
install_toolchain_artifact, excluding those that don't follow the
convention wrt the extracted directory path.

Differential Revision: https://phabricator.services.mozilla.com/D134595
2021-12-23 20:55:36 +00:00
Emilio Cobos Álvarez e195b342bd Bug 1747387 - Fix MozillaBuildBootstrapper after bug 1747216. r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D134608
2021-12-23 20:42:18 +00:00
Mike Hommey fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Aki Sasaki a6f09dd1ef Bug 1747280 - nuke comm/ after cross-channel. r=releng-reviewers,jmaher DONTBUILD
We clean up our Gecko clone between tasks via `hg robustcheckout --purge`, which runs `hg purge`. This is very effective, *but* it doesn't detect or clean up any nested clones.

Because we run cross-channel on Gecko workers, and because we clone `comm/` in cross-channel and haven't cleaned it up, and because `hg purge` doesn't detect or clean up nested clones, and because our current virtualenv setup code traverses the tree and can error out on `comm/` clones, let's clean up `comm/` after running cross-channel.

We'll be moving TB cross-channel to different tasks/workers in bug 1742711, and ideally we can update robustcheckout and/or `hg purge` to be able to detect and/or clean up nested clones.

Differential Revision: https://phabricator.services.mozilla.com/D134582
2021-12-23 19:25:02 +00:00
Cristian Tuns e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Sandor Molnar f1b3847e69 Backed out changeset 9cef54c30d49 (bug 1648114) for causing python unit test failures in test_mach_commands. CLOSED TREE 2021-12-23 02:50:20 +02:00
Gijs Kruitbosch a57fa13232 Bug 1648114 - make clang-tidy easier to find, r=andi
Differential Revision: https://phabricator.services.mozilla.com/D133191
2021-12-23 00:29:10 +00:00
Mike Hommey b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00
Mike Hommey 6fbca3923d Bug 1747216 - Avoid passing state and source directory to all Bootstrapper methods. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D134489
2021-12-22 21:09:51 +00:00
Mike Hommey 044b037fac Bug 1747215 - Stop bootstrapping node/npm from Linux distro packages. r=firefox-build-system-reviewers,andi
We install it via a toolchain artifact anyways, if not via mach
bootstrap, via configure's autobootstrap.

Differential Revision: https://phabricator.services.mozilla.com/D134488
2021-12-22 21:09:51 +00:00
Mike Hommey 40cad9af3e Bug 1747211 - Stop bootstrapping nasm from Linux distro packages r=firefox-build-system-reviewers,andi
We install it via a toolchain artifact anyways, if not via mach
bootstrap, via configure's autobootstrap.

Differential Revision: https://phabricator.services.mozilla.com/D134487
2021-12-22 21:09:50 +00:00
Mitchell Hentges 183c94cd54 Bug 1730712: Abstract site behaviour from requirements.py r=ahal
There are two sites that are allowed to define their dependencies
in a flexible way: the `mach` and `build` sites.

This is because these are the only two sites that _may_ have
to operate without `pip install`-ing any packages, and instead having
to be compatible with the packages installed to the system.

Due to this required compatibility, allowing flexibility to these sites
allows flexibility downstream.

Anyways, this patch isn't about that - that behaviour has already
landed. This patch is about tweaking `requirements.py` so that
*it* doesn't care about specific sites, but rather only cares about
if it should assert `only_strict_requirements` or not. Accordingly,
the helpful "not all packages are pinned" error message is moved
to `site.py`, where it belongs.

Differential Revision: https://phabricator.services.mozilla.com/D132082
2021-12-22 00:46:25 +00:00
Mitchell Hentges 3e16efe884 Bug 1730712: Perform command-site "pip check" if Mach using system scope r=ahal
Even if a command site has its own comfy virtualenv, if Mach is using
the system packages then they'll still be in-scope for commands.

So, we still need to `_assert_pip_check()` in case the command's
vendored packages conflict.

Differential Revision: https://phabricator.services.mozilla.com/D132168
2021-12-22 00:46:25 +00:00
Mitchell Hentges 67c4c9990e Bug 1732946: Adjust "use 'vendored:'?" warn to be more aligned with pip r=ahal
Pip is able to detect unpacked sdists because they have a `.egg-info`
directory, *not* because they have a top-level `PKG-INFO` file.

This is confirmed by the `MarkupSafe` case, where pip can see the
package in `third_party/python/MarkupSafe/src`, even though there's no
`PKG-INFO` at that depth.

Make two other changes as part of this:
* Only submit the warning if the package is under a "third_party"
  directory to avoid a false positive when the developer has performed
  a "pip install -e" on a first-party module
* Move the check to `test_site_compatibility` to avoid unnecessary
  validation at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D126924
2021-12-22 00:46:24 +00:00
Makoto Kato 50557c9458 Bug 1746770 - "mach vendor rust" fails when crate has the directory name that uses space character. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D134241
2021-12-21 01:26:21 +00:00
Mitchell Hentges 77c1f6c6e9 Bug 1746325: Defer/avoid creation of scoped state dir for command sites r=ahal
In CI, we sometimes don't have permissions to create a scoped state dir.
Additionally, the current behaviour for resolving the path to a scoped
state dir will also attempt to create it if it doesn't exist.

There's likely a more eloquent solution, but the short-term fix is to
have sites defer the resolution of the state dir until they _know_ they
need it.

Differential Revision: https://phabricator.services.mozilla.com/D134066
2021-12-20 17:26:17 +00:00
Iulian Moraru 7d17fd1fe9 Merge autoland to mozilla-central. a=merge 2021-12-19 23:48:35 +02:00
Csoregi Natalia b7f8199d2d Backed out changeset de9e103ffea4 (bug 1732946) for causing mach issues. a=backout 2021-12-19 23:02:13 +02:00
Geoff Brown 2b9342ed34 Bug 1744091 - [mach run] Run with fission enabled by default on desktop; r=releng-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D134215
2021-12-18 22:33:51 +00:00
Mike Hommey e6e627c61f Bug 1746299 - Remove broken support for --enable-project=extensions and --enable-extensions. r=Gijs,firefox-build-system-reviewers,mhentges
The former is broken because of a lack of a app.mozbuild file and has
been broken for years.

The latter doesn't do anything useful outside --enable-project=extensions
because all the subdirectories of extensions/ are already covered by
other flags (or always used):
- auth, via --enable-negotiateauth (default on)
- permissions, always
- pref, via --enable-pref-extensions (default on)
- spellcheck, always
- universalchardet, via --enable-universalchardet (default on)

Also, nothing sets MOZ_EXTENSIONS_DEFAULT anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133970
2021-12-18 00:32:34 +00:00
Sandor Molnar eac95b4a93 Backed out 6 changesets (bug 1746539, bug 1746541, bug 1746544, bug 1746540, bug 1746542, bug 1746299) for causing android build bustages in cutils/properties. CLOSED TREE
Backed out changeset 9352292fa327 (bug 1746544)
Backed out changeset 3cc761d90071 (bug 1746542)
Backed out changeset 8d8fc11e8012 (bug 1746541)
Backed out changeset 5f53612aad1b (bug 1746540)
Backed out changeset afb601202b24 (bug 1746539)
Backed out changeset 90027c44c9af (bug 1746299)
2021-12-18 01:28:06 +02:00
Mitchell Hentges 11fc69125a Bug 1732946: Adjust sdist-vendored detection to be more aligned with pip r=ahal
Pip is able to detect unpacked sdists because they have a `.egg-info`
directory, *not* because they have a top-level `PKG-INFO` file.

This is confirmed by the `MarkupSafe` case, where pip can see the
package in `third_party/python/MarkupSafe/src`, even though there's no
`PKG-INFO` at that depth.

Differential Revision: https://phabricator.services.mozilla.com/D126924
2021-12-17 23:00:25 +00:00
Mike Hommey 26b16bad6e Bug 1746299 - Remove broken support for --enable-project=extensions and --enable-extensions. r=Gijs,firefox-build-system-reviewers,mhentges
The former is broken because of a lack of a app.mozbuild file and has
been broken for years.

The latter doesn't do anything useful outside --enable-project=extensions
because all the subdirectories of extensions/ are already covered by
other flags (or always used):
- auth, via --enable-negotiateauth (default on)
- permissions, always
- pref, via --enable-pref-extensions (default on)
- spellcheck, always
- universalchardet, via --enable-universalchardet (default on)

Also, nothing sets MOZ_EXTENSIONS_DEFAULT anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133970
2021-12-17 22:52:09 +00:00
Nicolas Chevobbe 4a5cfe7c65 Bug 1745932 - [devtools] Move highlighters.properties to fluent. r=fluent-reviewers,flod,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D133741
2021-12-17 16:19:04 +00:00
Mike Hommey 73230b8c3e Bug 1744234 - Bump minimum Rust version to 1.57. r=firefox-build-system-reviewers,andi
Also update the table of Firefox requirements. It's worth noting that I
actually upgraded to 1.57 earlier than I should have (too close to
freeze), but what is done is done.

Differential Revision: https://phabricator.services.mozilla.com/D134124
2021-12-17 08:37:39 +00:00
Mike Hommey d94d03bafc Bug 1744886 - Forbid `mach vendor rust` vendoring some crates. r=firefox-build-system-reviewers,andi
Also fail when Cargo.toml patches end up unused.

Differential Revision: https://phabricator.services.mozilla.com/D133849
2021-12-17 01:16:06 +00:00
Meg Viar edc048fafa Bug 1735456 - about:welcome: Theme radio buttons have no text in NVDA browse mode r=emcminn,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D133347
2021-12-16 19:01:55 +00:00
Mike Hommey 382aa3d467 Bug 1415595 - Remove support for different hardening flags in js/. r=firefox-build-system-reviewers,andi
They don't differ anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133859
2021-12-15 23:56:33 +00:00
Marian-Vasile Laza 18ee06e0b2 Backed out 2 changesets (bug 1744886) for causing build bustages. CLOSED TREE
Backed out changeset 6453423359d0 (bug 1744886)
Backed out changeset 7383efc30b77 (bug 1744886)
2021-12-16 02:13:41 +02:00
Mike Hommey 54014d3daf Bug 1744886 - Forbid `mach vendor rust` vendoring some crates. r=firefox-build-system-reviewers,andi
Also fail when Cargo.toml patches end up unused.

Differential Revision: https://phabricator.services.mozilla.com/D133849
2021-12-15 21:40:23 +00:00
Mitchell Hentges 513d1cda6a Bug 1745508: Update reference to checkout-specific mach venv r=ahal
The regressing bug 1739067 forgot to update this reference to the
Mach venv. As part of this, the logic for resolving the
"checkout-specific state_dir" was updated to be smarter with
Windows case-insensitive paths.

Differential Revision: https://phabricator.services.mozilla.com/D133547
2021-12-15 16:45:42 +00:00
Mitchell Hentges 7836ac8a11 Bug 1744713: Manually add "xpcshell" to the sys.path for perftests r=sparky
Though _most_ of the old paths that used to be defined in
`mozperftest/runner.py` exist in `common_virtualenv_packages.txt`,
"xpcshell" was not because it's put in a different location depending on
whether the source directory is sourced from the "target.xpcshell.tests"
artifact or from VCS directly.

As part of this change, I've verified that all of the other
path changes in D132503 are fulfilled by the "mach" site.

Differential Revision: https://phabricator.services.mozilla.com/D133215
2021-12-15 16:29:00 +00:00
Mitchell Hentges a119b062da Bug 1744713: Don't resolve external site-packages dirs multiple times r=ahal
I originally thought that the result of `all_site_packages_dirs()` would
be reused while building the new `sys.path` list, but some local
debugging on Windows was affected by brutally slow start-times - which
was caused by these lines.

Looking back, it makes sense now: Python doesn't know that the value can
be reused, so it's recalculating the entire
predicate (`path not in $dirs_fn()`) every time.

Differential Revision: https://phabricator.services.mozilla.com/D133214
2021-12-15 16:28:59 +00:00
Eemeli Aro 18caf861b1 Bug 1733490 - Migrate CSP error messages from extensions.properties to Fluent. r=zbraniecki,mixedpuppy,flod
The actual messages were migrated using https://github.com/mozilla/properties-to-ftl,
while C++ changes use patterns established by https://bugzilla.mozilla.org/show_bug.cgi?id=1742106.

Differential Revision: https://phabricator.services.mozilla.com/D131594
2021-12-15 16:09:03 +00:00
Norisz Fay 204b961c4e Backed out changeset f5bcc7acaf26 (bug 1733490) for causing mochitest failures on browser_all_files_referenced.js 2021-12-14 13:21:21 +02:00
Eemeli Aro 3b836d5a27 Bug 1733490 - Migrate CSP error messages from extensions.properties to Fluent. r=zbraniecki,mixedpuppy,flod
The actual messages were migrated using https://github.com/mozilla/properties-to-ftl,
while C++ changes use patterns established by https://bugzilla.mozilla.org/show_bug.cgi?id=1742106.

Differential Revision: https://phabricator.services.mozilla.com/D131594
2021-12-14 10:10:32 +00:00
Nika Layzell 78ff1150a5 Bug 1715144 - Part 2: Stop adding /ipc/glue to LOCAL_INCLUDES in gn-generated files, r=firefox-build-system-reviewers,nalexander,jib
Differential Revision: https://phabricator.services.mozilla.com/D117104
2021-12-13 21:57:21 +00:00
Nika Layzell 490e62e602 Bug 1732358 - Part 2: Add the ability to force-disable fission with an environment variable, r=ahal,fluent-reviewers,flod,mccr8
This is required to replace the existing MOZ_FORCE_ENABLE_FISSION environment
variables in environments which use that. In the future we'll want to stop
passing any environment variable when not passing a flag to `./mach run`
however that will require changes to the default test behaviour in bug 1744091.

Differential Revision: https://phabricator.services.mozilla.com/D133006
2021-12-13 20:28:33 +00:00
ahochheiden fb9e1a5730 Bug 1740566 - Remove unused class member r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D133333
2021-12-10 21:28:07 +00:00
ahochheiden bd83977be1 Bug 1740566 - Update string paths to Pathlib objects in Mach module r=mhentges,firefox-build-system-reviewers
mach/mach/virtualenv.py was not updated because Mitch is in the process of a
major refactor on it. It will get a Pathlib migration pass at a later time

Differential Revision: https://phabricator.services.mozilla.com/D131811
2021-12-10 21:28:07 +00:00
ahochheiden b4dbe1681d Bug 1740566 - Make cwd in mach/CommandContext not optional r=firefox-build-system-reviewers,mhentges
Provide dummy empty string value in test.

Differential Revision: https://phabricator.services.mozilla.com/D133136
2021-12-10 21:28:06 +00:00