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

Can't compile with Scala 2.13 #10025

Closed
wiradikusuma opened this issue Jun 15, 2020 · 12 comments · Fixed by #25106
Closed

Can't compile with Scala 2.13 #10025

wiradikusuma opened this issue Jun 15, 2020 · 12 comments · Fixed by #25106
Labels
kind/bug Something isn't working
Milestone

Comments

@wiradikusuma
Copy link

wiradikusuma commented Jun 15, 2020

Describe the bug
Quarkus doesn't work when Scala version is changed from 2.12 to 2.13.

Expected behavior
Successfully compiled.

To Reproduce
Steps to reproduce the behavior:

  1. Open https://code.quarkus.io

  2. Select Scala (I also selected Gradle, resteasy-jackson, jackson, jdbc-postgresql and mailer)

  3. Download and extract the skeleton project

  4. Update the Scala version in build.gradle to 2.13.1

  5. In ExampleResource.scala, replace def hello() = "hello" with def hello() = List("hello").minOption.get -- minOption is a new method in 2.13.

  6. In the project's working directory, ./gradlew quarkusDev

  7. Notice the errors. You will get something like:

     > Task :compileScala                                                                                                                      
     [Error] C:\...\src\main\scala\...\ExampleResource.scala:11: value minOption is not a member of List[String]     
     one error found
    

Environment (please complete the following information):

  • Output of uname -a or ver:
    Linux Ryzen5 4.4.0-18362-Microsoft Agroal extension url configurable independent of configuration subsystem #836-Microsoft Mon May 05 16:04:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux

  • Output of java -version:
    openjdk version "11.0.3" 2019-04-16
    OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7)
    OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)

  • GraalVM version (if different from Java):
    N/A

  • Quarkus version or git rev:
    1.5.1.Final

  • Build tool (ie. output of mvnw --version or gradlew --version):
    Gradle 6.3
    Build time: 2020-03-24 19:52:07 UTC
    Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60
    Kotlin: 1.3.70
    Groovy: 2.5.10
    Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
    JVM: 11.0.3 (AdoptOpenJDK 11.0.3+7)
    OS: Linux 4.4.0-18362-Microsoft amd64

@wiradikusuma wiradikusuma added the kind/bug Something isn't working label Jun 15, 2020
@gastaldi
Copy link
Contributor

I tried to reproduce this issue following the steps you described but it works for me. Can you push a sample project in a Github repository?

The only difference is that I am running Fedora 32 with openjdk 11

@wiradikusuma
Copy link
Author

I managed to narrow it down, please change a line in ExampleResource.scala -- I've updated my submission.

@gastaldi
Copy link
Contributor

@wiradikusuma can you build Quarkus master from #10053 and let me know if that works for you? It worked for me locally, but a second pair of eyes would help 😉

@wiradikusuma
Copy link
Author

wiradikusuma commented Jun 17, 2020

@gastaldi I can confirm that it works.

@wiradikusuma
Copy link
Author

Any news regarding Scala 2.13 support?

@wiradikusuma
Copy link
Author

@gastaldi Any news regarding Scala 2.13 support?

@gastaldi
Copy link
Contributor

@wiradikusuma I think Debezium needs to support Scala 2.13 before we migrate that.

@gunnarmorling is that possible already?

@ppalaga
Copy link
Contributor

ppalaga commented Apr 21, 2022

We (Camel Quarkus) would also prefer Scala 2.13 - because that's what we get from Camel.
@jpechane is Debezium ready for Scala 2.13 now?

@jpechane
Copy link

@ppalaga Debezium does not use Scala at all, it is just a question of which Kafka do we use as our dependency. I just check our main branch and we use 2.13 as dependency since 1.9.0.Alpha1.

@ppalaga
Copy link
Contributor

ppalaga commented Apr 22, 2022

I just check our main branch and we use 2.13 as dependency since 1.9.0.Alpha1.

Thanks for confirming, @jpechane. We are good to upgrade to scala 2.13. Then is there anybody who would like to prepare the PR?

@gsmet
Copy link
Member

gsmet commented Apr 22, 2022

I have a branch somewhere but it would need a refresh.

@gsmet
Copy link
Member

gsmet commented Apr 22, 2022

I created a draft PR here: #25106 . I had to rework everything as my branch was really too old and too many things had changed.
The good thing is that it was a lot simpler... except if I missed something :).

@quarkus-bot quarkus-bot bot added this to the 2.9 - main milestone Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants