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
We're going to add crates in build/rust that help reduce crate
duplication by providing older versions of crates based on newer ones,
which implies there would be at least 2 crates with the same name, one
of them being under build/rust. Allow that when vendoring.
Differential Revision: https://phabricator.services.mozilla.com/D146661