toolchains: Expose raw JSON representation of a toolchain (#20721)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-11-21 13:27:25 +01:00 committed by GitHub
parent 6ab4b46984
commit 75c545aa1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 38 additions and 19 deletions

View file

@ -591,8 +591,9 @@ impl ToolchainLister for PythonToolchainProvider {
.into();
Some(Toolchain {
name,
path: toolchain.executable?.to_str()?.to_owned().into(),
path: toolchain.executable.as_ref()?.to_str()?.to_owned().into(),
language_name: LanguageName::new("Python"),
as_json: serde_json::to_value(toolchain).ok()?,
})
})
.collect();