Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9119af7
fix(install): preview an SDK install without preparing Python
jussielo-amd Nov 5, 2026
e8a2922
fix(install): refuse a dry run for a managed Python the install would…
jussielo-amd Nov 5, 2026
1936bce
test(e2e): give runtime-22 and runtime-23 a cache folder of their own
jussielo-amd Nov 5, 2026
2b1fd04
fix(install): read every spelling of a managed Python version in a dr…
jussielo-amd Nov 5, 2026
794081a
test(e2e): present the uv log, not the cache folder, as runtime-22's …
jussielo-amd Nov 5, 2026
56179c6
Merge origin/main into fix-install-sdk-dry-run-without-side-effects
jussielo-amd Nov 5, 2026
87ea1ce
Merge origin/main into fix-install-sdk-dry-run-without-side-effects
jussielo-amd Nov 5, 2026
f342fce
Merge origin/main into fix-install-sdk-dry-run-without-side-effects
jussielo-amd Nov 5, 2026
1177a6b
fix(install): print a dry run's Python prediction only after the deci…
jussielo-amd Nov 5, 2026
72551d7
docs: limit the dry run's no-uv guarantee to the canonical layout
jussielo-amd Nov 5, 2026
4ef1703
docs(install): make python_tag_for_version's comment match what it reads
jussielo-amd Nov 6, 2026
148f9fb
refactor(install): word a preview's unchecked-tag caveat in one place
jussielo-amd Nov 6, 2026
c5ea04f
refactor(install): name a Python launcher's source with an enum
jussielo-amd Nov 6, 2026
41f30a1
refactor(install): let the Python resolver's environment carry the ma…
jussielo-amd Nov 6, 2026
8f93821
test(install): run the preview's Python decision on every platform
jussielo-amd Nov 6, 2026
869b8cb
refactor(install): name whether a preview could check a Python's whee…
jussielo-amd Nov 6, 2026
93c6908
test(install): pin the wording of the unusable-Python findings for an…
jussielo-amd Nov 6, 2026
6176347
refactor(install): print the unusable-Python findings from one place
jussielo-amd Nov 6, 2026
afbb38c
docs: say which lane covers the Windows preview and that the previewe…
jussielo-amd Nov 6, 2026
fc2fa6e
docs: wrap two over-long lines in the install sdk dry-run notes
jussielo-amd Nov 6, 2026
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
59 changes: 27 additions & 32 deletions apps/rocm/src/therock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ pub(crate) use self::probe::{
};
use self::process::{extract_tarball_and_discard_archive, progress_line, run_uv_progress_command};
use self::python::{
ensure_uv_venv, managed_python_version, python_requirement, resolve_python_launcher,
wheel_compatibility_for_python,
ensure_uv_venv, managed_python_version, python_for_install, python_requirement,
};
use self::resolve::{
AggregateDeviceTarget, canonical_auto_select_needs_next_python, resolve_pip_runtime,
Expand Down Expand Up @@ -363,30 +362,24 @@ fn install_wheel_runtime(
}
}
};
progress_line(format!(
"Checking Python for the ROCm install; if needed, ROCm CLI will prepare Python {}.",
managed_python_version(python_requirement)
));
let python_launcher = resolve_python_launcher(paths, python_requirement)?;
progress_line(match python_launcher.source {
"path" => format!(
"Using Python from PATH: {}.",
python_launcher.executable.display()
),
"env" => format!(
"Using Python from ROCM_CLI_PYTHON: {}.",
python_launcher.executable.display()
),
"managed" => format!(
"Using ROCm CLI's portable Python: {}.",
python_launcher.executable.display()
),
_ => format!(
"Using Python from {}.",
python_launcher.executable.display()
),
// A preview promises nothing here: whether a Python would be prepared, and
// which, is only known once the search below has run (a version override can
// make the answer a refusal), and is reported then.
progress_line(if dry_run {
"Checking Python for the ROCm install.".to_owned()
} else {
format!(
"Checking Python for the ROCm install; if needed, ROCm CLI will prepare Python {}.",
managed_python_version(python_requirement)
)
});
let wheel_compatibility = wheel_compatibility_for_python(&python_launcher.executable)?;
// A preview must not prepare the Python it reports: resolving one can
// download a managed `uv` and Python and save the result in the
// configuration. It asks what a real install would do instead and prints
// that. A real install resolves, and so prepares, exactly as it always did.
// It also prints the line naming the interpreter, once the decision is made.
let python = python_for_install(paths, python_requirement, dry_run)?;
let wheel_compatibility = python.wheel_compatibility()?;
progress_line(format!(
"Checking TheRock {} packages for this AMD GPU...",
channel.as_str()
Expand Down Expand Up @@ -478,12 +471,11 @@ fn install_wheel_runtime(
);
let _ = writeln!(output, " target: {}", install_root.display());
let _ = writeln!(output, " runtime_key: {runtime_key}");
let _ = writeln!(
output,
" python_launcher: {}",
python_launcher.executable.display()
);
let _ = writeln!(output, " python_source: {}", python_launcher.source);
let _ = writeln!(output, " python_launcher: {}", python.launcher_display());
let _ = writeln!(output, " python_source: {}", python.source().as_str());
if let Some(note) = python.note() {
let _ = writeln!(output, " python_note: {note}");
}
let _ = writeln!(
output,
" python_wheel_tag: {}",
Expand Down Expand Up @@ -538,7 +530,7 @@ fn install_wheel_runtime(
install_args.extend(["--prerelease".to_owned(), "allow".to_owned()]);
}
install_args.extend(wheel_composition.package_specs.iter().cloned());
let venv_args = uv_venv_args(&python_launcher.executable, &install_root);
let venv_args = uv_venv_args(&python.venv_python_arg(), &install_root);
// This line is offered as the command to run, so it has to be one a
// shell reads back as the argv it previews. The install root in it
// comes from a `--prefix` the local assistant can choose
Expand Down Expand Up @@ -568,6 +560,9 @@ fn install_wheel_runtime(
return Ok(SdkInstallResult::plan(output));
}

// Only a preview returns above with an interpreter it has not prepared.
let python_launcher = python.into_launcher()?;

// Requirement: surface the "newest version has no wheels" case as a warning
// on the real install path too, not only in the dry-run plan.
if let Some(warning) = no_wheel_warning.as_deref() {
Expand Down
Loading
Loading