Skip to content

fix: ls --all-sources shows duplicate entries#8042

Merged
jdx merged 1 commit intojdx:mainfrom
roele:fix/8040
Feb 7, 2026
Merged

fix: ls --all-sources shows duplicate entries#8042
jdx merged 1 commit intojdx:mainfrom
roele:fix/8040

Conversation

@roele
Copy link
Contributor

@roele roele commented Feb 7, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 7, 2026 13:05
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @roele, 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 addresses a bug in the ls --all-sources command where it would display duplicate package entries. The change introduces a filter to ensure that each package is listed only once, providing a more accurate and user-friendly output for users querying all available package sources.

Highlights

  • Duplicate Entry Fix: Implemented a unique_by filter in the ls command's package listing logic to prevent identical entries from appearing when the --all-sources flag is used.
Changelog
  • src/cli/ls.rs
    • Added a unique_by method call to the package iteration chain to filter out duplicate entries based on package ID and version, resolving the issue of redundant listings with --all-sources.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes an issue where mise ls --all-sources could show duplicate entries by adding a .unique_by() call to the iterator chain. The fix is correct. I've suggested a small performance improvement to the unique_by closure to avoid unnecessary string allocations.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes duplicate tool/version rows in mise ls --all-sources output by deduplicating entries generated from multiple tracked config sources.

Changes:

  • Deduplicate list_current_versions() results in the --all-sources path using an itertools::unique_by key.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jdx jdx merged commit 0fab7d5 into jdx:main Feb 7, 2026
33 checks passed
@roele roele deleted the fix/8040 branch February 7, 2026 16:02
mise-en-dev added a commit that referenced this pull request Feb 8, 2026
### 🚀 Features

- **(shim)** add native .exe shim mode for Windows by @jdx in
[#8045](#8045)

### 🐛 Bug Fixes

- **(install)** preserve config options and registry defaults by @jdx in
[#8044](#8044)
- **(link)** linked versions override lockfile during resolution by @jdx
in [#8050](#8050)
- **(release)** preserve aqua-registry sections in changelog across
releases by @jdx in [#8047](#8047)
- ls --all-sources shows duplicate entries by @roele in
[#8042](#8042)

### 📚 Documentation

- replace "inherit" terminology with config layering by @jdx in
[#8046](#8046)

### 📦 Registry

- switch oxlint to npm backend by default by @risu729 in
[#8038](#8038)
- add orval (npm:orval) by @zdunecki in
[#8051](#8051)

### New Contributors

- @zdunecki made their first contribution in
[#8051](#8051)
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
Co-authored-by: mise-en-dev <release@mise.jdx.dev>
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
### 🚀 Features

- **(shim)** add native .exe shim mode for Windows by @jdx in
[jdx#8045](jdx#8045)

### 🐛 Bug Fixes

- **(install)** preserve config options and registry defaults by @jdx in
[jdx#8044](jdx#8044)
- **(link)** linked versions override lockfile during resolution by @jdx
in [jdx#8050](jdx#8050)
- **(release)** preserve aqua-registry sections in changelog across
releases by @jdx in [jdx#8047](jdx#8047)
- ls --all-sources shows duplicate entries by @roele in
[jdx#8042](jdx#8042)

### 📚 Documentation

- replace "inherit" terminology with config layering by @jdx in
[jdx#8046](jdx#8046)

### 📦 Registry

- switch oxlint to npm backend by default by @risu729 in
[jdx#8038](jdx#8038)
- add orval (npm:orval) by @zdunecki in
[jdx#8051](jdx#8051)

### New Contributors

- @zdunecki made their first contribution in
[jdx#8051](jdx#8051)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants