Skip to content

Commit

Permalink
Prepare anorm-docs project for Scala 3 (#537)
Browse files Browse the repository at this point in the history
* Prepare anorm-docs project for Scala 3

* Use Play 2.9.0-M4

* Scala 3 for docs, drop Java 8 testing for Docs

* Fix implicits

* Fix Scala 3 errors

* Scala3 fix

* Keep Java 8 for now

* Play 2.9.2

* play-json 2.10.4

* Latest scala/sbt/silencer versions

* Fix

---------

Co-authored-by: Cédric Chantepie <[email protected]>
  • Loading branch information
mkurz and cchantep authored Aug 12, 2024
1 parent ee658f5 commit 8ffe87f
Show file tree
Hide file tree
Showing 17 changed files with 316 additions and 284 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ jobs:
name: Binary Compatibility
uses: playframework/.github/.github/workflows/binary-check.yml@v4

check-docs:
check-docs-8:
name: Docs Java 8
uses: playframework/.github/.github/workflows/cmd.yml@v4
with:
java: 8
scala: 2.11.x, 2.12.x, 2.13.x
cmd: sbt ++$MATRIX_SCALA docs/test

check-docs-11:
name: Docs
uses: playframework/.github/.github/workflows/cmd.yml@v4
with:
java: 11, 8
scala: 2.11.x, 2.12.x, 2.13.x # TODO: 3.x (other play modules not ok)
java: 11
scala: 2.11.x, 2.12.x, 2.13.x, 3.x
cmd: sbt ++$MATRIX_SCALA docs/test

tests:
Expand Down
10 changes: 5 additions & 5 deletions akka/src/main/scala/anorm/AkkaStream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import scala.util.control.NonFatal
import scala.concurrent.{ Future, Promise }

import akka.stream.Materializer
import akka.stream.scaladsl.{ Source }
import akka.stream.scaladsl.Source

/**
* Anorm companion for the [[http://doc.akka.io/docs/akka/2.4.4/scala/stream/]].
Expand Down Expand Up @@ -70,7 +70,7 @@ object AkkaStream {
def source[T](sql: => Sql, parser: RowParser[T])(implicit
@deprecated("No longer required (will be removed)", "2.5.4") m: Materializer,
con: Connection
): Source[T, Future[Int]] = source[T](sql, parser, ColumnAliaser.empty)
): Source[T, Future[Int]] = Source.fromGraph(new ResultSource[T](con, sql, ColumnAliaser.empty, parser))

/**
* Returns the result rows from the `sql` query as an enumerator.
Expand All @@ -84,9 +84,9 @@ object AkkaStream {
* @param connection $connectionParam
*/
def source(sql: => Sql, as: ColumnAliaser)(implicit
m: Materializer,
connnection: Connection
): Source[Row, Future[Int]] = source(sql, RowParser.successful, as)
@deprecated("No longer required (will be removed)", "2.7.1") m: Materializer,
@deprecatedName(Symbol("connnection")) con: Connection
): Source[Row, Future[Int]] = Source.fromGraph(new ResultSource[Row](con, sql, as, RowParser.successful))

/**
* Returns the result rows from the `sql` query as an enumerator.
Expand Down
Loading

0 comments on commit 8ffe87f

Please sign in to comment.