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

7189 Коммитов

Автор SHA1 Сообщение Дата
Mitchell Hentges e7005dda77 Bug 1730778: Fix "./mach gtest" build priority error r=jgilbert
`commands.dispatch(...)` don't respect command argument defaults set up
in decorators. Instead, it falls back to the python parameter default,
which is essentially unset.

The solution in this case is to duplicate the `default` value.

Differential Revision: https://phabricator.services.mozilla.com/D125605
2021-09-14 21:04:27 +00:00
Rob Lemley 419ed4a2cc Bug 1730719 - Fix processing Thunderbird virtualenv packages files. r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D125569
2021-09-14 16:58:24 +00:00
Jeff Gilbert a56a33012a Bug 1730253 - Add `./mach build --priority(=less)`. r=firefox-build-system-reviewers,mhentges
Keys are idle/less/normal/more/high, like the named categories on
Windows.

Differential Revision: https://phabricator.services.mozilla.com/D125277
2021-09-13 17:22:29 +00:00
Mitchell Hentges 063055a46f Bug 1726814: Rebuild virtualenv if it is incomplete r=ahal
Write "metadata" at the end of virtualenv-construction so
that we detect incompletely-built venvs.

Differential Revision: https://phabricator.services.mozilla.com/D123243
2021-09-13 15:42:55 +00:00
Mitchell Hentges 6fc2ae861b Bug 1724274: Simplify VirtualenvManager r=ahal
* Removes the unused `call_setup()` function
* Inlines functions that were internally called only once

Differential Revision: https://phabricator.services.mozilla.com/D124518
2021-09-13 15:42:55 +00:00
Mitchell Hentges 8b3f48d166 Bug 1717104: Encode `virtualenv_name` into venv's directory r=ahal
Adds a `MozVirtualenvMetadata` file abstraction that allows us to:
* Statically determine if a virtualenv is managed by Mach.
* Determine the virtualenv's name.

Note: I called this file `moz_virtualenv_metadata.json` instead of
`mach_virtualenv_metadata.json` because I didn't want to be ambiguous
between "the Mach virtualenv" and "a Mach-managed virtualenv".

Differential Revision: https://phabricator.services.mozilla.com/D124517
2021-09-13 15:42:54 +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 fa80c317e0 Bug 1723237: Warn if virtualenv req definition is missing r=ahal
When porting commands to have their own virtualenv,
it's useful to have helpful warnings when the associated
requirements definition file is missing.

Differential Revision: https://phabricator.services.mozilla.com/D122893
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
Mitchell Hentges 08001d7c15 Bug 1724274: Add missing "pypi-optional" docs r=ahal
These were missed when `pypi-optional` support was added.

Differential Revision: https://phabricator.services.mozilla.com/D124514
2021-09-13 15:42:52 +00:00
Niklas Baumgardner 42f48852ca Bug 1534799 - Convert &searchTextBox.clear.label; to fluent. r=emalysz,fluent-reviewers,flod,dao,morgan
Differential Revision: https://phabricator.services.mozilla.com/D123640
2021-09-10 14:52:55 +00:00
Mitchell Hentges 7c3b1ef2cb Bug 1725708: `./mach vendor python` should populate from a clean state r=ahal
Rather than deleting the expected target directory of each package
that's being vendored, clear the whole `third_party/python` directory
and re-populate it from scratch.

As part of this, there's an "exclusion" list for packages that can't
be vendored from PyPI.

This has some benefits:
* It'll be harder to forget scraps of files and directories and leave
  them in `third_party/python`.
* The exclusion list makes it more clear which packages are managed
  manually, and the friction it adds to the workflow will guide
  developers to use "requirements.in" instead.

The `test_up_to_date_vendor` test will verify that the vendor directory
is always clean.

Differential Revision: https://phabricator.services.mozilla.com/D123124
2021-09-09 18:18:52 +00:00
Mitchell Hentges a1ee478054 Bug 1725708: Move all possible vendored deps to centralized system r=ahal
Note that, as part of adding this packages to the automated vendoring
system, some dependencies were automatically added - most notably,
dependencies of `taskcluster` that become visible with Python 3.6+.

Also, adds `**/.git` to the exclusions because:
* `.git` is part of our `.hgignore`, but
* `.git` is part of the `aiohttp` `tar.gz` file.

Since the file isn't needed for `pip install`-ing `aiohttp`,
and since we want `./mach vendor python` to be a no-op when there's
no requirement changes, we exclude it.

Differential Revision: https://phabricator.services.mozilla.com/D123122
2021-09-09 18:18:51 +00:00
Molly Howell cbafe2ba39 Bug 1727916 - Convert several customizable toolbar item names to sentence case. r=fluent-reviewers,flod,emalysz
This required migrating several strings to Fluent, and the bulk of this patch
is those migrations. The rest of the items matched up with an entry in the app
menu, so those items were switched over to use the app menu strings, and one
had to be copied in order to avoid adding a tooltip to the app menu item.

Differential Revision: https://phabricator.services.mozilla.com/D124270
2021-09-09 16:39:37 +00:00
Steve Fink 5854963fb3 Bug 1726619 - Replace MOZ_LOW_PARALLELISM_BUILD with automated heuristic parallelism based on memory usage, and use for hazard builds r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D123147
2021-09-09 16:15:11 +00:00
Steve Fink e66cd5428c Bug 1726619 - Install separate perl-FindBin package for hazards commands on Fedora 34+
Differential Revision: https://phabricator.services.mozilla.com/D125094
2021-09-09 16:15:11 +00:00
Jesse Schwartzentruber be85536c1a Bug 1729907 - Improve mozboot support for Archlinux. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D125067
2021-09-09 15:39:15 +00:00
Mitchell Hentges e2de461dc0 Bug 1729732: Undefined `make_extra` shouldn't cause build failures r=ahal
This was an existing bug that was hidden behind this code path only
being executed for non-make backends.

Differential Revision: https://phabricator.services.mozilla.com/D124937
2021-09-08 17:30:09 +00:00
Csoregi Natalia 7b751b9325 Backed out changeset f42e32addd89 (bug 1534799) for causing failures on test_txtctrl.xhtml. CLOSED TREE 2021-09-08 18:48:58 +03:00
Niklas Baumgardner 4b352f588f Bug 1534799 - Convert &searchTextBox.clear.label; to fluent. r=emalysz,fluent-reviewers,flod,dao,morgan
Differential Revision: https://phabricator.services.mozilla.com/D123640
2021-09-08 14:56:59 +00:00
Mike Hommey eab6be4ae6 Bug 1729411 - Package the source wasm2c generates. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D124734
2021-09-08 00:40:14 +00:00
Mike Hommey 4e8e23f4e8 Bug 1729383 - Simplify the parallel build setup. r=firefox-build-system-reviewers,mhentges
Historically, client.mk was not invoked with -jn because it would create
race conditions, but that was actually mostly solved by the addition of
`.NOTPARALLEL` in bug 422986, although the mechanism of adding -jn via
`MOZ_MAKE_FLAGS` or `MOZ_PARALLEL_BUILD` has continued well past that.

Nowadays, client.mk is only invoked by mach (it will even bail out if
that's not the case) and only has one target (`build`) and no
dependencies.

This means we don't need to rely on `MOZ_PARALLEL_BUILD` to pass `-jn` in
some cases, and can just always invoke `make -f client.mk` with `-jn`, even
when we just want no parallelism, in which case we can use `-j1`.

This, in turn, allows to remove the extra allow_parallel argument to
`_run_make`, and only rely on `num_jobs`, and to remove some of the
multiple ways the `n` in `-jn` could be set.

Differential Revision: https://phabricator.services.mozilla.com/D124729
2021-09-08 00:10:22 +00:00
Mike Hommey 4fa73a9662 Bug 1729383 - Fix the parsing of `mk_add_options` for non-make backends. r=firefox-build-system-reviewers,mhentges
It was failing on mk_add_options values containing a `=` character.

Differential Revision: https://phabricator.services.mozilla.com/D124727
2021-09-08 00:10:22 +00:00
Katherine Patenio 416c5975bd Bug 1728460 - Migrate appmenu-viewcache.inc.xhtml to Fluent. r=mtigley,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D124404
2021-09-07 17:46:19 +00:00
Francesco Lodolo (:flod) 0a73aa7a74 Bug 1729002 - Drop esr78 from cross-channel generation, r=eemeli
Differential Revision: https://phabricator.services.mozilla.com/D124457
2021-09-07 11:49:33 +00:00
Kagami Sascha Rosylight bc233d2be7 Bug 1723117 - Limit max_workers value of ProcessPoolExecutor to 61 r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D121360
2021-09-03 22:27:05 +00:00
Mitchell Hentges d60e22aec0 Bug 1723237: Allow empty lines in python requirements files r=ahal
This allows strategic grouping of dependencies, which can be convenient.

Differential Revision: https://phabricator.services.mozilla.com/D122895
2021-09-03 20:46:24 +00:00
Mitchell Hentges f3c64fd210 Bug 1712133: Add missing space to pypi-optional error message r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D122894
2021-09-03 20:46:24 +00:00
Mitchell Hentges c74698f4b4 Bug 1717051: Remove obsolete virtualenv code r=ahal
The "six"-related comment is no longer relevant, and `here` isn't used.

Differential Revision: https://phabricator.services.mozilla.com/D122885
2021-09-03 20:46:23 +00:00
Mitchell Hentges 2b15db71aa Bug 1717051: Consolidate state_dir creation r=firefox-build-system-reviewers,glandium
We had logic in both `mach_bootstrap` and the Mach Bootstrapper to
create the state_dir.

This joins them and has the added benefit of creating the state dir
earlier in the Mach lifecycle (as will be needed for early instantiation
of the Mach virtualenv).

Differential Revision: https://phabricator.services.mozilla.com/D120400
2021-09-03 20:46:23 +00:00
Mitchell Hentges d9613ed9e7 Bug 1717051: Move arm64 rosetta check to bootstrap r=firefox-build-system-reviewers,glandium
It was originally added to "create-mach-environment" because that would
eventually be called by "./mach bootstrap".
However, as "create-mach-environment" is going away, this moves it
closer to the command that it's meant to impact.

Differential Revision: https://phabricator.services.mozilla.com/D120399
2021-09-03 20:46:23 +00:00
Mitchell Hentges ef3a0ed88c Bug 1717051: Validate if optional dependencies are out-of-date r=ahal
Though it's acceptable for an optional dependency to not be installed,
it *is* a problem if it's installed to the wrong version.

Differential Revision: https://phabricator.services.mozilla.com/D122886
2021-09-03 20:46:22 +00:00
Mitchell Hentges f5b0cb5bc1 Bug 1717051: Rename "mach_bootstrap.py" to "mach_initialize.py" r=firefox-build-system-reviewers,glandium
We've overloaded "bootstrap" to mean three different things:
* The "standalone bootstrap script": `python/mozboot/bin/bootstrap.py`.
  This is to freshly clone a new repo, then run `./mach bootstrap`.
* `./mach bootstrap`: Install necessary dependencies and set up the
  system for development.
* "Mach bootstrap": do the in-process initialization work Mach needs
  before it can run commands.

By using the term "initialize" instead, perhaps we can remove
ambiguity when discussing Mach.

I'm not attached to the name (or this change at all), but I'm interested
in reviewer thoughts :)

Differential Revision: https://phabricator.services.mozilla.com/D120410
2021-09-03 20:46:22 +00:00
Sandor Molnar ed29500ab4 Backed out changeset 150afb585fe2 (bug 1721463) for causing python unit test failures. CLOSED TREE 2021-09-03 23:24:15 +03:00
Sandor Molnar e3e47f564b Backed out changeset 63c10baf1578 (bug 1727916) for causing browser-chrome failures in en-US/appmenuitem. 2021-09-03 23:22:36 +03:00
Molly Howell 84c9447e39 Bug 1727916 - Convert several customizable toolbar item names to sentence case. r=fluent-reviewers,flod,emalysz
This required migrating several strings to Fluent, and the bulk of this patch
is those migrations. The rest of the items matched up with an entry in the app
menu, so those items were switched over to use the app menu strings.

Differential Revision: https://phabricator.services.mozilla.com/D124270
2021-09-03 19:26:59 +00:00
Cosmin Sabou f4575710bd Backed out 6 changesets (bug 1712151, bug 1725708, bug 1724465) for causing invalid handle xpcshell failures. CLOSED TREE
Backed out changeset 90b9ff20b311 (bug 1725708)
Backed out changeset 75336eb10063 (bug 1725708)
Backed out changeset f438e13f8986 (bug 1724465)
Backed out changeset 11de3a4312bd (bug 1725708)
Backed out changeset 2c6edefd8417 (bug 1712151)
Backed out changeset 9ccf99dae3c7 (bug 1712151)
2021-09-03 22:33:24 +03:00
Molly Howell ddce135a13 Bug 1493174 - Fix running Visual Studio using the mach ide command. r=firefox-build-system-reviewers,mhentges
There are two problems that this patch addresses:
1) The path to the VS solution file that we're using to launch it is malformed,
   because os.path.join is using backslash seperators, but we're passing it a
   path which already contains forward slash seperators, and mixing the two is
   not valid. This is preventing VS from being launched at all.
2) We're throwing if explorer.exe does not return 0 when we call it to launch
   VS, but explorer.exe always returns 1 when run this way, even if it
   succeeded, so we output a spurious exception to the console.

Differential Revision: https://phabricator.services.mozilla.com/D124488
2021-09-03 18:32:05 +00:00
Mitchell Hentges 1c5be829d7 Bug 1725708: `./mach vendor python` should populate from a clean state r=ahal
Rather than deleting the expected target directory of each package
that's being vendored, clear the whole `third_party/python` directory
and re-populate it from scratch.

As part of this, there's an "exclusion" list for packages that can't
be vendored from PyPI.

This has some benefits:
* It'll be harder to forget scraps of files and directories and leave
  them in `third_party/python`.
* The exclusion list makes it more clear which packages are managed
  manually, and the friction it adds to the workflow will guide
  developers to use "requirements.in" instead.

The `test_up_to_date_vendor` test will verify that the vendor directory
is always clean.

Differential Revision: https://phabricator.services.mozilla.com/D123124
2021-09-03 17:31:58 +00:00
Mitchell Hentges 4abd2ed050 Bug 1725708: Move all possible vendored deps to centralized system r=ahal
Note that, as part of adding this packages to the automated vendoring
system, some dependencies were automatically added - most notably,
dependencies of `taskcluster` that become visible with Python 3.6+.

Also, adds `**/.git` to the exclusions because:
* `.git` is part of our `.hgignore`, but
* `.git` is part of the `aiohttp` `tar.gz` file.

Since the file isn't needed for `pip install`-ing `aiohttp`,
and since we want `./mach vendor python` to be a no-op when there's
no requirement changes, we exclude it.

Differential Revision: https://phabricator.services.mozilla.com/D123122
2021-09-03 17:31:57 +00:00
Andrew Halberstadt 67cef7d1ab Bug 1721463 - Set ENABLE_TESTS when generating test backend with an EmptyConfig, r=firefox-build-system-reviewers,mhentges
In 'gen_test_backend.py' we fallback to an 'EmptyConfig' in the event there is
no build environment. We do this for the benefit of tests that don't need a
Firefox build (like Python unittests). Without it, we wouldn't be able to run
e.g |mach python-test python/mozversioncontrol| unless you had a build.

However since this 'EmptyConfig' doesn't have 'ENABLE_TESTS' set, it means any
manifests defined in a 'moz.build' behind the 'TEST_DIRS' variables will not be
discovered.

Differential Revision: https://phabricator.services.mozilla.com/D120386
2021-09-03 17:10:16 +00:00
Mitchell Hentges 894b32dc18 Bug 1723237: Remove `vendor` argument from `install_pip_package()` r=ahal
Now that `piptools` is no longer installed from the vendored location,
there are no remaining cases where we are doing `install_pip_package()`
with a vendored package.

Differential Revision: https://phabricator.services.mozilla.com/D123241
2021-09-03 17:06:05 +00:00
Mitchell Hentges 78827b7e2c Bug 1723237: Use pip-compile directly from vendored location r=ahal
We've been installing `piptools` so that we can use the `pip-compile`
binary. However, we can just as easily do
`python -m piptools compile ...` instead, which also allows us to
skip a redundant install.

Differential Revision: https://phabricator.services.mozilla.com/D123240
2021-09-03 17:06:05 +00:00
Mitchell Hentges 80ed655270 Bug 1728671: Use gettempdir() instead of tempdir r=firefox-build-system-reviewers,glandium
The `tempfile.tempdir` cache value isn't always populated, but
`tempfile.gettempdir()` always is. They both provide the same result.

Differential Revision: https://phabricator.services.mozilla.com/D124261
2021-09-03 13:13:21 +00:00
Noemi Erli a2a6dc8bf7 Bug 1728458 - Fix lint failure r=fix CLOSED TREE 2021-09-03 00:49:46 +03:00
Niklas Baumgardner 9caba81d8c Bug 1728458 - Migrate browser-box.inc.xhtml to Fluent. r=emalysz,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D124384
2021-09-02 21:34:14 +00:00
Dan Minor 18d37eb7a8 Bug 1715232 - Add ICU4X license sha256 to vendor_rust.py r=glandium,mhoye
This adds the sha256 for the ICU4X license as a variable to vendor_rust.py,
so it can be used as we add ICU4X crates. Since there are several projects
ongoing that want to use ICU4X, I think it makes sense to get the license
review done once, early, so that whoever is ready to land code that uses
ICU4X first is not blocked waiting on license review.

Differential Revision: https://phabricator.services.mozilla.com/D123776
2021-09-01 21:55:38 +00:00
Francesco Lodolo (:flod) 61cda2481d Bug 1728513 - Remove Fluent migration recipes for Firefox 88-91 r=eemeli
Differential Revision: https://phabricator.services.mozilla.com/D124160
2021-09-01 09:50:33 +00:00
Katherine Patenio 25a76b9440 Bug 1609558 - Migrate panelUI.inc.xhtml to Fluent. r=mtigley,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D123837
2021-08-30 17:58:08 +00:00