The cargo-vet toolchain is auto-bootstrapped and setup for things to
work properly. We modify `mach vendor rust` to invoke `mach cargo vet`
instead of doing its own setup, but in a underhanded way to work around
bug 1772453.
Differential Revision: https://phabricator.services.mozilla.com/D148218
These were broken with Bas's region rewrite. They seem to just
pretty 'empty' now which is less useful than not having a pretty
printer at all.
Differential Revision: https://phabricator.services.mozilla.com/D148459
Upgrades to Glean v50.0.1, which comes with a rewritten core and
UniFFI-powered bindings.
Glean has some API changes, so we swap it over to that. Mostly mechanical changes.
Also upgrades to inherent v1.0 in fog.
This matches what Glean uses internally and gets rid of one duplicated crate.
Also upgrades to glean-parser==6.0.1
One crate duplication now (change in `python/mozbuild/mozbuild/vendor/vendor_rust.py` required).
Some new crates now vendored.
These are transitive dependencies of Glean dependencies, all with valid
licenses and already used in other products (mobile).
Differential Revision: https://phabricator.services.mozilla.com/D146062
The function2 library is a header-only library which provides support
for defining move-only function types, similar to the proposed
std::move_only_function in C++23, but with support for additional
customization.
This appears to be the first time we've vendored code using the boost
license, so I've added it to license.html and moz_yaml.py, and have
requested review to ensure it is OK to use code with this license.
Differential Revision: https://phabricator.services.mozilla.com/D145690
In bug 1769902, we allowed such duplicate crates when one of them is
under build/rust. This changes the logic to be more generic and allow
a crate duplicate when it depends on a crate of the same name, whether
in build/rust or elsewhere, which could happen for vendored transitional
crates (rare, but happens). This is also a more generic way to handle
our situation with build/rust and doesn't rely on parsing Cargo.toml.
Differential Revision: https://phabricator.services.mozilla.com/D147824
This is deliberately simple. Future improvements will report if the
vendoring doesn't produce the same content as what's in the tree, and
attach errors to a better location than the first line of Cargo.lock.
Differential Revision: https://phabricator.services.mozilla.com/D147466
The 'U' flag represents "universal newline". It has been deprecated
since Python3.3. Since then "universal newline" is the default when a
file is opened in text mode (not bytes). In Python3.11 using the 'U'
flag throws errors. There should be no harm in removing 'U' from 'open'
everywhere it is used, and doing allows the use of Python3.11.
For more reading see: https://docs.python.org/3.11/whatsnew/3.11.html#changes-in-the-python-api
Differential Revision: https://phabricator.services.mozilla.com/D147721
Added two additional string types to be pretty printed by the string
pretty printer.
Added the children method to smartpr, which yields 1 child. Has
the added benefit of returning (name, gdb.Value) which can be used
from an IDE with support for Python in GDB.
Differential Revision: https://phabricator.services.mozilla.com/D141404
While testing the change, I noticed that the old implementation also
considered the 'current' path as a part of all ancestors. As such, I
added an additional path component to the path that is immediately
discarded so that the behavior is consistent.
Differential Revision: https://phabricator.services.mozilla.com/D142273
In test_base.py the backslashes had to be replaced with forward slashes,
otherwise the string isn't read properly from the mozconfig during the
test. This was always 'broken', but the test just happened to pass since
the old path comparison was naive.
Differential Revision: https://phabricator.services.mozilla.com/D142272
Created GeneratedFile method implementing HTML Fragment Preprocessor.
Usage in a `moz.build` file will be as follows
```
GeneratedFile(
"example.js",
script="/python/mozbuild/mozbuild/action/html_fragment_preprocesor.py",
entry_point="generate",
inputs=["example_a.xml", "example_b.xml"],
)
```
Example XML files for testing are in `python/mozbuild/mozbuild/test/action/data/html_fragment_preprocesor/`
Differential Revision: https://phabricator.services.mozilla.com/D146255
Created GeneratedFile method implementing HTML Fragment Preprocessor.
Usage in a `moz.build` file will be as follows
```
GeneratedFile(
"example.js",
script="/python/mozbuild/mozbuild/action/html_fragment_preprocesor.py",
entry_point="generate",
inputs=["example_a.xml", "example_b.xml"],
)
```
Example XML files for testing are in `python/mozbuild/mozbuild/test/action/data/html_fragment_preprocesor/`
Differential Revision: https://phabricator.services.mozilla.com/D146255