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

Return sorted sets (follow-up to #7198) #7314

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

odisseus
Copy link
Contributor

@odisseus odisseus commented Feb 12, 2025

Checklist

  • I have filed an issue about this change and discussed potential changes with the maintainers.
  • I have received the approval from the maintainers to make this change.
  • This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.

Discussion thread for this change

Issue number: #7198

Description of this change

Immutability of collections that we return is an important part of the contract.

@github-actions github-actions bot added product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels Feb 12, 2025
@LeFrosch
Copy link
Collaborator

If I remember correctly, it was a set before. Do we introduce duplicates by moving from a set to a list? Maybe keep it a set if we don't want duplicates.

But overall, I think it is a good idea going back to immutable here.

@odisseus
Copy link
Contributor Author

The chance from Set to List was introduced in #7198. I think the idea was that the collection of targets should be ordered, and that well-known kinds should have precedence.

Copy link
Collaborator

@LeFrosch LeFrosch left a comment

Choose a reason for hiding this comment

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

Makes sense. Let's keep it as a list for now.

@LeFrosch
Copy link
Collaborator

LeFrosch commented Feb 12, 2025

Not sure, in this case we might be able to drop the sort call too? Nvm, apparently I cannot read diffs.

@odisseus odisseus changed the title Return immutable lists (follow-up to #7198) Return sorted sets (follow-up to #7198) Feb 12, 2025
@LeFrosch LeFrosch merged commit 759a3b0 into bazelbuild:master Feb 14, 2025
5 checks passed
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Feb 14, 2025
@odisseus odisseus deleted the issue-7196-2 branch February 14, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin
Projects
Development

Successfully merging this pull request may close these issues.

5 participants