DXR will be turned off on Tuesday, December 29th. It will redirect to Searchfox.
See the announcement on Discourse.

DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (882de07e4cbe)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
import errno
import re
from itertools import dropwhile
    MozbuildObject,
# This file contains vendoring instructions for cargo.

#define VENDORED_DIRECTORY {directory}

directory = "@top_srcdir@/@VENDORED_DIRECTORY@"
`hg revert Cargo.lock`.
    def get_cargo_path(self):
            from mozfile import which

        for the vendor command.
        return LooseVersion(out.split()[1]) >= '1.37'
        in the working copy, since we're going to change some state
            'M') if os.path.basename(f) not in ('Cargo.toml', 'Cargo.lock')]
{files}

        mach-vendor expects one of the system. It's common to have one
        test_paths = ['/usr/include', '/usr/local/include']

            return {
    def _ensure_cargo(self):
        '''
            return None

    # completeness and because some entries below obviously do not
    # competent to review licensing minutiae.
        'Apache-2.0',
        # To encourage people to remember to do that, we do not whitelist
        'MPL-2.0',
    # Licenses for code used at build time (e.g. code generators). Please see the above
            'fuchsia-zircon',
    # This whitelist should only be used for packages that use an acceptable
            'mach',
    # license-file and for which the license-file entry has been
    # reviewed solely by a build peer; any additions must be checked by
        # we're whitelisting this fuchsia crate because it doesn't get built in the final
    @staticmethod


        But I have no idea how you can meaningfully AND licenses, so
            return False
                return True
    def _check_licenses(self, vendor_dir):
            self.log(logging.DEBUG, 'package_license', {},


                    return False

                    return False
            self.log(logging.DEBUG, 'package_check', {},
            # to scanning individual lines.
                license_file_matches = list(
                if not license_matches and not license_file_matches:
                             'package {} does not provide a license'.format(package))
                # `license` or `license-file`, but not both.  We might as well
                             'package {} provides too many licenses'.format(package))
                    verify_acceptable_license(package, license)


Please request review on the provided license; if approved, the package can be added
                        return False
                    current_hash = hashlib.sha256(license_contents.encode('UTF-8')).hexdigest()
Please request review on the provided license; if approved, please update the
        # before reducing via `all`, so all license issues are found in a
               build_peers_said_large_imports_were_ok=False):

        relative_vendor_dir = 'third_party/rust'
        # We do an |update -p| here to regenerate the Cargo.lock file with minimal
                                         stderr=subprocess.STDOUT,
        # XXX(bug 1576765): Hopefully do something better after
        # The config is toml, parse it as such.
        replaces = {

                '''cargo vendor didn't output a unique replace-with. Found: %s.''' % replaces)
        replace['directory'] = mozpath.relpath(
        def recursive_sort(obj):
                return [recursive_sort(o) for o in obj]
        # Normalize pytoml output:
            if isinstance(data, dict):

            fh.write(CARGO_CONFIG_TEMPLATE.format(


        self.repository.add_remove_files(vendor_dir)
        for f in self.repository.get_changed_files('A'):
                large_files.add(f)
            self.log(logging.ERROR, 'filesize_check', {},
adding.
            self.repository.clean_directory(vendor_dir)
        SIZE_WARN_THRESHOLD = 5 * 1024 * 1024
Please consider finding ways to reduce the size of the vendored packages.
                size=cumulative_added_size)