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

7636 Коммитов

Автор SHA1 Сообщение Дата
andrej 6cbd9c7da7 Bug 1741975 - Have WPT tests available in taskcluster r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140843
2022-04-01 16:59:17 +00:00
Tom Ritter bff6a5c9a7 Bug 1761075: Update version.h for dav1d when vendoring r=jbauman,jewilde
Differential Revision: https://phabricator.services.mozilla.com/D141890
2022-04-01 16:45:42 +00:00
ahochheiden 3e352a03ed Bug 1762059 - Resolved an infinite loop by updating the control variable to be one directory up (as it was before the Pathlib changes) r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D142495
2022-03-30 19:16:00 +00:00
Alexandre Lissy fbae530eb5 Bug 1761974 - Handle ccache 'Uncacheable/Unsupported code directive' r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D142335
2022-03-29 14:44:53 +00:00
Dan Minor 6553d6bd7f Bug 1757407 - Allow a third duplicated instance of tokio; r=firefox-build-system-reviewers,glandium
Unfortunately, the dependencies of l10nregistry-rs require tokio 1.0. This
allows this third duplicated instance. I think it makes more sense to try to
move the other uses in tree to a more modern version than to try to downgrade
the version of tokio required by l10nregistry-rs and dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D139854
2022-03-25 20:39:44 +00:00
Eemeli Aro 6b9e2716f0 Bug 1732151 - Migrate dataReportingNotification strings to Fluent. r=preferences-reviewers,fluent-reviewers,flod
The dataReportingNotification is the last place where the .properties
vendorShortName is used. As notifications already support Fluent,
porting this to use Fluent as well seems pretty strqaightforward.

Differential Revision: https://phabricator.services.mozilla.com/D141860
2022-03-24 15:57:54 +00:00
Mitchell Hentges f782dd8f45 Bug 1727819: Guard against command site -> another site activations r=ahal
The Mach site is asserted to be compatible with all command sites, but
command sites are deliberately //not// asserted to be compatible with
each other - they're //supposed// to have the flexibility of being
able to be incompatible.

Accordingly, let's fail loudly if code tries to activate from one
command site to another.

Note that, due to the Mach site being a superset of common, it's safe to
activate from "common" to "<other command site>". This is needed for
cases like `./mach python --virtualenv ...`.

This required updating the `mozproxy` tests, who would deliberately
activate the `common` site so they could call a `mozproxy` entry point
script. These tests were fixed by instead invoking `mozproxy` as a
module (`-m`) of the current `python-test` site.

Differential Revision: https://phabricator.services.mozilla.com/D141659
2022-03-24 14:27:49 +00:00
Mitchell Hentges 23cbe80fd0 Bug 1724274: Move virtualenv dependency manifests to python/virtualenvs r=ahal
This is needed for a few reasons:
* All mach commands can use virtualenvs, not just `build`-related
  commands, so the files don't make sense to be in `build/`.
* When locking is added, more files associated with virtualenvs will be
  added, and this will change will ease the related directory structure
  setup.
* This removes the need for a redundant "_virtualenv_packages" keyword
  as part of the manifest filenames.

Differential Revision: https://phabricator.services.mozilla.com/D140382
2022-03-24 14:04:34 +00:00
Tom Ritter 7a9646220a Bug 1761111: Correct the removal of files in the vendor directory r=jewilde
The intention is to remove all the files in the vendoring directory
(which may be the yaml directory or may not be) except those
specified in 'keep'.

However convert_patterns_to_paths expects a list of patterns, and
we were providing it with only one. This resulted in it iterating
over '**' as a string (one iteration for '*' and a second for '*')

This prevented it from traversing recursively. Turning it into a
list fixes it.

Depends on D141901

Differential Revision: https://phabricator.services.mozilla.com/D141902
2022-03-24 13:45:28 +00:00
Tom Ritter c616ef091b Bug 1761111: Small typo and qualitity of life improvements r=jewilde
This creates a way to override the 'tracking: tag' mechnaism
of a moz.yaml file without having to edit it. Useful to
test a library update when there is no new tag available.

Differential Revision: https://phabricator.services.mozilla.com/D141901
2022-03-24 13:45:28 +00:00
Mitchell Hentges f4d496e238 Bug 1759725: Mach: migrate from hosted Sentry to cloud-managed Sentry r=glob
Update DSN for reporting exceptions to the new Sentry instance, and
update CI job to create releases on the new Sentry as well.

Differential Revision: https://phabricator.services.mozilla.com/D141122
2022-03-23 15:55:44 +00:00
Mitchell Hentges 238c5f019d Bug 1760677: Remove virtualenv_packages.txt mock from test_vendor.py r=ahal
Since bug 1717104 changed `./mach vendor python` to no longer have a
manual virtualenv activation, we can remove the test mocking that
softly handled the activation.

Differential Revision: https://phabricator.services.mozilla.com/D141674
2022-03-23 14:50:47 +00:00
Mitchell Hentges 14386d0c7e Bug 1717104: Activate virtualenv before running command r=perftest-reviewers,ahal,AlexandruIonescu
All commands declaring a virtualenv will have them activated before the
command executes. Removes all now-redundant manual activations of
declared virtualenvs.

Commands that don't declare a virtualenv will still implicitly be
associated with the "common" virtualenv, but unlike explicit
virtualenv declarations it'll have to be activated manually, just
like it was before this patch.

To smooth the migration with existing usages, virtualenv activation
behaviour was changed slightly: if attempting to activate a new
virtualenv, but the source venv is already command venv, then raise an
exception. (In the future, we should improve testability of
virtualenv scaffolding logic so that tests can be added for this
sort of thing.) This did cause some issues with some tests, which
will be solved more cleanly with bug 1724273. In the meantime,
minimal modifications were made to failing tests to keep them green:
* `test_command_line.py` was activating the `common` virtualenv so
  that it could install `mozproxy`, and use its CLI. Instead, I
  modified the test to use `mozproxy` using the "module" interface
  (`python -m mozproxy ...`). At that point, `MozbuildObject` was
  unnecessary and usages were replaced with simpler variants.
* `test_vendor.py` needed its explicit `activate_virtualenv()` call
  patched out. It still needs to use a virtualenv's Python
  executable, but due to `sys.executable` now being kept up-to-date
  as of bug 1717051, it could be used directly.

Differential Revision: https://phabricator.services.mozilla.com/D122892
2022-03-23 14:50:45 +00:00
Mitchell Hentges 83f95f6c5d Bug 1723237: Move low-hanging fruit commands to centralized Python dep system r=ahal
Creates/updates virtualenvs for some mach commands, replacing
their ad-hoc usage of `install_pip_package()`, `pip install`,
and `sys.path` modifications.

Note: The `docs` virtualenv has `Sphinx==1.1.3` installed, even
though a more modern version of `Sphinx` is used when
`./mach doc` is run. This is ok for now, since `./mach doc` will
just install the newer `Sphinx` over top of the old one. Secondarily,
when we port `./mach doc` to use the centralized system, we'll
be incentivized to make the different `doc` commands use synchonized
versions of the same packages. Success!

Also, note that manual installation of `html5lib` and `requests`
isn't ported to the `wpt` site: this is because they're already
provided by the inherited Mach site.

Differential Revision: https://phabricator.services.mozilla.com/D122902
2022-03-22 20:49:42 +00:00
Mitchell Hentges 0a5464aef2 Bug 1759084: Print reason for site being out-of-date r=ahal
There are cases in CI where sites are being considered out-of-date,
despite the situation being unexpected - for example, the
"site out-of-date even though already activated" issue described in
this patch's associated bug.

Return a `reason` string from `_is_venv_up_to_date()`, and print it in
cases where a virtualenv being out-of-date is erroneous.

Differential Revision: https://phabricator.services.mozilla.com/D140855
2022-03-22 19:44:13 +00:00
Mitchell Hentges 338a1fa71c Bug 1759084: Tighten `MachSiteManager` API surface r=ahal
The Mach site management has been significantly simplified
in `mach_initialize.py`, so less of the `MachSiteManager`
API is used. Privatize such now-externally-unused functions,
and no longer return unneeded values.

Differential Revision: https://phabricator.services.mozilla.com/D140854
2022-03-22 19:44:12 +00:00
Mitchell Hentges 638f64a642 Bug 1760054: Add `Set-ExecutionPolicy` item to Windows Mach docs r=ahochheiden
By default, Windows clients are not allowed to run Powershell
scripts [1]. Since our way of understanding `./mach` in Powershell is to
have a `mach.ps1` script, we should have instructions for configuring
Windows to properly understand and invoke it.

`RemoteSigned` is a good default, because it maintains security, while
allowing "local scripts" (such as those from VCS) to run.

[1] https://docs.microsoft.com/en-ca/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2

Differential Revision: https://phabricator.services.mozilla.com/D141400
2022-03-22 16:43:59 +00:00
Cristian Tuns 1f61733417 Backed out 3 changesets (bug 1759084) for causing symbol bustages a=backout
Backed out changeset 412197c555c6 (bug 1759084)
Backed out changeset 5f18914637a3 (bug 1759084)
Backed out changeset 13aef63ad6a5 (bug 1759084)
2022-03-22 01:18:47 -04:00
Mitchell Hentges a822813370 Bug 1759084: Print reason for site being out-of-date r=ahal
There are cases in CI where sites are being considered out-of-date,
despite the situation being unexpected - for example, the
"site out-of-date even though already activated" issue described in
this patch's associated bug.

Return a `reason` string from `_is_venv_up_to_date()`, and print it in
cases where a virtualenv being out-of-date is erroneous.

Differential Revision: https://phabricator.services.mozilla.com/D140855
2022-03-21 21:08:23 +00:00
Mitchell Hentges 25ca8bd87b Bug 1759084: Tighten `MachSiteManager` API surface r=ahal
The Mach site management has been significantly simplified
in `mach_initialize.py`, so less of the `MachSiteManager`
API is used. Privatize such now-externally-unused functions,
and no longer return unneeded values.

Differential Revision: https://phabricator.services.mozilla.com/D140854
2022-03-21 21:08:22 +00:00
Mitchell Hentges 9653ddb59b Bug 1759329: Properly exclude Brew's site-packages when using Mach venv r=ahal
Previously, when trying to determine the minimal `sys.path` that just
includes the standard library (but no `pip`-installed packages), we
would resolve the `sys.path` and remove the system and user
site-packages. However, this "removal" step didn't work as-is for
`brew`'s Python, because its "system site-packages" is //different//
from its `site.getsitepackages()`.

Stepping back though, there's an easier solution: run `python` with the
`-S` flag, and no "site" paths or custom initialization logic will add
anything extra to the stdlib.

Differential Revision: https://phabricator.services.mozilla.com/D141508
2022-03-21 20:24:33 +00:00
Eemeli Aro c3af76718f Bug 1745905 - Drop extraneous convert_xul_to_fluent script. r=jaws
The in-tree copy of the XUL+DTD -> Fluent migration script was added in bug 1517528.
The original [0] has been refactored and updated since then, while the copy
here has not been maintained. It should be removed to clarify the situation.

Firefox source docs [1] were updated for Bug 1596726 to include a link to the
original script.

[0]: https://github.com/zbraniecki/convert_xul_to_fluent
[1]: https://firefox-source-docs.mozilla.org/l10n/migrations/legacy.html

Differential Revision: https://phabricator.services.mozilla.com/D133886
2022-03-18 14:36:54 +00:00
Mitchell Hentges ff4cd170f7 Bug 1759193: Remove workaround for handling `local/` in venv paths r=ahal
Now that we're using `sysconfig` instead of `distutils`, our `purelib`
and `platlib` paths should correctly point to python environment paths
without a spurious `local/` component at their roots.

Differential Revision: https://phabricator.services.mozilla.com/D140871
2022-03-16 17:11:23 +00:00
Mitchell Hentges 40e9f7a3d6 Bug 1759585: Avoid hang in `./mach configure` r=firefox-build-system-reviewers,nalexander
Depending on the subprocesses created (such as if
`--with-ccache=sccache` is set), `./mach configure` may hang.

More details about why this is is documented in bug 1753797.

The workaround is to lean on the standard library to stream-and-format
output, rather than our existing `ProcessHandler` code.

Though this still streams both `stdout` and `stderr` in real-time, I saw
some ordering differences between the two streams locally. I don't yet
have a reason to believe that these differences are harmful or otherwise
incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D141028
2022-03-16 16:32:25 +00:00
Mitchell Hentges e9b6ee396c Bug 1759125: Venv site-packages should include both purelib and platlib r=ahochheiden
On newer systems, Python is intelligently populating pure-python and
platform-specific packages into //two different directories//.
Traditionally, these directories would be symlinked - or only one would
exist. However, to support these newer systems (and be better integrated
with Python conventions), we should handle both of these directories
properly.

The solution here is, when calculating the `site_packages_dir()`,
calculate all of them, and handle the multitude at all call sites.
The one use case where we want only one path (the resolving the location
for the `mach.pth` pthfile), I've opted for the `platlib`, since both
pure python dependencies //and// platform-specific dependencies are
referenced by the pthfile.

Differential Revision: https://phabricator.services.mozilla.com/D140870
2022-03-14 20:51:23 +00:00
Mitchell Hentges 8d217e06a3 Bug 1756047: When creating Mach venv in CI, put it in `$WORKSPACE` r=ahal
I'm guessing that the reason we haven't been building the Mach
virtualenv in CI so far is because:
* The default location in `~/.mozbuild` may not be cleared between jobs
* There's a performance cost to `pip install`-ing packages, especially
  if they're not needed
* In the past, it was tricky to have some jobs use a Mach virtualenv and
  others not.

This led to weird workarounds where a virtualenv would be created,
populated, then masqueraded as the "system Python" so that Mach would
be able to run with access to its dependencies without needing to
"create a Mach virtualenv".

This patch addresses the first point about the Mach virtualenv location:
In CI, if `WORKSPACE` is set, the Mach venv will be created in
`$WORKSPACE/mach_virtualenv`.
The other two points are solved by explicit configuration using the
`MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE` environment variable.

Differential Revision: https://phabricator.services.mozilla.com/D140256
2022-03-10 20:41:54 +00:00
Mitchell Hentges 98bdea23c9 Bug 1755516: Add "common" to PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS r=ahal
There are cases in CI where we're using the system Python, but we
still want to create a virtualenv. For example, build jobs use the
system Python packages, but Mozharness wants to have access to Mach
packages. So, a virtualenv needs to be created (the `"common"`
virtualenv), whose associated `python` binary is used to invoke
Mozharness.

So, just like for the `build` site, allow creating the `common`
site even when the "native package source" is the system Python.

Since `mach_virtualenv_requirements.txt` already depends on
`common_virtualenv_requirements.txt`, this restriction should not cause
validation breakage.

Differential Revision: https://phabricator.services.mozilla.com/D140255
2022-03-10 20:41:54 +00:00
Mitchell Hentges 70e8dc46bd Bug 1755516: Expose config variable for Mach native dependency source r=ahal
Adds support and documentation for the
`MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE` environment variable.

The "fallback" behaviour here should be backwards-compatible, which will
enable us to piece-by-piece explicitly use the `"system"` where
needed, then remove the backwards-compatibility shim afterwards.

A restriction added by this change is that it's no longer possible to
have the combination of:
* Have Mach use the system Python, and
* Have the active command site do `pip install`.

This is because this case shouldn't be necessary (if `pip install` is
allowed, why use the system?) and will allow us to enforce that all
non-build command sites always use their lockfiles, when they're set up.

When referring to behaviour in CI, I've opted to only refer to the
upcoming behaviour (of `MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"`)
because the current heuristic behaviour feels complex enough that it
should be understood by checking the code, rather than docs. Besides,
the heuristic will be removed pretty soon (right? ;)

Differential Revision: https://phabricator.services.mozilla.com/D138932
2022-03-10 20:41:54 +00:00
Iulian Moraru 98af6aa00f Backed out 3 changesets (bug 1756047, bug 1755516) for causing py3 failures. CLOSED TREE
Backed out changeset f0043e07ec5e (bug 1756047)
Backed out changeset 9fc187cb982e (bug 1755516)
Backed out changeset 5f956232e850 (bug 1755516)
2022-03-10 00:53:18 +02:00
Mitchell Hentges e1e19f6e62 Bug 1756047: When creating Mach venv in CI, put it in `$WORKSPACE` r=ahal
I'm guessing that the reason we haven't been building the Mach
virtualenv in CI so far is because:
* The default location in `~/.mozbuild` may not be cleared between jobs
* There's a performance cost to `pip install`-ing packages, especially
  if they're not needed
* In the past, it was tricky to have some jobs use a Mach virtualenv and
  others not.

This led to weird workarounds where a virtualenv would be created,
populated, then masqueraded as the "system Python" so that Mach would
be able to run with access to its dependencies without needing to
"create a Mach virtualenv".

This patch addresses the first point about the Mach virtualenv location:
In CI, if `WORKSPACE` is set, the Mach venv will be created in
`$WORKSPACE/mach_virtualenv`.
The other two points are solved by explicit configuration using the
`MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE` environment variable.

Differential Revision: https://phabricator.services.mozilla.com/D140256
2022-03-09 22:19:13 +00:00
Mitchell Hentges 18645cf2ae Bug 1755516: Add "common" to PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS r=ahal
There are cases in CI where we're using the system Python, but we
still want to create a virtualenv. For example, build jobs use the
system Python packages, but Mozharness wants to have access to Mach
packages. So, a virtualenv needs to be created (the `"common"`
virtualenv), whose associated `python` binary is used to invoke
Mozharness.

So, just like for the `build` site, allow creating the `common`
site even when the "native package source" is the system Python.

Since `mach_virtualenv_requirements.txt` already depends on
`common_virtualenv_requirements.txt`, this restriction should not cause
validation breakage.

Differential Revision: https://phabricator.services.mozilla.com/D140255
2022-03-09 22:19:13 +00:00
Mitchell Hentges 253d3a9cd6 Bug 1755516: Expose config variable for Mach native dependency source r=ahal
Adds support and documentation for the
`MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE` environment variable.

The "fallback" behaviour here should be backwards-compatible, which will
enable us to piece-by-piece explicitly use the `"system"` where
needed, then remove the backwards-compatibility shim afterwards.

A restriction added by this change is that it's no longer possible to
have the combination of:
* Have Mach use the system Python, and
* Have the active command site do `pip install`.

This is because this case shouldn't be necessary (if `pip install` is
allowed, why use the system?) and will allow us to enforce that all
non-build command sites always use their lockfiles, when they're set up.

When referring to behaviour in CI, I've opted to only refer to the
upcoming behaviour (of `MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"`)
because the current heuristic behaviour feels complex enough that it
should be understood by checking the code, rather than docs. Besides,
the heuristic will be removed pretty soon (right? ;)

Differential Revision: https://phabricator.services.mozilla.com/D138932
2022-03-09 22:19:12 +00:00
Mitchell Hentges af1de54c49 Bug 1758584: Fix virtualenv-path scrubbing from command _pthfile_lines r=ahal
We want `_pthfile_lines()` to consistently and accurately represent a
virtualenv's `sys.path` modifications.

However, this becomes tricky when comparing expected `pthfile_lines`
//before// activating a virtualenv versus //afterwards//, especially
since Python implicitly adds some paths (such as the path to
`site-packages`).

The current solution made this scrubbing only happen if we were
`pip install`-ing into the site. Unfortunately, it //doesn't// work for
the "use system Python for the `build` site", because:
* Pre-activation result: `site-packages` isn't added, because we aren't
  using it
* Post-activation result, implicitly-added `site-packages` isn't
  scrubbed, because **scrubbing only happened for
  `SitePackagesSource.VENV`**

Stepping back, the solution here is:
* `pthfile_lines` only represents Mach modifications //on top// of
  implicit virtualenv behaviour: since `site-packages` is always added
  by default, it shouldn't be in our explicit `pthfile_lines`.
* The only time when implicit `sys.path` additions throws us off is when
  `SitePackagesSource.SYSTEM`: so, move the scrubbing to happen in that
  case instead.

Finally refactor the "conditional deprioritization" comment to be more
useful and more accurate: we've implemented the "nontrivial complexity"
of purging site-packages, and the other piece about nothing being
`pip install`-ed feels self-explanatory enough.

Differential Revision: https://phabricator.services.mozilla.com/D140580
2022-03-09 22:18:34 +00:00
Mitchell Hentges 9e039efcfa Bug 1758584: Add in-proc venv activation paths to the end of `sys.path` r=ahal
So far, we've been using `virtualenv`'s `activate_this.py` script.
However, unlike earlier expectations, it adds its `sys.path` additions
to the //front//, not the back! This breaks our prioritization
requirements, such as:
* When using any package from the system environment, import *all
  possible* packages from the system to avoid compatibility issues.
* Use vendored packages instead of virtualenv-installed packages
  wherever possible, because it more-closely matches developer
  expectations ("why is this package vendored if it's not used?")

Define an `activate_virtualenv()` function that replicates the logic
of `activate_this.py` [1], except for three differences:
* Don't modify `sys.real_prefix`, since it's a non-standard property of
  `sys`.
* Only add seen-with-`venv`-module paths to the `sys.path` (`$prefix`,
  `$prefix/.../$site_packages_dir`) - don't do the paths in-between.
* And, of course, append instead of prepend `sys.path` entries.

As an aside, this is one of the few remaining blockers from allowing
us to fully embrace `venv` instead of `virtualenv` - the last piece is
waiting on the fix for bug 1697833 to propagate.

[1]
https://github.com/pypa/virtualenv/blob/20.7.2/src/virtualenv/activation/python/activate_this.py

Differential Revision: https://phabricator.services.mozilla.com/D140579
2022-03-09 22:18:33 +00:00
Mitchell Hentges 264cb79386 Bug 1758584: Raise error if active site is out-of-date r=ahal
Unless either the site's requirements or its on-disk virtualenv
changes, it shouldn't become out-of-date.
This will also catch situations where sites are incorrectly
being marked out-of-date due to `sys.path` mismanagement.

Differential Revision: https://phabricator.services.mozilla.com/D140578
2022-03-09 22:18:33 +00:00
Mitchell Hentges 68aff032ed Bug 1758189: Don't double-srcdir for mach during stdalone bootstrap r=ahal
When calling Mach, it was prefixed with the `srcdir`, even though the
`srcdir` was also the working directory of the invocation. This caused
the invocation to fail.

Differential Revision: https://phabricator.services.mozilla.com/D140400
2022-03-09 21:51:13 +00:00
andrej 950f616c3e Bug 1741971 - Add MozPerfTest Testing Section to WPT Layer r=perftest-reviewers,sparky
Depends on D133785

Differential Revision: https://phabricator.services.mozilla.com/D137459
2022-03-09 20:53:29 +00:00
andrej c601667cc8 Bug 1741971 - Make MozPerfTest Layer to run WPT r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D133785
2022-03-09 20:44:48 +00:00
Alexis Beingessner ec10d290e7 Bug 1755602 - consistently use minidump-stackwalk instead of minidump_stackwalk. r=glandium
Inconsistency confuses some of our tools. As part of this, I:

* Updated some docs to point to rust-minidump
* Added a fallback to mozcrash.py to try both versions
* Make mozcrash.py use --brief output when the local mdsw is used
* Remove the renaming hack from build-minidump-stackwalk.sh

This isn't as simple as a sed because we still have breakpad in tree
for minidump-analyzer. I did my best to replace the right strings.

Differential Revision: https://phabricator.services.mozilla.com/D138971
2022-03-09 16:44:42 +00:00
Mitchell Hentges 2da98775fb Bug 1756224: Update MozlintParser docs about default `paths` r=ahal
Updates parser documentation to clarify that, if no `paths` are
provided, then only those discovered by `--outgoing` and `--workdir`
are linted.

Differential Revision: https://phabricator.services.mozilla.com/D139158
2022-03-09 15:52:48 +00:00
Mitchell Hentges 8c04017a04 Bug 1750632: `./mach lint` should bootstrap `clang-format` r=ahal
Tie into `code_analysis`'s `get_clang_tools()` functionality to
intelligently bootstrap clang if it either doesn't exist or is
out-of-date.

This required exposing `command_context` to the linting logic, as it's
needed to call `artifact_toolchain(...)`.

Note that this means that the standalone `runcli.py` file won't be able
to support bootstrapping `clang-format`, or other linters that lean on
`command_context` in the future.

Finally, `substs.get("HOST_BIN_SUFFIX")` was replaced with a
windows-specific `binary += ".exe"`, because not all contexts where
the tests are run will have access to populated `substs` data.
Note that this worked before without the extension because it was
only used for starting a process, in which context Windows automatically
tries all `PATHEXT` options. Since we're now doing an `isfile()` check
(to enable more intelligent failure cases when `clang-format` doesn't
exist), we need the path to be fully correct.

Differential Revision: https://phabricator.services.mozilla.com/D137335
2022-03-04 19:39:32 +00:00
Nick Alexander 77ecd3dc6b Bug 1752630 - Use UNIX permissions in packaged omnijars and XPIs. r=glandium
This unifies the ZIP permissions in omnijars and internal XPIs
produced by the packager directly and those repacked by l10n
single-repacks.

Differential Revision: https://phabricator.services.mozilla.com/D137340
2022-03-04 16:52:45 +00:00
mvollmer 96c7648608 Bug 1755305 - Fix invalid mach command for Visual Studio clean target r=mhentges DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D139595
2022-03-03 14:17:59 +00:00
Mitchell Hentges fc251d248b Bug 1710287: `./mach clang-format` should update tools if out-of-date r=andi,marco
Before, clang tools would only be bootstrapped if they didn't exist.
Now, bootstrapping also occurs if the version doesn't meet requirements.

Differential Revision: https://phabricator.services.mozilla.com/D137331
2022-03-02 18:13:32 +00:00
Nick Alexander 38725ef570 Bug 1752968 - Minify Fluent `.ftl` files in addition to `.properties` files. r=eemeli
Depends on D138365

Differential Revision: https://phabricator.services.mozilla.com/D138572
2022-03-02 17:43:49 +00:00
Nick Alexander 1288cd82fa Bug 1752968 - Make single-locale l10n repacks minify `.properties` files. r=firefox-build-system-reviewers,eemeli,glandium
Differential Revision: https://phabricator.services.mozilla.com/D138365
2022-03-02 17:43:48 +00:00
Mitchell Hentges 1ba4a4ea2d Bug 1755562: Document Mach dependency management r=ahal
* Restructure "Using third-party Python packages" page to focus on the
 "Mach commands"/"adding a Python package" use case since that's why
 most people will be looking at these docs.
* Document the `<site>_virtualenv_packages.txt` behaviour and how it
  relates to a Mach command's definition.
* Simplify the information around using a non-PyPI index to reference
  the RelEng docs directly. It's a shame that the existing docs don't
  explain how to identify tasks that need to use the internal mirror,
  because I'm not sure either. There's existing cases of ad-hoc `pip`
  installs //not// using the mirror, but the pattern isn't clear to me.
* Remove the "specify hashes" information, since the centralized
  solution (will) automatically manage this internally.
  * Arguably, it's still beneficial instructions for ad-hoc
  `pip install` usages, but those are frowned upon today anyways - use
  the centralized solution!

Differential Revision: https://phabricator.services.mozilla.com/D138931
2022-03-02 15:51:30 +00:00
Nika Layzell 6f3de9dc9b Bug 1751948 - Part 3: Build IPDL sources within the directory they were declared, r=glandium
This change allows IPDL sources to respect FINAL_LIBRARY when building, which
is important for allowing us to build gtest-only IPDL_SOURCES files.

Differential Revision: https://phabricator.services.mozilla.com/D137167
2022-02-28 21:01:47 +00:00
Nika Layzell a7de25bcb9 Bug 1751948 - Part 2: Add support for generated UNIFIED_SOURCES files, r=glandium
This patch adds support for generated files to be placed in
UNIFIED_SOURCES.  This will be used in part 3 to build .cpp files
generated by IPDL_SOURCES by adding them to IPDL's UNIFIED_SOURCES under
the hood. Using a unified build for IPDL files is important, as a
significant build time regression was observed locally when using
non-unified sources to build ipdl sources, due to the large number of
generated files.

Differential Revision: https://phabricator.services.mozilla.com/D137166
2022-02-28 21:01:47 +00:00
Andrew Halberstadt 9cb4d22dce Bug 1754496 - [taskgraph] Use identical functions from vendored taskgraph in util/taskcluster.py, r=taskgraph-reviewers,aki
This replaces all of the functions in gecko_taskgraph/util/taskcluster.py with
the ones from the vendored taskgraph if they are identical.

Differential Revision: https://phabricator.services.mozilla.com/D138458
2022-02-25 21:25:05 +00:00