Conversation
Summary of ChangesHello @wolfv, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Conda backend to correctly handle the installation of Python noarch packages. Previously, attempts to install such packages would fail due to missing Python environment information. The changes introduce mechanisms to identify the Python version and site-packages directory from the transaction's solved records or package basenames, ensuring that noarch Python packages can be linked properly within the Conda environment. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Greptile SummaryFixes installation of noarch Python packages (like
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 4992fa4 |
There was a problem hiding this comment.
Code Review
This pull request correctly addresses an issue with installing noarch Python packages with the Conda backend by providing PythonInfo to rattler. The implementation introduces helper functions to extract this information from both solved records and package basenames, covering fresh and locked installs. The changes are well-structured and logical. I have one minor suggestion to make the code slightly more idiomatic.
| let id = ArchiveIdentifier::from_str(b).ok()?; | ||
| if id.name != "python" { | ||
| return None; | ||
| } | ||
| let version = Version::from_str(&id.version).ok()?; | ||
| PythonInfo::from_version(&version, None, platform).ok() |
There was a problem hiding this comment.
The body of this closure can be made slightly more concise and idiomatic by chaining the last two fallible operations with and_then.
let id = ArchiveIdentifier::from_str(b).ok()?;
if id.name != "python" {
return None;
}
Version::from_str(&id.version)
.ok()
.and_then(|version| PythonInfo::from_version(&version, None, platform).ok())### 🐛 Bug Fixes - **(exec)** respect PATH order for virtualenv resolution in mise x by @jdx in [#8342](#8342) - **(task)** revert process group changes that cause hangs with nested mise tasks by @jdx in [#8347](#8347) - **(task)** resolve vars from subdirectory configs for monorepo tasks by @jdx in [#8343](#8343) - **(task)** resolve dependencies before prepare to fix monorepo glob deps by @jdx in [#8353](#8353) - python noarch with Conda backend by @wolfv in [#8349](#8349) ### New Contributors - @wolfv made their first contribution in [#8349](#8349) ## 📦 Aqua Registry Updates #### New Packages (3) - [`alexhallam/tv`](https://github.com/alexhallam/tv) - [`arcanist-sh/hx`](https://github.com/arcanist-sh/hx) - [`dathere/qsv`](https://github.com/dathere/qsv) #### Updated Packages (3) - [`astral-sh/ruff`](https://github.com/astral-sh/ruff) - [`caarlos0/fork-cleaner`](https://github.com/caarlos0/fork-cleaner) - [`rhysd/actionlint`](https://github.com/rhysd/actionlint)
A little tweak to get Python noarch pacakges to install properly - we need the `python` version from the transaction to know the proper site-packages directory ... some internal stuff basically. Should make ``` mise use -g conda:ruff ``` work properly. Example currently fails with ``` mise ERROR Failed to install conda:ruff@latest: failed to link /Users/wolfv/.local/share/mise/conda-packages/ruff-0.15.2-h279115b_0.conda: cannot install noarch python package because there is no python version specified ```
### 🐛 Bug Fixes - **(exec)** respect PATH order for virtualenv resolution in mise x by @jdx in [jdx#8342](jdx#8342) - **(task)** revert process group changes that cause hangs with nested mise tasks by @jdx in [jdx#8347](jdx#8347) - **(task)** resolve vars from subdirectory configs for monorepo tasks by @jdx in [jdx#8343](jdx#8343) - **(task)** resolve dependencies before prepare to fix monorepo glob deps by @jdx in [jdx#8353](jdx#8353) - python noarch with Conda backend by @wolfv in [jdx#8349](jdx#8349) ### New Contributors - @wolfv made their first contribution in [jdx#8349](jdx#8349) ## 📦 Aqua Registry Updates #### New Packages (3) - [`alexhallam/tv`](https://github.com/alexhallam/tv) - [`arcanist-sh/hx`](https://github.com/arcanist-sh/hx) - [`dathere/qsv`](https://github.com/dathere/qsv) #### Updated Packages (3) - [`astral-sh/ruff`](https://github.com/astral-sh/ruff) - [`caarlos0/fork-cleaner`](https://github.com/caarlos0/fork-cleaner) - [`rhysd/actionlint`](https://github.com/rhysd/actionlint)
A little tweak to get Python noarch pacakges to install properly - we need the
pythonversion from the transaction to know the proper site-packages directory ... some internal stuff basically.Should make
work properly. Example currently fails with