Today the docs tell you to directly clone `mozilla-central`, which is a weird departure from what we do in the other per-platform documents for no real reason. Instead, reference the standalone `bootstrap.py` script as we do for Linux and macOS.
Also, do a little scan and replace references to `mozilla-central` with `mozilla-unified` where appropriate.
Differential Revision: https://phabricator.services.mozilla.com/D88051
Also define a scheme for storing the index of Glean definitions files in a file
separate from the build system for consumption by
* mach build
* mach doc
* (future) mozilla/probe-scraper
Differential Revision: https://phabricator.services.mozilla.com/D87600
There's a Windows Defender CLI (`Get-MpComputerStatus`) available, but MozillaBuild
can't (easily) access PowerShell. So, instead, we find Windows Defender status and path exclusions
by checking the registry at HKLM\SOFTWARE\Microsoft\Windows Defender.
Determining if Windows Defender is "on" or not is a surprisingly vague task.
Not only does it encompass a lot of components (of which Ricky and I believe "Real-time protection"
is the part slowing down the build), but there's (at least?) two different kinds of "disabled"
states that it can be in:
* If "disabled" via Settings, it will turn itself back on after a reboot
* If an antivirus is installed, it will turn itself off permanently
Unfortunately, disabling "Real-time protection" in Settings doesn't affect any registry keys, but
I'm opting to ignore this because I doubt many users are manually disabling this protection before
each build. The repercussion of this is that users may be incorrectly warned "your Firefox
directory isn't excluded from Windows Defender!".
Focusing on the antivirus use case and querying the registry I found that:
* Querying the `IsServiceRunning` value wasn't sufficient because new Windows installations didn't have that key
* Querying the `DisableRealtimeMonitoring` value was inconsistent - it can be missing, and not always because an antivirus removed it
* Querying the `DisableAntiVirus` value doesn't _sound_ accurate (we care about Real-time Protection), but it's consistently "off" for non-AV machines, and "on" for machines with an AV installed. So, this is our winner!
TL;DR: there may be some "false positive" warnings about excluding the Firefox srcdir, but they're
accurate for my test cases and workaround-able (just add the exclusion to Windows Defender).
Also, this patch updates our Windows Defender docs to make them:
* More easily link-able
* Have direct advice to resolve the issue
Differential Revision: https://phabricator.services.mozilla.com/D85952
In order to have a cross platform ide for C++ language support we've added `clangd`
extenssion and artifact part of `vscode` suite.
To generate the configuration you simply run:
`./mach ide vscode `.
Differential Revision: https://phabricator.services.mozilla.com/D85416
`bootstrap` won't be able to install them for you forever (and it isn't really properly capable of installing it for you at this very moment), and installing Python 3 as well as Python 2 is increasingly non-trivial on arbitrary OS'es, so we need to document things properly here.
Specific guidance on how to use `brew` to install Python 2 on macOS is included here. I also go into more depth on the situation on Linux and explicitly point people to the existence of `pyenv` with basic usage information, which should fill in the gaps left by the OS package managers.
Also, update some documentation to prefer the `python3` binary to the `python` binary (which is often Python 2), and fix some broken links.
Differential Revision: https://phabricator.services.mozilla.com/D82611
Glean generates telemetry documentation in markdown and uses tables.
This revision adds support for rendering markdown tables using an extension.
Differential Revision: https://phabricator.services.mozilla.com/D83685
Also delete a bunch of dead code that was apparently meant to be useful for subclassing, but there's no subclasses of `DebianBootstrapper` in tree.
Differential Revision: https://phabricator.services.mozilla.com/D82073
This patch includes content from the following places.
- Lina's "Getting Rusty: How to ship an XPCOM component in Firefox" slide deck.
- Zibi's "Rust <--> C/C++ FFI for newbies" gist.
It also links to Emilio's "FFI patterns #1 - Complex Rust data structures
exposed seamlessly to C++" blog post. I was going to include that content, but
it's very long, so I have omitted it for now.
Differential Revision: https://phabricator.services.mozilla.com/D81963
On a new machine the instructions didn't fully work for me. I suspect that `libpulse-dev:i686` -> `i386` might have been a typo, and I also needed `libx11-xcb-dev:i386`.
Differential Revision: https://phabricator.services.mozilla.com/D81560
Some of the testing info is from the Oxidation wiki, and the logging info is
largely from a dev-platform email by Valentin. The other parts I wrote from
scratch.
The commit also makes some small improvements to the Rust build docs.
Differential Revision: https://phabricator.services.mozilla.com/D81017