This is a requirement anyway, and the bootstrap script will yell at you if it can't find `hg` (or `git`, if it's necessary), but we can be more specific about this requirement here so people don't waste any more time than necessary.
Differential Revision: https://phabricator.services.mozilla.com/D90172
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
The default configuration recommended here[1], while being a good
generic default, it doesn't quite work for mozilla-central as that peeks
the closest ancestor directory with a `Cargo.toml`.
For example, when editing under `servo/components/style`, it'd try to
use that directory as a project root and fail like:
```
0: Failed to run `cargo metadata --manifest-path /home/emilio/src/moz/gecko/servo/components/style/Cargo.toml`
1: Error during execution of `cargo metadata`: Updating crates.io index
error: failed to get `servo_atoms` as a dependency of package `style v0.0.1 (/home/emilio/src/moz/gecko/servo/components/style)`
Caused by:
failed to load source for dependency `servo_atoms`
```
Instead, we want to override it using the `'project_directory'` setting
so that we hit this path[2] and it works out of the box.
[1]: https://rust-analyzer.github.io/manual.html#youcompleteme
[2]: 63db7ea379/ycmd/completers/language_server/language_server_completer.py (L1914-L1916)
Differential Revision: https://phabricator.services.mozilla.com/D79938
Note that I cannot do unit test because of it doesn't support regex payload
''Failed: could not resolve a lint function from''
Differential Revision: https://phabricator.services.mozilla.com/D78158
Instead of linking to a page in MDN which links back to firefox-source-doc, this change links it directly to "Building Firefox On Windows"
Differential Revision: https://phabricator.services.mozilla.com/D79302
We don't require immediately setting an asignee for high
severity bugs. Rewriting this line because it was contradictory
to policy.
Differential Revision: https://phabricator.services.mozilla.com/D78612
Update definition to:
The new definition of Triaged will be Firefox-related bugs of type
defect where the component is not
UNTRIAGED, and a non-default value not equal to -- or N/A.
Bugs of type Task or Enhancement may have a severity of N/A,
but defects must have a severity that is neither -- or
N/A.
This means edits to the references to setting release
status flags (which are now not required.)
Also switching to using :ref:`link text <target>` for
internal links because of some errors when compiling
.rst to HTML.
Fix linter error in rst
Differential Revision: https://phabricator.services.mozilla.com/D74515
This changeset covers the new, severity-based triage process
Fix linting errors
Fix links and language
Fix headings and broken link
Add missing newline to labels.rst
Differential Revision: https://phabricator.services.mozilla.com/D73999
Code should be using `throw Components.Exception("", Cr.ERROR);` instead,
since `new Error()` just converts the int value of the Cr.ERROR into a string,
whereas `Exception` constructs an Exception object with the result property set
to the Cr.ERROR value, so other code can identify it.
Differential Revision: https://phabricator.services.mozilla.com/D28074
This rule is based on the ESLint built-in no-throw-literal. Cr.ERRORs are also
literals since they are just integers and so have all the same disadvantages of
no stack info.
TestInterfaceJS.js is explicitly testing handling of throwing raw Cr.ERRORs and
thus needs to stay.
Differential Revision: https://phabricator.services.mozilla.com/D28072