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

Check for duplicate plugin #246

Closed
daywalker90 opened this issue Feb 26, 2024 · 3 comments · Fixed by #250
Closed

Check for duplicate plugin #246

daywalker90 opened this issue Feb 26, 2024 · 3 comments · Fixed by #250
Labels
🐛 - bug Something isn't working
Milestone

Comments

@daywalker90
Copy link
Collaborator

I ran into an issue where i had the same plugin listed 3 times under coffee list. Since we internally use Vec to store these there is no check for duplicates on a Vec.push. We could switch to something like HashMap<String, Plugin> and use the name as the key or on every Vec.push we check if a plugin with that name already exists to prevent cases like this. I'd be willing to make these changes.

Thoughts?

@daywalker90 daywalker90 changed the title Use HashMap instead of Vec for plugins Check for duplicate plugin Feb 26, 2024
@vincenzopalazzo vincenzopalazzo added the 🐛 - bug Something isn't working label Feb 26, 2024
@vincenzopalazzo
Copy link
Contributor

I was discussing this with @tareknaser I remember also that he provide a patch for it but Idk why this bug is still present

Can you take a look at it @tareknaser ?

@vincenzopalazzo vincenzopalazzo added this to the 0.1-rc1 milestone Feb 26, 2024
@tareknaser
Copy link
Collaborator

I remember also that he provide a patch for it but Idk why this bug is still present

I think you mean #115 but this was for duplicate repositories. I don't recall discussing this issue for plugins.

@vincenzopalazzo
Copy link
Contributor

Ok you are right @tareknaser

This should fix the problem #250

@tareknaser Can you write a test to make sure that my code works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 - bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants