Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build/fbcode_builder/getdeps/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ def _job_weight_mib(self) -> int:
# 1.5 GiB is a lot to assume, but it's typical of Facebook-style C++.
# Some manifests are even heavier and should override.
default_job_weight = 1536
# pyrefly: ignore [no-matching-overload]
return int(
self.manifest.get(
"build", "job_weight_mib", str(default_job_weight), ctx=self.ctx
Expand Down Expand Up @@ -1149,6 +1150,7 @@ def get_property(
# pyre-fixme[53]: Captured variable `cmake` is not annotated.
# pyre-fixme[53]: Captured variable `env` is not annotated.
def list_tests() -> list[dict[str, object]]:
# pyrefly: ignore [no-matching-overload]
output = subprocess.check_output(
[require_command(ctest, "ctest"), "--show-only=json-v1"],
env=env,
Expand Down Expand Up @@ -1233,6 +1235,7 @@ def list_tests() -> list[dict[str, object]]:
env.set("https_proxy", "")
runs = []

# pyrefly: ignore [unbound-name]
with start_run(env["FBSOURCE_HASH"]) as run_id:
testpilot_args = [
tpx,
Expand Down
1 change: 1 addition & 0 deletions build/fbcode_builder/getdeps/buildopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def compute_env_for_install_dirs(
# pyre-fixme[6]: For 2nd argument expected `str` but got
# `Optional[str]`.
os.environ["OPENSSL_ROOT_DIR"] = candidate
# pyrefly: ignore [unsupported-operation]
env["OPENSSL_ROOT_DIR"] = os.environ["OPENSSL_ROOT_DIR"]

if self.fbsource_dir:
Expand Down
5 changes: 4 additions & 1 deletion build/fbcode_builder/getdeps/cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def __init__(
# pyre-fixme[8]: Attribute has type `Optional[List[str]]`; used as
# `Union[None, List[str], str]`.
self.manifests_to_build: list[str] | None = (
manifests_to_build and manifests_to_build.split(",")
# pyrefly: ignore [bad-assignment]
manifests_to_build
and manifests_to_build.split(",")
)
self.loader: ManifestLoader = loader
self.cargo_config_file_subdir: str | None = cargo_config_file
Expand Down Expand Up @@ -405,6 +407,7 @@ def _resolve_dep_to_git(self) -> dict[str, dict[str, str]]:
if self.build_opts.is_windows():
# pyre-fixme[16]: Optional type has no attribute `replace`.
subpath = subpath.replace("/", "\\")
# pyrefly: ignore [no-matching-overload]
crate_path = os.path.join(dep_source_dir, subpath)
print(
f"{self.manifest.name}: Mapped crate {crate} to dep {dep} dir {crate_path}",
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/getdeps/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ def update(self) -> ChangeStatus:

def hash(self) -> str:
if self.packages_are_installed():
# pyrefly: ignore [bad-argument-type]
return hashlib.sha256(self.installed).hexdigest()
else:
return "0" * 40
Expand Down Expand Up @@ -913,6 +914,7 @@ class Progress:

def write_update(self, total: int, amount: int) -> None:
if total == -1:
# pyrefly: ignore [bad-assignment]
total = "(Unknown)"

if sys.stdout.isatty():
Expand All @@ -929,6 +931,7 @@ def write_update(self, total: int, amount: int) -> None:
def progress_pycurl(
self, total: float, amount: float, _uploadtotal: float, _uploadamount: float
) -> None:
# pyrefly: ignore [bad-argument-type]
self.write_update(total, amount)

progress = Progress()
Expand Down
Loading