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

Fixes #22723: Backport scala 2.13 change for scala 3.0 migration #4783

Conversation

fanf
Copy link
Member

@fanf fanf commented May 3, 2023

https://issues.rudder.io/issues/22723

Backport all changes compatible with scala 2.13. Commit 31d64d9 compensate for the drift since the PR was opened + for some changes that would require scala 3 or became unnecessary for now (moving PropertyParser in its own module for example).

The changes are mainly:

  • a lot of added type ascription, added () and .apply
  • removing all final in front of case object and object
  • changing use of silencer by now builtin nowarn (and so com.github.ghik.silencer.silent by scala.annotation.nowarn)
  • changing the scala 3 deprecated syntax for renaming self into a method call, e.g:
object RULES extends OU("Rules", BASE_DN) {
    rules =>
    private[this] def rules = this
...
  • some xml magic concatenation syntax now illicit
  • changing lift json implicit val formats = Serialization.formats(NoTypeHints) into implicit val formats = DefaultFormats
  • avoiding having two different method having the same name (for ex: get / getIO in ConfigService)
  • adding case in for loop when we extract a case class, typically case JString(ruleId) <- childs

Nothing seems to change code semantic anywhere (but welcomong a second pair of eyes).
If it's really the case, we should make the change in the oldest branch we support to avoid merge horror stories after that.

@fanf fanf requested a review from VinceMacBuche May 3, 2023 19:34
@fanf fanf marked this pull request as draft May 3, 2023 19:35
@fanf
Copy link
Member Author

fanf commented May 3, 2023

PR updated with a new commit

1 similar comment
@fanf
Copy link
Member Author

fanf commented May 3, 2023

PR updated with a new commit

@fanf fanf force-pushed the arch_22723/backport_scala_2_13_change_for_scala_3_0_migration branch from 8af31bb to 382a938 Compare May 4, 2023 20:10
@fanf
Copy link
Member Author

fanf commented May 4, 2023

Superseeded by #4789

@fanf fanf closed this May 4, 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
2 participants