Architecture #22723
closedBackport scala 2.13 change for scala 3.0 migration
Description
We need to backport changes compatible with scala 2.13 from that PR: https://github.com/Normation/rudder/pull/4603
It seems that we can backport:
Remove more warnings - use case when narrowing to JField type in for-…
…comprehenison. It would introduce withFilter calls allowing for safer parsing. Seems very simple and low risk (adding case in for loop) 2.13 https://github.com/Normation/rudder/pull/4603/commits/00eeb1fb2fd5f4718ae2cdcd35eb9530fac05be0
Remove more warnings - explicit .apply method calls Seems very simple and low risk (adding case in for loop) 2.13 https://github.com/Normation/rudder/pull/4603/commits/7bc1b1ac4bdc52128b30f154c099b7b647dbe640
Limit warnings - replace remove final modifier from objects Seems very simple and low risk (adding case in for loop) 2.13 https://github.com/Normation/rudder/pull/4603/commits/665780033793b410da7a9635f6300093069561d8
Fix version or wartremover we could remove wartremover completly 2.13 https://github.com/Normation/rudder/pull/4603/commits/b7aab817c0b09cdd67df8418952add71a2e6ffa1
Comment out strane not compiling test ⚠️look at that ? 2.13 https://github.com/Normation/rudder/pull/4603/commits/a5e7500d9246c9d20326cd5643d896451b90c4f2
Comment out XML comments due to regression in parser of Scala3 comments can be removed 2.13 https://github.com/Normation/rudder/pull/4603/commits/8a63484cb885884c412408323fcd96680e577665
Use DefaultFormsts instead of Serialization.formats(NoTypeHints) due …
…to Scala bug lampepfl/dotty#16443 ⚠️check what it means for the resulting JSON, test on 2.13.Perhaps need to rewrite these parts with `zio-json` 2.13 https://github.com/Normation/rudder/pull/4603/commits/1e1a14cf246bd1b59334716a6c05936fb3969bbf
Move testing rudder-parsers to rudder-core due to problems with depen…
…dencies 🆗 2.13 https://github.com/Normation/rudder/pull/4603/commits/5003bd4619577c47eebab921f62961d504420354
Replace silencer plugin with scala.annotation.nowarn We should do it in 2.13 2.13 https://github.com/Normation/rudder/pull/4603/commits/4b6c17a558ddcb172c7874eefd60bce6c3c9be53
Fix problems with implicit conversions in ConfigService 🆗 2.13 https://github.com/Normation/rudder/pull/4603/commits/d20764c038029ce7854cb13f986910f72ff7f7fd
Disable always failing assertion ⚠️What ? Need to be investigated 2.13 https://github.com/Normation/rudder/pull/4603/commits/263fb0c6ee4ea0e69e5c2765268f59b69a58bb14
Workaround dropped Scala feature: General Type Projection https://dot…
…ty.epfl.ch/docs/reference/dropped-features/type-projection.html Seems that we can do that in 2.13 2.13 https://github.com/Normation/rudder/pull/4603/commits/ee2e28f40427f1f4bc124883f36fc4cdd90f914c
Mittigate some of the known Dotty bugs Seems that we can do that in 2.13 2.13 https://github.com/Normation/rudder/pull/4603/commits/b706c21fc19fd2536aaf2ec3c360e426ddc1c992
Remove implicit conversion introduced by lift-json: String ++ String was converted into JArray(List(_, _)) 😱 2.13 https://github.com/Normation/rudder/pull/4603/commits/a7c92f06edd5b02f240edcb95e06135a46dda429
Fix Scala XML source incompatibilities the gift that keeps giving 2.13 https://github.com/Normation/rudder/pull/4603/commits/02575dfa8bc9fc5abca7b9e525c45308fe39c97c
Allow to compile ldap modules with Scala3 It seems that most of that can go in 2.13 2.13 https://github.com/Normation/rudder/pull/4603/commits/f7531ea9903c3af42c983f8054c92fd69ad58c65
Allow to compile utils with Scala 3 2.13 https://github.com/Normation/rudder/pull/4603/commits/8959e0e4782ec7e250a99fce500c11d2b96f8e50