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

84 Коммитов

Автор SHA1 Сообщение Дата
ahochheiden 05f6219e68 Bug 1846068 - Load all command modules for `./mach busted` r=firefox-build-system-reviewers,glandium
Since it depends on the `command_handlers` from `Registrar` for the
`file` `sub_command` to determine the appropriate component, we need to
load all command modules so that we can file against any of them.

Differential Revision: https://phabricator.services.mozilla.com/D184853
2023-08-01 19:59:26 +00:00
ahochheiden f71b25f3ce Bug 1845833 - Add the ability to specify command dependencies for commands r=firefox-build-system-reviewers,glandium
This just forces other command modules to be loaded in addition to the
'base' command. We need this so that decorators needed by the 'base'
command that are in another command module are ran during initialization
(eg: `@SettingsProvider`).

I thought about centralizing the `@SettingsProvider` decorators into one
module and always loading it, but they can depend on the
'command_handlers' in `Registrar`, so the modules they're currently in
have to be loaded for them to execute, so there wasn't a way around
this.

Differential Revision: https://phabricator.services.mozilla.com/D184852
2023-08-01 19:59:25 +00:00
ahochheiden 739e9af89c Bug 1845306 - Make some additional commands load all modules so that @SettingsProvider is ran when needed r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D184505
2023-07-25 19:51:32 +00:00
ahochheiden 8e819ce0b9 Bug 1695312 - Add the ability for `dispatch` to ad-hoc load command modules that aren't already loaded r=firefox-build-system-reviewers,glandium
This is really just shuffling a bunch of things around. None of the
'load_*' member functions of the `Mach` class actually needed to be
member functions. They can all be static so that they can be used
anywhere. That combined with moving all the other 'mach_command' logic
to a different file, allows us to load the module for any command so
that we can successfully dispatch it.

Differential Revision: https://phabricator.services.mozilla.com/D184060
2023-07-25 00:24:53 +00:00
ahochheiden 918f331078 Bug 1695312 - Selectively load only the mach command modules needed for the command about to be run r=firefox-build-system-reviewers,glandium
This makes loading almost all commands faster, since only one module
file is loaded rather than all of them. There is one main exception,
dealing with 'help'. Running `./mach help` (or -h or --help) requires
the description text for every command, so every module file is still
loaded.

We could expand this improvement here to consolidate all commands and
their parameters in this `MACH_COMMANDS` dict, but the only two benefits
are improving help, and not having two places where the commands are
specified (their file, and this dict).

There's a lot of extra work needed to do that, especially for handling
sub commands, and it did not seem worth the cost for the benefit at this
time.

Depends on D180499

Differential Revision: https://phabricator.services.mozilla.com/D180500
2023-07-25 00:24:53 +00:00
ahochheiden 85bd65e288 Bug 1695312 - Activate the virtualenv associated with a mach command much earlier r=firefox-build-system-reviewers,glandium
This activated virtualenv for a command is managed
`CommandSiteManager` and it is passed down to where it was activated
before to prevent a second, redundant, activation.

Differential Revision: https://phabricator.services.mozilla.com/D180499
2023-07-25 00:24:53 +00:00
ahochheiden cff561db42 Bug 1695312 - Add missing commands to the `MACH_COMMANDS` dict r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D181032
2023-07-25 00:24:52 +00:00
ahochheiden 9359c26d78 Bug 1695312 - Sort the `MACH_COMMANDS` dict alphabetically r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D181031
2023-07-25 00:24:52 +00:00
ahochheiden 5d7f61d985 Bug 1842700 - Fix l10n-cross-channel MachCommandReference module path r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D183217
2023-07-25 00:24:52 +00:00
Natalia Csoregi 0504f56a51 Backed out changeset 38a3792830be (bug 1842700) for causing mach lint issues. a=backout 2023-07-19 17:58:02 +03:00
Natalia Csoregi f757923c9f Backed out 4 changesets (bug 1695312) as per request. a=backout
Backed out changeset e5687aa10124 (bug 1695312)
Backed out changeset 6123c201f979 (bug 1695312)
Backed out changeset 06aefe3418e1 (bug 1695312)
Backed out changeset 56f3d3fc806f (bug 1695312)
2023-07-19 17:31:51 +03:00
ahochheiden b306ed3e91 Bug 1695312 - Selectively load only the mach command modules needed for the command about to be run r=firefox-build-system-reviewers,glandium
This makes loading almost all commands faster, since only one module
file is loaded rather than all of them. There is one main exception,
dealing with 'help'. Running `./mach help` (or -h or --help) requires
the description text for every command, so every module file is still
loaded.

We could expand this improvement here to consolidate all commands and
their parameters in this `MACH_COMMANDS` dict, but the only two benefits
are improving help, and not having two places where the commands are
specified (their file, and this dict).

There's a lot of extra work needed to do that, especially for handling
sub commands, and it did not seem worth the cost for the benefit at this
time.

Depends on D180499

Differential Revision: https://phabricator.services.mozilla.com/D180500
2023-07-19 05:09:01 +00:00
ahochheiden 5fb9481dc3 Bug 1695312 - Activate the virtualenv associated with a mach command much earlier r=firefox-build-system-reviewers,glandium
This activated virtualenv for a command is managed
`CommandSiteManager` and it is passed down to where it was activated
before to prevent a second, redundant, activation.

Differential Revision: https://phabricator.services.mozilla.com/D180499
2023-07-19 05:09:01 +00:00
ahochheiden 151ba3d4e7 Bug 1695312 - Add missing commands to the `MACH_COMMANDS` dict r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D181032
2023-07-19 05:09:01 +00:00
ahochheiden abc9a69bfd Bug 1695312 - Sort the `MACH_COMMANDS` dict alphabetically r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D181031
2023-07-19 05:09:00 +00:00
ahochheiden f7e850c46c Bug 1842700 - Fix l10n-cross-channel MachCommandReference module path r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D183217
2023-07-19 05:09:00 +00:00
ahochheiden d33bf29823 Bug 1842691 - Check for spaces in `topsrcdir` and `MOZILLABUILD` (on Windows) on Mach startup r=firefox-build-system-reviewers,glandium
We've had this restriction for a while (with a note of it in the docs,
but the note in the docs can easily be overlooked, leading to confusing
errors). Erroring out right on Mach startup and providing instructions
for the workaround immediately should help users get around this issue
faster.

Differential Revision: https://phabricator.services.mozilla.com/D183209
2023-07-14 21:27:58 +00:00
Sandor Molnar 4a27268732 Backed out 6 changesets (bug 1842700, bug 1695312, bug 1808732) for causing lint failures. CLOSED TREE
Backed out changeset 0413a48d4f03 (bug 1808732)
Backed out changeset 2839c2d35459 (bug 1695312)
Backed out changeset eab5cdaf4bc9 (bug 1695312)
Backed out changeset a35da3fce458 (bug 1695312)
Backed out changeset 6d2a2dd4790b (bug 1695312)
Backed out changeset b8cf086066cf (bug 1842700)
2023-07-13 15:01:55 +03:00
ahochheiden 6704bd1cda Bug 1695312 - Selectively load only the mach command modules needed for the command about to be run r=firefox-build-system-reviewers,glandium
This makes loading almost all commands faster, since only one module
file is loaded rather than all of them. There is one main exception,
dealing with 'help'. Running `./mach help` (or -h or --help) requires
the description text for every command, so every module file is still
loaded.

We could expand this improvement here to consolidate all commands and
their parameters in this `MACH_COMMANDS` dict, but the only two benefits
are improving help, and not having two places where the commands are
specified (their file, and this dict).

There's a lot of extra work needed to do that, especially for handling
sub commands, and it did not seem worth the cost for the benefit at this
time.

Depends on D180499

Differential Revision: https://phabricator.services.mozilla.com/D180500
2023-07-13 05:41:21 +00:00
ahochheiden d492f7b9f8 Bug 1695312 - Activate the virtualenv associated with a mach command much earlier r=firefox-build-system-reviewers,glandium
This activated virtualenv for a command is managed
`CommandSiteManager` and it is passed down to where it was activated
before to prevent a second, redundant, activation.

Differential Revision: https://phabricator.services.mozilla.com/D180499
2023-07-13 05:41:21 +00:00
ahochheiden ced7f9b3c5 Bug 1695312 - Add missing commands to the `MACH_COMMANDS` dict r=firefox-build-system-reviewers,glandium
Also add the associated virtualenv names to each command that has one in
preparation for loading the virtualenvs earlier (next patch).

Differential Revision: https://phabricator.services.mozilla.com/D181032
2023-07-13 05:41:21 +00:00
ahochheiden 89fbee0640 Bug 1695312 - Sort the `MACH_COMMANDS` dict alphabetically r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D181031
2023-07-13 05:41:20 +00:00
ahochheiden 020a1fce7e Bug 1842700 - Fix l10n-cross-channel MachCommandReference module path r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D183217
2023-07-13 05:41:20 +00:00
nicklas boman c3f1952ebe Bug 1798746 - Ensure checking for mercurial/git only if its a hg/git clone, not release source r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D162461
2023-05-09 16:33:36 +00:00
Cosmin Sabou 6f28253d4c Backed out changeset fab57c6553f4 (bug 1798746) for causing win aarch64 build bustages. CLOSED TREE 2023-05-09 08:25:18 +03:00
nicklas boman 641e4e6803 Bug 1798746 - Ensure checking for mercurial/git only if its a hg/git clone, not release source r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D162461
2023-05-09 02:15:30 +00:00
Iulian Moraru 5f08dc66c3 Backed out changeset 02cc74634f7d (bug 1798746) for causing build bustages. CLOSED TREE 2023-05-03 20:54:50 +03:00
nicklas boman 9871455d0d Bug 1798746 - Ensure checking for mercurial/git only if its a hg/git clone, not release source r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D162461
2023-05-03 15:45:36 +00:00
Marco Castelluccio f69e697461 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
Emilio Cobos Álvarez de7acc6e32 Bug 1802405 - Prepend mozillabuild msys2 to path only for the build. r=glandium
This reverts bug 1801826 and instead prepends the msys2 path only for
the build, which is a bit more sensible.

This allows us to remove the existing warning from old_configure, since
that can't happen now.

Differential Revision: https://phabricator.services.mozilla.com/D163073
2022-11-26 23:23:34 +00:00
Marian-Vasile Laza 6b7ee54e9b Backed out changeset 738ee02dfc2a (bug 1802405) for causing build bustages. CLOSED TREE 2022-11-26 01:57:53 +02:00
Emilio Cobos Álvarez fe8160e90a Bug 1802405 - Prepend mozillabuild msys2 to path only for the build. r=glandium
This reverts bug 1801826 and instead prepends the msys2 path only for
the build, which is a bit more sensible.

This allows us to remove the existing warning from old_configure, since
that can't happen now.

Differential Revision: https://phabricator.services.mozilla.com/D163073
2022-11-25 23:08:46 +00:00
Marco Castelluccio ecb54845b0 Bug 1790816 - Reformat build/ with isort. r=linter-reviewers,ahal DONTBUILD
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162668
2022-11-24 17:23:47 +00:00
Emilio Cobos Álvarez 26d1a61070 Bug 1801826 - Prepend rather than append mozillabuild path. r=ahochheiden
This makes sure that we find the right tools in the right msys2
environment in case we get called from another msys2 env.

Differential Revision: https://phabricator.services.mozilla.com/D162753
2022-11-23 18:17:28 +00:00
Mike Hommey 1c4a8ab901 Bug 1736762 - Stop waiting for user input before the creation of ~/.mozbuild . r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D162638
2022-11-22 01:35:45 +00:00
Mark Striemer 02523cc40a Bug 1792237 - ./mach addwidget to scaffold a shared front-end component r=hjones
Depends on D161141

Differential Revision: https://phabricator.services.mozilla.com/D157937
2022-11-03 21:32:34 +00:00
Mark Striemer e73bd9df47 Bug 1788797 - Move storybook commands to mach from npm scripts r=hjones,ahal
Differential Revision: https://phabricator.services.mozilla.com/D156241
2022-09-12 21:13:20 +00:00
Ben Dean-Kawamura e965ed0056 Bug 1766045 - Adding mach command to generate UniFFI files r=glandium
Added `mach uniffi generate` which executes `uniffi-bindgen-gecko-js` to
generate UniFFI bindings. It's unfortunate that we need to check these
files in, but I couldn't figure out a way to auto-generate them as part
of the build process.

Adding `#include "nsIContent.h"` to dom/base/nsINodeList.h.  I think
that should have been present before, but things built okay because of
the way things got combined in the uniffied .cpp files. Adding these new
webIDL files bumped `NodeListBinding.cpp` to a new uniffied .cpp file
which caused the build to fail.

Differential Revision: https://phabricator.services.mozilla.com/D144468
2022-08-03 18:59:36 +00:00
Butkovits Atila a8ad39a288 Backed out 6 changesets (bug 1766045) for causing build bustages. CLOSED TREE
Backed out changeset 113593df6272 (bug 1766045)
Backed out changeset f137315bb6af (bug 1766045)
Backed out changeset d86ad195a9a0 (bug 1766045)
Backed out changeset e8bc2ec40cff (bug 1766045)
Backed out changeset 2d33e41ac507 (bug 1766045)
Backed out changeset 4d5874e16302 (bug 1766045)
2022-08-03 17:40:30 +03:00
Ben Dean-Kawamura 86a582c07a Bug 1766045 - Adding mach command to generate UniFFI files r=glandium
Added `mach uniffi generate` which executes `uniffi-bindgen-gecko-js` to
generate UniFFI bindings. It's unfortunate that we need to check these
files in, but I couldn't figure out a way to auto-generate them as part
of the build process.

Adding `#include "nsIContent.h"` to dom/base/nsINodeList.h.  I think
that should have been present before, but things built okay because of
the way things got combined in the uniffied .cpp files. Adding these new
webIDL files bumped `NodeListBinding.cpp` to a new uniffied .cpp file
which caused the build to fail.

Differential Revision: https://phabricator.services.mozilla.com/D144468
2022-08-03 13:48:28 +00:00
Jan-Erik Rediger 21fd159579 Bug 1779992 - mach subcommand to upgrade Glean across all files. r=chutten DONTBUILD
This only modifies the files and prints the steps to be done manually.

Differential Revision: https://phabricator.services.mozilla.com/D152627
2022-07-26 13:51:31 +00:00
Barret Rennie 1ded07651e Bug 1779937 - Add mach xpcshell r=ahal,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D151984
2022-07-21 00:47:45 +00:00
Tooru Fujisawa 1079972361 Bug 1776870 - Integrate esmify script into mach. r=yulia,firefox-static-analysis-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D150494
2022-07-11 14:55:11 +00:00
Bas Schouten 740a43ba09 Bug 1772510: Add 'mach perf-data-review' command that generates a template data review for simple performance monitoring probes. r=chutten,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D148255
2022-07-08 12:40:44 +00:00
Jan-Erik Rediger e4e54ac9c2 Bug 1774144 - mach: Only report physical cores if they could be determined. r=firefox-build-system-reviewers,ahochheiden
As per the docs:

> Return the number of logical CPUs in the system (same as os.cpu_count in Python 3.4) or None if undetermined.
> [...] On OpenBSD and NetBSD psutil.cpu_count(logical=False) always return None

Glean tries to coerce values to the expected type. `None` cannot be
coerced to an integer, so this blows up.
We conditionally report that value now only if we can properly detect
one.

Differential Revision: https://phabricator.services.mozilla.com/D149201
2022-06-15 08:10:40 +00:00
Mitchell Hentges 2ff00d22be Bug 1759681: Conditionally add each MozillaBuild path r=ahochheiden
When using Mach outside of MozillaBuild, rather than avoiding adding
paths entirely if any part of MozillaBuild is already in the `PATH`,
instead conditionally add each one if it doesn't exist already.

This ensures no duplication of paths, while also correctly handling the
not-uncommon case of developers manually adding MozillaBuild's Python to
their Windows `PATH`.

Differential Revision: https://phabricator.services.mozilla.com/D141377
2022-03-23 14:48:57 +00:00
Mitchell Hentges f04ccd7a53 Bug 1759256: Update all PATH-munging to use os.pathsep r=webdriver-reviewers,ahochheiden,jgraham
Windows uses `;` as the path separator, Unix-based systems use `:`.
`os.pathsep` conveniently represents the current system's separator.

All OS-specific path separators have been replaced with `os.pathsep`
except for some explicitly Windows-specific mozharness configs.

Differential Revision: https://phabricator.services.mozilla.com/D140981
2022-03-14 18:41:49 +00:00
Thomas Wisniewski 6e59fe82c1 Bug 1715900 - Add a mach test-interventions command for testing webcompat interventions; r=jgraham,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D138384
2022-02-15 15:07:18 +00:00
Butkovits Atila 298b987a56 Backed out 3 changesets (bug 1715900) for causing Python failures. CLOSED TREE
Backed out changeset c1bad2dbd960 (bug 1715900)
Backed out changeset 2355ea418b97 (bug 1715900)
Backed out changeset 11c95163a2f6 (bug 1715900)
2022-02-11 20:41:49 +02:00
Thomas Wisniewski 10326d782c Bug 1715900 - Add a mach test-interventions command for testing webcompat interventions; r=jgraham,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D138384
2022-02-11 17:27:44 +00:00