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

bugfix: Don't deduplicate all options when using Metals #2104

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Jul 6, 2023

PReviously, we would use .distinct on all project scalac options which would remove values for different options if the happened to be the same. Now, we only deduplicate semanticdb options.

Fixes scalameta/metals#5400

PReviously, we would use `.distinct` on all project scalac options which would remove values for different options if the happened to be the same. Now, we only deduplicate semanticdb options.

Fixes scalameta/metals#5400
Copy link
Member

@ckipp01 ckipp01 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 and this seems to be safer, although it makes me wish there was an easier way to actually detect duplicates. However I know it's hard since some will be -key:value and others key, value so detecting which shape they are isn't easy. Will bloop emit a bunch of warnings in situations where options are duplicated now though?

Either way, LGTM

@tgodzik
Copy link
Contributor Author

tgodzik commented Jul 6, 2023

Makes sense and this seems to be safer, although it makes me wish there was an easier way to actually detect duplicates. However I know it's hard since some will be -key:value and others key, value so detecting which shape they are isn't easy. Will bloop emit a bunch of warnings in situations where options are duplicated now though?

Either way, LGTM

We should not get any duplicates really, the only ones we could have are the ones from adding semanticdb, which are handled here.

@tgodzik
Copy link
Contributor Author

tgodzik commented Jul 6, 2023

Anyway, one of the changes test was testing that, but the logic was reworked so the exact order changed.

@tgodzik tgodzik merged commit b870185 into scalacenter:main Jul 6, 2023
17 checks passed
@tgodzik tgodzik deleted the fix-dedup branch July 6, 2023 13:02
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.

Diagnostics no longer appearing/updating
2 participants