Project

General

Profile

Actions

Architecture #25014

open

Architecture #24814: Scala 3 migration

Switch rudder-core to scala 3

Added by François ARMAND 5 months ago. Updated about 1 month ago.

Status:
In progress
Priority:
N/A
Category:
Architecture - evolution
Target version:
Effort required:
Name check:
To do
Fix check:
To do
Regression:
No

Description

This ticket will hold the branch that allows to actually switch to scala 3

Actions #1

Updated by François ARMAND 5 months ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #3

Updated by François ARMAND 5 months ago

For now:
- rest-test are leading to a scalac failure. We need to identify which one does that.
- if compiled without tests, then Rudder starts \o/
- but as soon as you access a page, one gets stacktrace:

[2024-06-14T17:06:19.474+02:00] ERROR FATAL exception in thread 'pool-4-thread-8' (in threadgroup 'main'): 'java.lang.NoClassDefFoundError': 'Could not initialize class net.liftweb.util.CssSelectorParser$'
java.lang.NoClassDefFoundError: Could not initialize class net.liftweb.util.CssSelectorParser$
    at net.liftweb.util.CssBindImplicits$StringToCssBindPromoter.<init>(CssSel.scala:651)
    at net.liftweb.util.CssBindImplicits.StringToCssBindPromoter(CssSel.scala:651)
    at net.liftweb.util.CssBindImplicits.StringToCssBindPromoter$(CssSel.scala:651)
    at net.liftweb.util.Helpers$.StringToCssBindPromoter(Helpers.scala:34)
    at net.liftweb.util.HtmlHelpers.stripHead(HtmlHelpers.scala:169)
    at net.liftweb.util.HtmlHelpers.stripHead$(HtmlHelpers.scala:168)
    at net.liftweb.util.Helpers$.stripHead(Helpers.scala:34)
    at net.liftweb.http.js.JsCmds$Replace.<init>(JsCommands.scala:710)
....
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchMethodError: 'void scala.util.parsing.combinator.PackratParsers.$init$(scala.util.parsing.combinator.PackratParsers)' [in thread "qtp1662912171-182"]
    at net.liftweb.util.CssSelectorParser$.<clinit>(CssSelector.scala:121)
    at net.liftweb.util.CssBindImplicits$StringToCssBindPromoter.<init>(CssSel.scala:651)
    at net.liftweb.util.CssBindImplicits.StringToCssBindPromoter(CssSel.scala:651)
    at net.liftweb.util.CssBindImplicits.StringToCssBindPromoter$(CssSel.scala:651)
    at net.liftweb.util.Helpers$.StringToCssBindPromoter(Helpers.scala:34)
    at net.liftweb.builtin.snippet.LazyLoad$.$anonfun$render$2(LazyLoad.scala:65)
    at net.liftweb.common.Full.map(Box.scala:856)
    at net.liftweb.builtin.snippet.LazyLoad$.render(LazyLoad.scala:64)
    at net.liftweb.builtin.snippet.LazyLoad$.render(LazyLoad.scala:108)
    at net.liftweb.builtin.snippet.LazyLoad$.render(LazyLoad.scala:112)
    at net.liftweb.builtin.snippet.LazyLoad$$anonfun$dispatch$1.$anonfun$applyOrElse$1(LazyLoad.scala:40)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$25(LiftSession.scala:1717)
    at net.liftweb.common.EmptyBox.openOr(Box.scala:912)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$23(LiftSession.scala:1691)
    at net.liftweb.common.EmptyBox.openOr(Box.scala:912)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$20(LiftSession.scala:1689)
    at net.liftweb.http.LiftSession.runWhitelist$1(LiftSession.scala:1676)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$19(LiftSession.scala:1687)
    at net.liftweb.http.S.doSnippet(S.scala:2497)
    at net.liftweb.http.S.doSnippet$(S.scala:2493)
    at net.liftweb.http.S$.doSnippet(S.scala:46)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$18(LiftSession.scala:1687)
    at net.liftweb.http.NoOpSnippetTimer$.timeSnippet(SnippetTimer.scala:19)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$15(LiftSession.scala:1686)
    at net.liftweb.common.Full.map(Box.scala:856)
    at net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$processSnippet(LiftSession.scala:1681)
    at net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing$1.applyOrElse(LiftSession.scala:1970)
    at net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing$1.applyOrElse(LiftSession.scala:1958)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:35)
    at net.liftweb.util.NamedPF.apply(NamedPartialFunction.scala:36)
    at net.liftweb.util.NamedPF$.apply(NamedPartialFunction.scala:82)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$8(LiftSession.scala:2264)
    at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71)
    at net.liftweb.http.S.withAttrs(S.scala:2241)
    at net.liftweb.http.S.withAttrs$(S.scala:2234)
    at net.liftweb.http.S$.withAttrs(S.scala:46)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$7(LiftSession.scala:2259)
    at net.liftweb.http.S.doSnippet(S.scala:2497)
    at net.liftweb.http.S.doSnippet$(S.scala:2493)
    at net.liftweb.http.S$.doSnippet(S.scala:46)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$6(LiftSession.scala:2258)
    at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71)
    at net.liftweb.http.S.withCurrentSnippetNodeSeq(S.scala:2458)
    at net.liftweb.http.S.withCurrentSnippetNodeSeq$(S.scala:2457)
    at net.liftweb.http.S$.withCurrentSnippetNodeSeq(S.scala:46)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$5(LiftSession.scala:2257)
    at net.liftweb.http.LiftSession.processOrDefer(LiftSession.scala:2045)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$1(LiftSession.scala:2256)
    at scala.collection.Iterator$$anon$10.nextCur(Iterator.scala:594)
    at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:608)
    at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:145)
    at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:39)
    at scala.collection.mutable.Builder$$anon$1.addAll(Builder.scala:98)
    at scala.collection.mutable.Builder$$anon$1.addAll(Builder.scala:95)
    at scala.collection.mutable.Growable.$plus$plus$eq(Growable.scala:69)
    at scala.collection.mutable.Growable.$plus$plus$eq$(Growable.scala:69)
    at scala.collection.mutable.Builder$$anon$1.$plus$plus$eq(Builder.scala:95)
    at scala.xml.ScalaVersionSpecificNodeSeq.fromSpecific(ScalaVersionSpecific.scala:20)
    at scala.xml.ScalaVersionSpecificNodeSeq.fromSpecific$(ScalaVersionSpecific.scala:20)
    at scala.xml.NodeSeq.fromSpecific(NodeSeq.scala:47)
    at scala.xml.ScalaVersionSpecificNodeSeq.flatMap(ScalaVersionSpecific.scala:37)
    at scala.xml.ScalaVersionSpecificNodeSeq.flatMap$(ScalaVersionSpecific.scala:36)
    at scala.xml.NodeSeq.flatMap(NodeSeq.scala:47)
    at net.liftweb.http.LiftSession.processSurroundAndInclude(LiftSession.scala:2239)
....
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$18(LiftSession.scala:1687)
    at net.liftweb.http.NoOpSnippetTimer$.timeSnippet(SnippetTimer.scala:19)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$15(LiftSession.scala:1686)
    at net.liftweb.common.Full.map(Box.scala:856)
    at net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$processSnippet(LiftSession.scala:1681)
    at net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing$1.applyOrElse(LiftSession.scala:1970)
    at net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing$1.applyOrElse(LiftSession.scala:1958)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:35)
....
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
    at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:225)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:190)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
    at bootstrap.liftweb.LiftSpringSecurityFilter.doFilter(LiftSpringSecurityFilter.scala:59)
    ...
2024-06-14 17:06:19+0200 WARN  org.eclipse.jetty.server.HttpChannel - /rudder-web/secure/
java.lang.NoSuchMethodError: 'void scala.util.parsing.combinator.PackratParsers.$init$(scala.util.parsing.combinator.PackratParsers)'
    at net.liftweb.util.CssSelectorParser$.<clinit>(CssSelector.scala:121)
    at net.liftweb.util.CssBindImplicits$StringToCssBindPromoter.<init>(CssSel.scala:651)
    at net.liftweb.util.CssBindImplicits.StringToCssBindPromoter(CssSel.scala:651)
    at net.liftweb.util.CssBindImplicits.StringToCssBindPromoter$(CssSel.scala:651)
    at net.liftweb.util.Helpers$.StringToCssBindPromoter(Helpers.scala:34)
    at net.liftweb.builtin.snippet.LazyLoad$.$anonfun$render$2(LazyLoad.scala:65)
    at net.liftweb.common.Full.map(Box.scala:856)
    at net.liftweb.builtin.snippet.LazyLoad$.render(LazyLoad.scala:64)
    at net.liftweb.builtin.snippet.LazyLoad$.render(LazyLoad.scala:108)
    at net.liftweb.builtin.snippet.LazyLoad$.render(LazyLoad.scala:112)
    at net.liftweb.builtin.snippet.LazyLoad$$anonfun$dispatch$1.$anonfun$applyOrElse$1(LazyLoad.scala:40)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$25(LiftSession.scala:1717)
    at net.liftweb.common.EmptyBox.openOr(Box.scala:912)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$23(LiftSession.scala:1691)
    at net.liftweb.common.EmptyBox.openOr(Box.scala:912)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$20(LiftSession.scala:1689)
    at net.liftweb.http.LiftSession.runWhitelist$1(LiftSession.scala:1676)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$19(LiftSession.scala:1687)
    at net.liftweb.http.S.doSnippet(S.scala:2497)
    at net.liftweb.http.S.doSnippet$(S.scala:2493)
    at net.liftweb.http.S$.doSnippet(S.scala:46)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$18(LiftSession.scala:1687)
    at net.liftweb.http.NoOpSnippetTimer$.timeSnippet(SnippetTimer.scala:19)
    at net.liftweb.http.LiftSession.$anonfun$processSnippet$15(LiftSession.scala:1686)
    at net.liftweb.common.Full.map(Box.scala:856)
    at net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$processSnippet(LiftSession.scala:1681)
    at net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing$1.applyOrElse(LiftSession.scala:1970)
    at net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing$1.applyOrElse(LiftSession.scala:1958)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:35)
    at net.liftweb.util.NamedPF.apply(NamedPartialFunction.scala:36)
    at net.liftweb.util.NamedPF$.apply(NamedPartialFunction.scala:82)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$8(LiftSession.scala:2264)
    at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71)
    at net.liftweb.http.S.withAttrs(S.scala:2241)
    at net.liftweb.http.S.withAttrs$(S.scala:2234)
    at net.liftweb.http.S$.withAttrs(S.scala:46)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$7(LiftSession.scala:2259)
    at net.liftweb.http.S.doSnippet(S.scala:2497)
    at net.liftweb.http.S.doSnippet$(S.scala:2493)
    at net.liftweb.http.S$.doSnippet(S.scala:46)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$6(LiftSession.scala:2258)
    at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71)
    at net.liftweb.http.S.withCurrentSnippetNodeSeq(S.scala:2458)
    at net.liftweb.http.S.withCurrentSnippetNodeSeq$(S.scala:2457)
    at net.liftweb.http.S$.withCurrentSnippetNodeSeq(S.scala:46)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$5(LiftSession.scala:2257)
    at net.liftweb.http.LiftSession.processOrDefer(LiftSession.scala:2045)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$1(LiftSession.scala:2256)
    at scala.collection.Iterator$$anon$10.nextCur(Iterator.scala:594)
    at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:608)
    at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:145)
    at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:39)
    at scala.collection.mutable.Builder$$anon$1.addAll(Builder.scala:98)
    at scala.collection.mutable.Builder$$anon$1.addAll(Builder.scala:95)
    at scala.collection.mutable.Growable.$plus$plus$eq(Growable.scala:69)
    at scala.collection.mutable.Growable.$plus$plus$eq$(Growable.scala:69)
    at scala.collection.mutable.Builder$$anon$1.$plus$plus$eq(Builder.scala:95)
    at scala.xml.ScalaVersionSpecificNodeSeq.fromSpecific(ScalaVersionSpecific.scala:20)
    at scala.xml.ScalaVersionSpecificNodeSeq.fromSpecific$(ScalaVersionSpecific.scala:20)
    at scala.xml.NodeSeq.fromSpecific(NodeSeq.scala:47)
    at scala.xml.ScalaVersionSpecificNodeSeq.flatMap(ScalaVersionSpecific.scala:37)
    at scala.xml.ScalaVersionSpecificNodeSeq.flatMap$(ScalaVersionSpecific.scala:36)
    at scala.xml.NodeSeq.flatMap(NodeSeq.scala:47)
    at net.liftweb.http.LiftSession.processSurroundAndInclude(LiftSession.scala:2239)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$1(LiftSession.scala:2245)
    at scala.collection.Iterator$$anon$10.nextCur(Iterator.scala:594)
    at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:608)
    at scala.collection.mutable.ListBuffer.scala$collection$mutable$ListBuffer$$freshFrom(ListBuffer.scala:130)
    at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:146)
    at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:39)
    at scala.collection.mutable.Builder$$anon$1.addAll(Builder.scala:98)
    at scala.collection.mutable.Builder$$anon$1.addAll(Builder.scala:95)
    at scala.collection.mutable.Growable.$plus$plus$eq(Growable.scala:69)
    at scala.collection.mutable.Growable.$plus$plus$eq$(Growable.scala:69)
    at scala.collection.mutable.Builder$$anon$1.$plus$plus$eq(Builder.scala:95)
    at scala.xml.ScalaVersionSpecificNodeSeq.fromSpecific(ScalaVersionSpecific.scala:20)
    at scala.xml.ScalaVersionSpecificNodeSeq.fromSpecific$(ScalaVersionSpecific.scala:20)
    at scala.xml.NodeSeq.fromSpecific(NodeSeq.scala:47)
    at scala.xml.ScalaVersionSpecificNodeSeq.flatMap(ScalaVersionSpecific.scala:37)
    at scala.xml.ScalaVersionSpecificNodeSeq.flatMap$(ScalaVersionSpecific.scala:36)
    at scala.xml.NodeSeq.flatMap(NodeSeq.scala:47)
    at net.liftweb.http.LiftSession.processSurroundAndInclude(LiftSession.scala:2239)
    at net.liftweb.http.LiftSession.$anonfun$processSurroundAndInclude$1(LiftSession.scala:2280)
    at scala.collection.Iterator$$anon$10.nextCur(Iterator.scala:594)
    at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:608)
    at scala.collection.mutable.ListBuffer.scala$collection$mutable$ListBuffer$$freshFrom(ListBuffer.scala:130)
    at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:146)
    at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:39)
    at scala.collection.mutable.Builder$$anon$1.addAll(Builder.scala:98)
    at scala.collection.mutable.Builder$$anon$1.addAll(Builder.scala:95)
    at scala.collection.mutable.Growable.$plus$plus$eq(Growable.scala:69)
    at scala.collection.mutable.Growable.$plus$plus$eq$(Growable.scala:69)
    at scala.collection.mutable.Builder$$anon$1.$plus$plus$eq(Builder.scala:95)
    at scala.xml.ScalaVersionSpecificNodeSeq.fromSpecific(ScalaVersionSpecific.scala:20)
    at scala.xml.ScalaVersionSpecificNodeSeq.fromSpecific$(ScalaVersionSpecific.scala:20)
    at scala.xml.NodeSeq.fromSpecific(NodeSeq.scala:47)
    at scala.xml.ScalaVersionSpecificNodeSeq.flatMap(ScalaVersionSpecific.scala:37)
    at scala.xml.ScalaVersionSpecificNodeSeq.flatMap$(ScalaVersionSpecific.scala:36)
    at scala.xml.NodeSeq.flatMap(NodeSeq.scala:47)
    at net.liftweb.http.LiftSession.processSurroundAndInclude(LiftSession.scala:2239)

Actions #4

Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 8.2.0~alpha1 to 8.2.0~beta1
Actions #5

Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 8.2.0~beta1 to 8.2.0~rc1
Actions #6

Updated by François ARMAND about 1 month ago

  • Target version changed from 8.2.0~rc1 to 8.3.0~alpha1
Actions

Also available in: Atom PDF