Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't match partial chipname if we have an exact one #2121

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

9names
Copy link
Contributor

@9names 9names commented Jan 31, 2024

#1671 removed checking if we had an exact match for chip name before looking for partial chip names.
This broke all chips that are a substring of another chip.
It also removed a check for multiple exact matches, but I think that case is probably impossible as long as the registry doesn't have any duplicates.

Example:

$ probe-rs read b32 0x0 1 --chip Cortex-M3
Error: The chip 'Cortex-M3' was not found in the database.

Caused by:
    Found multiple chips matching 'Cortex-M3', unable to select a single chip. (Cortex-M33, Cortex-M35P)

This doesn't need a changelog entry IMO.

@bugadani
Copy link
Contributor

Hmm while the change isn't huge, I think this does deserve a changelog entry - it's fixing something that users may have encountered already.

Copy link
Contributor

@bugadani bugadani left a comment

Choose a reason for hiding this comment

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

Thanks! Looks like the code around these parts could be cleaned up a bit, but that's out of scope.

@bugadani bugadani added this pull request to the merge queue Feb 1, 2024
Merged via the queue into probe-rs:master with commit 216771e Feb 1, 2024
18 checks passed
@9names 9names deleted the allow_exact_chipname branch February 1, 2024 12:33
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.

2 participants