From 0c913a2b5cc5bbfb14b43d7b7bb1c156a3faab93 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Sat, 14 Nov 2026 17:10:41 +0100 Subject: [PATCH] explicit_imports.py: BASE_CONFIG for the residual step Co-Authored-By: Claude Sonnet 5.5 --- scripts/dev/explicit_imports.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/dev/explicit_imports.py b/scripts/dev/explicit_imports.py index ea466c52..ac111e55 100644 --- a/scripts/dev/explicit_imports.py +++ b/scripts/dev/explicit_imports.py @@ -739,7 +739,7 @@ def check_round(wt, package, configs): errors = collections.defaultdict(set) a_flags, b_flags = [], [] for i, feat in enumerate(configs): - base = f"-p {package}" + (" --all-features" if feat else "") + base = f"-p {package} {feat}" if isinstance(feat, str) else f"-p {package}" + (" --all-features" if feat else "") a = run_cargo(wt, f"{base} --lib --bins", f"a{i}.json") b = run_cargo(wt, f"{base} --tests", f"b{i}.json") for ms in (a, b): @@ -885,7 +885,8 @@ def main(): if not changed: break if features: - default_errors, a_default, b_default = check_round(wt, package, [False]) + # the smallest feature set that builds (BASE_CONFIG, for example `--features cuda-driver`), else the default one + default_errors, a_default, b_default = check_round(wt, package, [os.environ.get("BASE_CONFIG") or False]) if default_errors: print("WARNING: errors in the default feature set:", dict(list(default_errors.items())[:5]), flush=True) moved = 0