Skip to content

Commit caa8685

Browse files
committed
Add debug info to _build_nodejs
1 parent 3637f91 commit caa8685

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tasks.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
dist_dir = ROOT_DIR / "dist"
3636
build_dir = ROOT_DIR / "build"
3737
BROWSER_BATTERIES_DIR = ROOT_DIR / "browser_batteries"
38-
NODE_BINARY_PATH = BROWSER_BATTERIES_DIR / "BrowserBatteries" / "bin"
38+
BROWSER_BATTERIES_BIN_DIR = BROWSER_BATTERIES_DIR / "BrowserBatteries" / "bin"
3939
proto_sources = (ROOT_DIR / "protobuf").glob("*.proto")
4040
PYTHON_SRC_DIR = ROOT_DIR / "Browser"
4141
python_protobuf_dir = PYTHON_SRC_DIR / "generated"
@@ -135,7 +135,7 @@ def clean(c):
135135
ZIP_DIR,
136136
Path("./.mypy_cache"),
137137
PYTHON_SRC_DIR / "wrapper",
138-
NODE_BINARY_PATH,
138+
BROWSER_BATTERIES_BIN_DIR,
139139
BROWSER_BATTERIES_DIR / "dist",
140140
]:
141141
if target.exists():
@@ -247,11 +247,11 @@ def _os_platform() -> str:
247247

248248
def _build_nodejs(c: Context, architecture: str):
249249
"""Build NodeJS binary for GRPC server."""
250-
print(f"Build NodeJS binary to '{NODE_BINARY_PATH}'.")
250+
print(f"Build NodeJS binary to '{BROWSER_BATTERIES_BIN_DIR}'.")
251251
_copy_package_files()
252252
target = f"node22-{_os_platform()}-{architecture}"
253253
print(f"Target: {target}")
254-
grpc_server = NODE_BINARY_PATH.joinpath("grpc_server")
254+
grpc_server = BROWSER_BATTERIES_BIN_DIR.joinpath("grpc_server")
255255
cmd = [
256256
"node",
257257
"node_modules/@yao-pkg/pkg/lib-es5/bin.js",
@@ -263,6 +263,8 @@ def _build_nodejs(c: Context, architecture: str):
263263
".",
264264
]
265265
c.run(" ".join(cmd))
266+
for file in BROWSER_BATTERIES_DIR.glob("**/*"):
267+
print(f"Found file: {file}")
266268
if grpc_server.exists():
267269
print(f"GRPC server binary created at '{grpc_server}'.")
268270
else:

0 commit comments

Comments
 (0)