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 report warnings in migration when performing rewrites #15589

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

WojciechMazur
Copy link
Contributor

This PR stops reporting migration warnings when the given code snippet is also being rewritten. It fixes terrible development experience when combining -rewrite -source .*-migration with -Xfatal-warnings. In the mentioned case compilation would never succeed, since migration warnings elevated to errors, would always roll back generated rewrites.
Since the warning message is not being shown in all paths I've changed the function arguments to be passed by name

Sidenote:
I've spent literally too much time wondering why -rewrites do not work as they should. I belive that typical Scala users would have the same problems.

@bishabosha
Copy link
Member

Hi, sorry this took so long, please could you rebase

@He-Pin
Copy link

He-Pin commented Mar 27, 2023

@bishabosha I think you can rebase on GitHub?

@WojciechMazur WojciechMazur force-pushed the fix/no-warning-on-rewrite branch from 08eb076 to f8a7c5d Compare March 27, 2023 14:00
@bishabosha
Copy link
Member

is this worth backporting?

@bishabosha bishabosha removed their assignment Mar 28, 2023
@bishabosha bishabosha requested a review from odersky March 28, 2023 15:15
@bishabosha
Copy link
Member

@odersky just checking if you object to this

@WojciechMazur WojciechMazur added this to the 3.4.0 milestone Apr 11, 2023
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@odersky odersky merged commit 8948092 into scala:main Jun 26, 2023
@WojciechMazur WojciechMazur deleted the fix/no-warning-on-rewrite branch June 26, 2023 14:50
@julienrf julienrf modified the milestones: 3.4.0, 3.3.2 Jul 10, 2023
@Kordyjan Kordyjan modified the milestones: 3.3.2, 3.4.0 Aug 1, 2023
Kordyjan added a commit that referenced this pull request Dec 8, 2023
…" to LTS (#19043)

Backports #15589 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
@Kordyjan Kordyjan modified the milestones: 3.4.0, 3.3.2 Dec 14, 2023
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.

6 participants