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

refactor: improve Given search preference warning #22189

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

eed3si9n
Copy link
Member

Fixes #22153
Ref https://scala-lang.org/2024/08/19/given-priority-change-3.7.html

Problem

It wasn't clear what action users was suppose to take to suppress the new-from-3.6 Given search preference warning.

Solution

  1. This refactors the code to give the warning an error code E205.
  2. In case of warnings, tell the user to choose -source 3.5 vs 3.7, or use nowarn annotation.

**Problem**
It wasn't clear what action users was suppose to take to suppress
the new-from-3.6 Given search preference warning.

**Solution**
1. This refactors the code to give the warning an error code E205.
2. In case of warnings, tell the user to choose -source 3.5 vs 3.7,
   or use nowarn annotation.
Copy link
Member

@OndrejSpanel OndrejSpanel left a comment

Choose a reason for hiding this comment

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

I agree. Make the warning describe what action is to be taken to make it actionable.

Copy link
Member

@noti0na1 noti0na1 left a comment

Choose a reason for hiding this comment

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

LGTM

@noti0na1 noti0na1 merged commit 7573951 into scala:main Dec 13, 2024
29 checks passed
@eed3si9n eed3si9n deleted the wip/given-search-preference branch December 13, 2024 16:21
@tgodzik tgodzik added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Dec 16, 2024
@tgodzik tgodzik added this to the 3.6.3 milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unactionable warning: "Given search preference for ... will change."
4 participants