-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scala3 Support using 2.13 ElasticMq (#676)
* parent db4ad65 author Ryan Stradling <[email protected]> 1673316256 -0500 committer Ryan Stradling <[email protected]> 1673454984 -0500 Fixes #632 but in a slightly different way than that ticket was leaning towards The major issue with Scala3 compilation and this code base are the tests and dependency on elasticMq which does not have a Scala3 version of its code (assuming that is due to the Akka dependency). The one approach would be to update ElasticMq to do a cross-compile to Scala3 but to achieve that Akka would most likely need to be replaced with another http service. This should probably be done but may take a while. The other way to approach this is to use 2.13 libraries in Scala3 by using the library dependency sbt sugar of `cross CrossVersion.for3Use2_13`. In the build.sbt file we are using a 2.13 `ElasticMq` library for tests only for Scala3. I cannot guarantee that is a binary compatible scenario but things seem to run and given it is for tests am not too worried about it. Also in the build.sbt I removed a compiler plugin that did not seem to be used and there is no Scala3 equivalent for and moved the kind-projector compiler plugin only for 2.12 and 2.13. I also updated the default build to scala 3.2.1 but am happy to change it back to 2.13 `case class StubSqsService(api: SqsAsyncClient = null)` was done because it used to have a lazy val api which in Scala3 cannot override a non-lazy val and seems to me like not a great thing. I tried changing it to be a non-lazy val but had issues when running the tests. `withFastClock` interpreted in Scala 3 as `ZIO[Live, Any, Long]`. I do not know the history of this difference but it seems to work on all versions just fine. And again these are tests. * Changing the current Scala version back to 2.3.10 as it may affect some of the website steps * Typo * Updating the gh-workflows so scala3 is part of the ci build
- Loading branch information
1 parent
db4ad65
commit 3ad474c
Showing
7 changed files
with
33 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
java: ['[email protected]', '[email protected]'] | ||
scala: ['2.12.16', '2.13.8'] | ||
scala: ['2.12.16', '2.13.10', '3.2.1'] | ||
steps: | ||
- name: Checkout current branch | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.7.1 | ||
sbt.version=1.8.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters