Now that Python's stdlib `venv` is used, `virtualenv` is no longer
needed.
Since mozharness depends on the wheels for `setuptools` and `pip`, and
they were vendored within `virtualenv` we must move them somewhere else.
I've chosen to add `third_party/python/venv/wheels` to hold those wheels
now that `virtualenv` is no longer there.
Depends on D145786
Differential Revision: https://phabricator.services.mozilla.com/D145787
Brew's Python 3.10 causes `virtualenv==20.7.2` to produce a wonky folder
structure (`$venv/opt/homebrew/lib/python3.10/site-packages`?).
This is likely fixed with newer `virtualenv`, but the simpler workaround
here is to use `venv` instead now that Python 3 is always used.
Adds `python3-venv` to docker image so that tests and debian-based tasks
can leverage it.
Differential Revision: https://phabricator.services.mozilla.com/D144872
The version of git-cinnabar that the bootstrap script pulls now doesn't
require Mercurial. Even older versions have been working fine without
Mercurial for a while.
Differential Revision: https://phabricator.services.mozilla.com/D160601
The fix for bug 1759555 involves having rust-analyzer invoke `mach`.
However, `mach` can't be executed directly on Windows systems -- it's a
Python script, not an executable, and so `::CreateProcessW` has no idea
what to do with it.
Work around this by having `mach` explicitly direct `rust-analyzer` to
use `sys.executable` to execute `mach`.
Differential Revision: https://phabricator.services.mozilla.com/D160306
It can be a frustrating experience to push something to e.g. try, get
build errors, fix them, and realize on a subsequent push that there were
other build errors, but since the build failed as soon as it reached the
first error, the logs didn't show them.
While stopping at the first error locally is more helpful locally
(although it still stop immediately and errors are often buried in the
logs), it is actually desirable to avoid stopping on automation.
Differential Revision: https://phabricator.services.mozilla.com/D154327
While we're here, make the setup more consistent across host/target
c/c++, and remove the C compiler warning flags from the C linker flags,
where they are irrelevant.
Differential Revision: https://phabricator.services.mozilla.com/D159358
I noticed that 'branch' is only used in Updatebot in the
Commit Alert task (we made it for Angle.) It doesn't do
anything anywhere else. So assert this in the validation checks
Differential Revision: https://phabricator.services.mozilla.com/D158047
If there is a vendoring section missing in the moz.yaml,
we will error out. Detect this right away and give a better error.
Perform some cleanup since we know we have a vendoring section.
Differential Revision: https://phabricator.services.mozilla.com/D158046
Also change the default value for --jobs to 0 instead of 1, because
`make -j1` doesn't initialize a jobserver, so cargo uses all cores,
which is a fine default, but now that we may also invoke the rest of
the build system, and because `make -j1` for that is slow, we instead
use 0 as the default (which means auto-detect).
Differential Revision: https://phabricator.services.mozilla.com/D159336
This migration creates the first FTL file under mobile/android/.
As GeckoView isn't actually localised (see bug 1605358), this file
is not exposed to localisers.
A migration script is still included, as previous localisations of
the about:config view's strings are available from its Fennec days.
Running the script will fail in an m-c checkout bootstrapped for
desktop development; it's possible to hack around this by manually
setting the `l10n_toml` value in `python/l10n/test_fluent_migrations/fmt.py`.
Differential Revision: https://phabricator.services.mozilla.com/D155450
This migration creates the first FTL file under mobile/android/.
As GeckoView isn't actually localised (see bug 1605358), this file
is not exposed to localisers.
A migration script is still included, as previous localisations of
the about:config view's strings are available from its Fennec days.
Running the script will fail in an m-c checkout bootstrapped for
desktop development; it's possible to hack around this by manually
setting the `l10n_toml` value in `python/l10n/test_fluent_migrations/fmt.py`.
Differential Revision: https://phabricator.services.mozilla.com/D155450
Make them match a pattern that will be recognized by mozharness as an
error, which, in turn, will make treeherder log parser find them.
Differential Revision: https://phabricator.services.mozilla.com/D159344
The data included in the `Reader:AddButton` message used by SaveToPocket.jsm is slightly modified, as it now includes a localization identifier rather than a preformatted label.
Differential Revision: https://phabricator.services.mozilla.com/D158575
Now that Python's stdlib `venv` is used, `virtualenv` is no longer
needed.
Since mozharness depends on the wheels for `setuptools` and `pip`, and
they were vendored within `virtualenv` we must move them somewhere else.
I've chosen to add `third_party/python/venv/wheels` to hold those wheels
now that `virtualenv` is no longer there.
Depends on D145786
Differential Revision: https://phabricator.services.mozilla.com/D145787
Brew's Python 3.10 causes `virtualenv==20.7.2` to produce a wonky folder
structure (`$venv/opt/homebrew/lib/python3.10/site-packages`?).
This is likely fixed with newer `virtualenv`, but the simpler workaround
here is to use `venv` instead now that Python 3 is always used.
Adds `python3-venv` to docker image so that tests and debian-based tasks
can leverage it.
Differential Revision: https://phabricator.services.mozilla.com/D144872
The data included in the `Reader:AddButton` message used by SaveToPocket.jsm is slightly modified, as it now includes a localization identifier rather than a preformatted label.
Differential Revision: https://phabricator.services.mozilla.com/D158575
The code is slightly cleaned up to not construct identifiers by concatenating strings, and to avoid using the requestTypes array when determining the prompt contents.
A few messages are moved to and from browser.ftl to group them better, though all of the "WebRTC Pop-up notifications" messages could also be moved from there to webrtcIndicator.ftl, which is now also included by browser.xhtml.
The message `webrtc-allow-share-audio-capture-unsafe-delegation` is added, as it appears to have been missed previously -- it's referred to in code, but the message itself was not defined.
Differential Revision: https://phabricator.services.mozilla.com/D158762
Following a suggestion from :mkmelin, this seems like an optimal solution: the overriding/duplication in m-c is removed, and all users get a more powerful default choice that they're still able to override with their own, should they so wish.
For clarity and to match other `about:` pages, the shared code is placed under `toolkit/content/`, and all content under `docshell/resources/` is removed.
Differential Revision: https://phabricator.services.mozilla.com/D156478
To support and enable the migration, quite a bit of refactoring is needed.
Many of the localised error messages are in fact fragments of HTML, including messages with nesting not supported by Fluent. In the FTL, these have each been split up into multiple messages using a custom migration transform (included directly in the script). This allows for localisers to work with the messages without HTML syntax, but does require the messages' structures to be maintained elsewhere. To that effect, the JS file represents messages as arrays of `[tagName, l10nId, l10nArgs]` tuples from which it builds the messages' elements. This fixex bug 1621895.
Though extensive, the refactoring done here is for the most part limited to what's required by the Fluent migration. For instance, not all issues raised in bug 1722896 are resolved here. Places where the structure was sufficiently messy to have introduced bugs or dead code have been cleaned up a bit, though.
This variant of netError that's used by the browser is not itself overridden by anyone else, which allows for it to be tackled first and independently of the docshell and mobile variants. As a part of its content is still passed in as a query parameter, it's possible that later refactors of the rest of the netError system will allow for further clean-up here.
Differential Revision: https://phabricator.services.mozilla.com/D155951
Previously most 'reasons' could only be seen if using a debugger, which
was not helpful when there was a problem in CI.
Depends on D158703
Differential Revision: https://phabricator.services.mozilla.com/D158704
This will resolve issues of drive letter uppercase/lowercase mismatch
causing the venv/site to be considered 'out-of'date'.
Differential Revision: https://phabricator.services.mozilla.com/D158703
Relevant strings from both browser.ftl and browser.properties are collected into a new contentCrash.ftl, which is only loaded when needed.
Differential Revision: https://phabricator.services.mozilla.com/D158649
- Added the variable `OPTIONAL_BROWSER_PACKAGES`, which contains
a list of packages which should, if possible, be installed with
zypper. If that isn't possible because the package can't be
found, just display a warning and continue.
- Add `gconf2-devel` to `OPTIONAL_BROWSER_PACKAGES`, since
gconf2-devel is not available in Tumbleweed repos and also
not required to build Firefox.
Differential Revision: https://phabricator.services.mozilla.com/D152217
This is a condition that happens when going through the js/src code path
in build/moz.configure/init.configure:mozconfig.
Differential Revision: https://phabricator.services.mozilla.com/D157769
This migration creates the first FTL file under mobile/android/.
As GeckoView isn't actually localised (see bug 1605358), this file
is not exposed to localisers.
A migration script is still included, as previous localisations of
the about:config view's strings are available from its Fennec days.
Running the script will fail in an m-c checkout bootstrapped for
desktop development; it's possible to hack around this by manually
setting the `l10n_toml` value in `python/l10n/test_fluent_migrations/fmt.py`.
Differential Revision: https://phabricator.services.mozilla.com/D155450
The synchronous DocumentL10n instance that's created here is not exposed on the root document, as that is the user-defined XML document. The localization root that's connected to it is in a closed shadow root.
This localization won't update on locale changes, but that matches what this view was previously doing.
Differential Revision: https://phabricator.services.mozilla.com/D156544
Since PowerShell is also available on Linux, checking for that is not
sufficient. We must first check if we're on Windows, and if we're not,
return early.
Differential Revision: https://phabricator.services.mozilla.com/D156602
Because the relevant SDK is not installed on the mac workers, we pull it
via fetches and adjust the plain build mozconfig as well as mozconfigs
for rusttest, grouping most things in build/macosx/mozconfig.common.
And because the SDK itself now has all the relevant headers, we don't
need the old check for system C++ headers (which also happens to have
outdated instructions)
Differential Revision: https://phabricator.services.mozilla.com/D156280
The strings from the translation.dtd and translation.properties files are all
merged into a single translationNotification.ftl file.
The string concatenation used in the original is maintained here, as DOM
Localization does not allow for using a <menulist> as a localized element.
Differential Revision: https://phabricator.services.mozilla.com/D155110
Except for the close-notification-message, all of the notification.dtd
strings are only used by popupnotification.js. Accordingly, the strings
are migrated to two different FTL files.
Differential Revision: https://phabricator.services.mozilla.com/D154890
Migrating the strings used by the edit dialogs also allows/requires for their migration elsewhere.
Some streamlining is applied to how autofillEditForms.js gets access to e.g. FormFillUtils methods, so that they are no longer routed via the XHTML files' script tags. The prior independence of this file from internal dependencies appears to have been in place to support its use as a part of the Payments API's UI, but that was dropped in bug 1721229.
The Fluent migration script included in this patch also covers changes from the immediately preceding patch.
The intl documentation change is a typo correction that was noticed while working on this patch.
Differential Revision: https://phabricator.services.mozilla.com/D155705
Migrating the strings used by the edit dialogs also allows/requires for their migration elsewhere.
Some streamlining is applied to how autofillEditForms.js gets access to e.g. FormFillUtils methods, so that they are no longer routed via the XHTML files' script tags. The prior independence of this file from internal dependencies appears to have been in place to support its use as a part of the Payments API's UI, but that was dropped in bug 1721229.
The Fluent migration script included in this patch also covers changes from the immediately preceding patch.
The intl documentation change is a typo correction that was noticed while working on this patch.
Depends on D155478
Differential Revision: https://phabricator.services.mozilla.com/D155705
What are we doing:
- Resolving a few bugs/user requests
Issues being addressed:
- Resolved issue where if the WPT_key.txt file is not available locally it does not affect running ./mach perftest-test
- Added section to WPT where we display the amount of tests we have remaining
- Altered the request_with_timeout function, to better handle requests
Differential Revision: https://phabricator.services.mozilla.com/D155268
I was not able to test this manually as it's a Windows-only component,
but it's at least somewhat covered by the tests in
browser/components/preferences/tests/browser_change_app_handler.js
which pass in CI.
Differential Revision: https://phabricator.services.mozilla.com/D155105
After the preceding change, the editMenuOverlay strings are only used by the styleeditor.
Therefore it makes sense to migrate them here specifically to its localization file.
Differential Revision: https://phabricator.services.mozilla.com/D155449
The upstream git-cinnabar repo no longer has the `git-cinnabar` scripts which
breaks the logic in mozboot. We no longer need to worry about making those files
executable and can simply use the download.py script to do the work. For the
current versions of download.py to work correctly, we need the git metadata to
exist, so use a --depth=1 clone instead.
Differential Revision: https://phabricator.services.mozilla.com/D155502
This should make handling errors more reliable in this situation.
Unfortunately I was unable to test this change, as on my local machine,
`./mach vendor rust` fails with an error even on a fresh checkout of
mozilla-central due to what appears to be an issue with loading
jsparagus sources.
Differential Revision: https://phabricator.services.mozilla.com/D155090
As the widget requires the individual fields' placeholder values to
be known during their build, the DOMLocalization instance used here
needs to have sync methods enabled. For the same reason, the
placeholder strings need to be separate messages, rather than
attributes on the same message as the corresponding label.
Differential Revision: https://phabricator.services.mozilla.com/D154448
This is regression by bug 1581971.
When using custom profile to run GVE via `./mach run --profile <directory>`,
we add "--profile" argument on `adb`. But, after landing bug 1581971, we
don't pass any profile arguments unfortunately.
So we should add it to use custom profile.
Also, This fixes that `./mach run --enable-fission` is broken. We don't need
`--profile` argument to run GVE with fission.
Differential Revision: https://phabricator.services.mozilla.com/D154772
The alert.properties file is not migrated here, as its contents are
also used by OS-specific alert notifications:
- widget/cocoa/OSXNotificationCenter.mm
- widget/windows/ToastNotificationHandler.cpp
Differential Revision: https://phabricator.services.mozilla.com/D154380
This migrates the remaining strings from both commonDialog.dtd and
dialogOverlay.dtd into a single new tabprompts.ftl file, as they are
only used by TabModalPrompt.
Differential Revision: https://phabricator.services.mozilla.com/D154423
This migrates the remaining strings from both commonDialog.dtd and
dialogOverlay.dtd into a single new tabprompts.ftl file, as they are
only used by TabModalPrompt.
Differential Revision: https://phabricator.services.mozilla.com/D154423
While here, square off the situation wrt compiler flags:
- target compiler flags used to be set conditionally but have been made
unconditional in bug 1409276, while leaving a hack around that adds
them under some conditions for host directories. We remove the hack
but keep the corresponding comment that is still relevant and should
be taken into account if target compiler flags are made conditional
later on.
- host compiler flags were excluded for host rust libraries, but that
was an oversight of bug 1409276, which should have applied the same
logic for host compilations.
- host compiler flags are actually potentially necessary for target rust
compilations because rust build scripts may build host C/C++ code
(that's the case for GLSL). We have no idea when that may happen, so
we always propagate them. config/makefiles/rust.mk then further
propagates the flags to cargo, but they have to be set in the backend
in the first place for that to happen.
Differential Revision: https://phabricator.services.mozilla.com/D154326
In order to allow rust-analyzer to be able to use the build script in
the mozbuild crate to discover the configuration information, this patch
adds new flags to the vscode config to tell rust-analyzer to invoke
cargo through `./mach cargo check`, and use the correct target directory
within the objdir rather than `$(topsrcdir)/target`.
Due to the virtual filesystem used by rust-analyzer not including files
in the object directory, this is not sufficient to get suggestions for
symbols from the included files, however it will accurately fetch
diagnostics upon save and run things like proc macros.
A new feature will likely need to be added to rust-analyzer to allow us
to specify additional paths to add to the source root for packages to
fix that issue.
Due to this change using `./mach cargo check`, rather than running it
independently, we don't run into issues caused by running `check`
against crates in the workspace which aren't being used, making the
diagnostics more useful.
An additional feature needed to be added to `./mach cargo check` to
allow specifying `--message-format=json`. I am open to suggestions for a
more elegant way to communicate this flag into the makefile.
Depends on D153269
Differential Revision: https://phabricator.services.mozilla.com/D153270
This converges Windows native notification behavior across all installers to use the COM notification server.
This also fixes an issue where interacting with an MSIX notification opened a new window with new tabs correlated to the toast notification launch arguments. MSIX by default calls the application sending a notification with the provided launch arugments, which was an problem as we use launch arguments in the COM server to reconstruct the origin of a notification.
Differential Revision: https://phabricator.services.mozilla.com/D153538
This will be used to replace the `LooseVersion` within `distutils`.
`StrictVersion` from `distutils` will need something else, as swapping
usages of `StrictVersion` with `LooseVersion` does not result in the
desired behavior.
Differential Revision: https://phabricator.services.mozilla.com/D151062
The baldrdash integration of Cranelift is agreed between SM and CL
to be the wrong shape. Our import of the code base is also old and
causes difficulties for us when upgrading some crates (see bug
1774829). We should remove it for now to unblock bug 1774829.
Differential Revision: https://phabricator.services.mozilla.com/D152806
fix if mercurial is not installed when running mach bootstrap, it will return None and mach will be confused if you are in a hg or git directory at all.
Differential Revision: https://phabricator.services.mozilla.com/D152310
The older versions don't have prebuilt wheels for python 3.9 and newer.
Unfortunately, the latest versions don't support python 3.7 and older,
so keep the older versions for those.
Differential Revision: https://phabricator.services.mozilla.com/D152246
- Removed `install_mercurial`, since it doesn't seem to be used.
- Rewrote `upgrade_mercurial` to act more like on Debian,
meaning it will prompt the user if Mercurial should be
installed via zypper or pip, and install via zypper if
non-interactive. Everything is then installed system-
wide.
- Moved `MERCURIAL_INSTALL_PROMPT` into `base.py`
- Added parantheses to `self.zypper_update()`.
Differential Revision: https://phabricator.services.mozilla.com/D152207