101:24.74 error[E0599]: no method named `intersection` found for struct `FeatureFlags` in the current scope 101:24.74 --> servo/components/style/queries/feature.rs:126:14 101:24.74 | 101:24.74 103 | / bitflags! { 101:24.74 104 | | /// Different flags or toggles that change how a expression is parsed or 101:24.74 105 | | /// evaluated. 101:24.74 106 | | #[derive(ToShmem)] 101:24.74 ... | 101:24.74 120 | | } 101:24.74 121 | | } 101:24.74 | |_- method `intersection` not found for this 101:24.74 ... 101:24.74 126 | self.intersection(Self::CHROME_AND_UA_ONLY | Self::WEBKIT_PREFIX) 101:24.74 | ^^^^^^^^^^^^ help: there is an associated function with a similar name: `intersects` 101:24.79 error[E0599]: no method named `intersection` found for struct `FeatureFlags` in the current scope 101:24.79 --> servo/components/style/queries/feature.rs:139:14 101:24.79 | 101:24.79 103 | / bitflags! { 101:24.79 104 | | /// Different flags or toggles that change how a expression is parsed or 101:24.79 105 | | /// evaluated. 101:24.79 106 | | #[derive(ToShmem)] 101:24.79 ... | 101:24.79 120 | | } 101:24.79 121 | | } 101:24.79 | |_- method `intersection` not found for this 101:24.79 ... 101:24.79 139 | self.intersection(Self::all_container_axes()) 101:24.79 | ^^^^^^^^^^^^ help: there is an associated function with a similar name: `intersects` 102:23.55 For more information about this error, try `rustc --explain E0599`.
bitflags! { /// Different flags or toggles that change how a expression is parsed or /// evaluated. #[derive(ToShmem)] pubstructFeatureFlags : u8 { /// The feature should only be parsed in chrome and ua sheets. const CHROME_AND_UA_ONLY = 1 << 0; /// The feature requires a -webkit- prefix. const WEBKIT_PREFIX = 1 << 1; /// The feature requires the inline-axis containment. const CONTAINER_REQUIRES_INLINE_AXIS = 1 << 2; /// The feature requires the block-axis containment. const CONTAINER_REQUIRES_BLOCK_AXIS = 1 << 3; /// The feature requires containment in the physical width axis. const CONTAINER_REQUIRES_WIDTH_AXIS = 1 << 4; /// The feature requires containment in the physical height axis. const CONTAINER_REQUIRES_HEIGHT_AXIS = 1 << 5; } }
mozversioncontrol.InvalidRepoPath: Unknown VCS, or not a source checkout: /build/firefox/src/firefox-104.0.1
File "/build/firefox/src/firefox-104.0.1/python/mozbuild/mozbuild/vendor/mach_commands.py", line 200, in vendor_rust ok = vendor_command.vendor(**kwargs) File "/build/firefox/src/firefox-104.0.1/python/mozbuild/mozbuild/vendor/vendor_rust.py", line 596, in vendor if not ignore_modified and self.has_modified_files(): File "/build/firefox/src/firefox-104.0.1/python/mozbuild/mozbuild/vendor/vendor_rust.py", line 198, in has_modified_files for f in self.repository.get_changed_files("M") File "/build/firefox/src/firefox-104.0.1/python/mozbuild/mozbuild/util.py", line 1081, in __get__ setattr(instance, name, self.func(instance)) File "/build/firefox/src/firefox-104.0.1/python/mozbuild/mozbuild/base.py", line 445, in repository return get_repository_object(self.topsrcdir) File "/build/firefox/src/firefox-104.0.1/python/mozversioncontrol/mozversioncontrol/__init__.py", line 700, in get_repository_object raise InvalidRepoPath(f"Unknown VCS, or not a source checkout: {path}")
# Only emit warnings for cargo-vet for now. env = os.environ.copy() env["PATH"] = os.pathsep.join( ( str(Path(cargo).parent), os.environ["PATH"], ) ) flags = ["--output-format=json"] if"MOZ_AUTOMATION"in os.environ: flags.append("--locked") flags.append("--frozen") res = cargo_vet( self, flags, stdout=subprocess.PIPE, env=env, ) if res.returncode: vet = json.loads(res.stdout) logged_error = False for failure in vet.get("failures", []): failure["crate"] = failure.pop("name") self.log( logging.ERROR, "cargo_vet_failed", failure, "Missing audit for {crate}:{version} (requires {missing_criteria})." " Run `./mach cargo vet` for more information.", ) logged_error = True # NOTE: This could log more information, but the violation JSON # output isn't super stable yet, so it's probably simpler to tell # the caller to run `./mach cargo vet` directly. for key in vet.get("violations", {}).keys(): self.log( logging.ERROR, "cargo_vet_failed", {"key": key}, "Violation conflict for {key}. Run `./mach cargo vet` for more information.", ) logged_error = True
我们可以看到 vet 是其实是将 res 的 stdout 编码为 python 对象。
res = cargo_vet() ,阅读前面的代码 from mozbuild.mach_commands import cargo_vet确定 cargo_vet 是由 mach_commands 引入的。
defcargo_vet(command_context, arguments, stdout=None, env=os.environ): from mozbuild.bootstrap import bootstrap_toolchain
# Logging of commands enables logging from `bootstrap_toolchain` that we # don't want to expose. Disable them temporarily. logger = logging.getLogger("gecko_taskgraph.generator") level = logger.getEffectiveLevel() logger.setLevel(logging.ERROR)