28
28
import subprocess
29
29
import sys
30
30
import time
31
+ from functools import partial
31
32
from glob import glob
32
33
from typing import Callable
33
34
@@ -262,6 +263,7 @@ def denied_sdk_deps(results: list[Result]) -> None:
262
263
# They are ordered from "big to small" to make sure the bigger leaks are caught & reported first.
263
264
# (e.g. `re_viewer` depends on `rfd` which is also disallowed, but if re_viewer is leaking, only report `re_viewer`)
264
265
disallowed_dependencies = [
266
+ "eframe" ,
265
267
"re_viewer" ,
266
268
"wgpu" ,
267
269
"egui" ,
@@ -272,27 +274,28 @@ def denied_sdk_deps(results: list[Result]) -> None:
272
274
"wayland-sys" , # Linux windowing.
273
275
]
274
276
275
- def check_sdk_tree_with_default_features (tree_output : str ) -> str | None :
277
+ def check_sdk_tree_with_default_features (tree_output : str , features : str ) -> str | None :
276
278
for disallowed_dependency in disallowed_dependencies :
277
279
if disallowed_dependency in tree_output :
278
280
return (
279
- f"{ disallowed_dependency } showed up in the SDK's dependency tree when building with default features. "
280
- "This dependency should only ever show up if the `run ` feature is enabled. "
281
+ f"{ disallowed_dependency } showed up in the SDK's dependency tree when building with features= { features } "
282
+ "This dependency should only ever show up if the `native_viewer ` feature is enabled. "
281
283
f"Full dependency tree:\n { tree_output } "
282
284
)
283
285
284
286
return None
285
287
286
- for target in deny_targets :
287
- result = run_cargo (
288
- "tree" ,
289
- # -f '{lib}' is used here because otherwise cargo tree would print links to repositories of patched crates
290
- # which would cause false positives e.g. when checking for egui.
291
- f"-p rerun --target { target } -f '{{lib}}'" ,
292
- output_checks = check_sdk_tree_with_default_features ,
293
- )
294
- result .command = f"Check dependencies in `{ result .command } `"
295
- results .append (result )
288
+ for features in ["default" , "default,auth,oss_server,perf_telemetry,web_viewer" ]:
289
+ for target in deny_targets :
290
+ result = run_cargo (
291
+ "tree" ,
292
+ # -f '{lib}' is used here because otherwise cargo tree would print links to repositories of patched crates
293
+ # which would cause false positives e.g. when checking for egui.
294
+ f"-p rerun --target { target } -f '{{lib}}' -F { features } " ,
295
+ output_checks = partial (check_sdk_tree_with_default_features , features = features ),
296
+ )
297
+ result .command = f"Check dependencies in `{ result .command } `"
298
+ results .append (result )
296
299
297
300
298
301
def wasm (results : list [Result ]) -> None :
0 commit comments