You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Collapse the bare/_at/_read three-entry-point split in openmpi.rs and driver_install.rs #690
#675 added an OsRelease-aware _read seam (plan_for_os_release_read, install_hint_for_read, build_driver_install_plan_read) alongside the existing bare-text and _at functions in crates/rocm-core/src/openmpi.rs and apps/rocm/src/driver_install.rs, so call sites that actually read the file (which may have come from the /usr/lib/os-release fallback) can name the real path in any error message.
That left three entry points per builder: a bare-text function (test-only), an _at function (path-aware), and a _read function (OsRelease-aware). openmpi::plan_for_os_release — the one non-test pub fn among these with no production caller — was dead and has been deleted in #675. install_hint_for and build_driver_install_plan remain as bare-text, #[cfg(test)]-only helpers.
Proposal
Now that tests can construct OsRelease::found(text) directly and call the _read seam, install_hint_for and build_driver_install_plan are redundant with it — tests could call install_hint_for_read/build_driver_install_plan_read instead and drop the bare-text middle layer entirely.
This wasn't done as part of #675 because the blast radius is large and unrelated to that PR's actual fix: a workspace grep found 34 call sites for build_driver_install_plan (all in driver_install.rs's test module, almost all exercising unrelated behavior — privilege escalation, WSL plans, AMDGPU version overrides, quote-style parsing — that merely need some os-release text as input) and 13 for install_hint_for. Rewriting all ~47 to construct OsRelease::found(text) wrappers is mechanical but inflates whatever PR does it several-fold for a purely cosmetic change, so it's better scoped as its own standalone cleanup.
Scope
Migrate the ~47 test call sites of build_driver_install_plan/install_hint_for to build_driver_install_plan_read/install_hint_for_read with OsRelease::found(text).
Delete the bare build_driver_install_plan/install_hint_for functions.
Keep the _at functions — they remain the real internal implementation detail both _read and (if any) remaining path-aware callers route through.
No behavior change; this is a pure test/internal-API cleanup.
Noted by @rominf in review on #675 (non-blocking "decision for the author").
Activity
chore(driver_install, openmpi): collapse the bare/_at/_read entry-poi…
Collapse the bare/_at/_read three-entry-point split in openmpi.rs and…