Skip to content

Commit

Permalink
Set fatal warning (#878)
Browse files Browse the repository at this point in the history
* Set fatal warning

* Fix BQ warning

* FIx doc warning

* Fix tensorflow doc error
  • Loading branch information
Michel Davit authored Jan 3, 2024
1 parent 7450fad commit 7af1303
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TableRowTypeSuite extends MagnolifySuite {
private def test[T: Arbitrary: ClassTag](implicit t: TableRowType[T], eq: Eq[T]): Unit = {
val tpe = ensureSerializable(t)
// FIXME: test schema
tpe.schema: Unit
val _ = tpe.schema
property(className[T]) {
Prop.forAll { (t: T) =>
val r = tpe(t)
Expand Down
22 changes: 18 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ ThisBuild / scalaVersion := scalaDefault
ThisBuild / crossScalaVersions := Seq(scala3, scala213, scala212)
ThisBuild / githubWorkflowTargetBranches := Seq("main")
ThisBuild / githubWorkflowJavaVersions := Seq(java17, java11)
ThisBuild / tlJdkRelease := Some(8)
ThisBuild / tlFatalWarnings := true
ThisBuild / tlCiHeaderCheck := true
ThisBuild / tlCiScalafmtCheck := true
ThisBuild / tlCiDocCheck := true
Expand Down Expand Up @@ -212,8 +214,6 @@ lazy val keepExistingHeader =
)

val commonSettings = Seq(
tlFatalWarnings := false,
tlJdkRelease := Some(8),
// So far most projects do no support scala 3
crossScalaVersions := Seq(scala213, scala212),
scalaVersion := scalaDefault,
Expand Down Expand Up @@ -483,7 +483,19 @@ lazy val parquet = project
dependencyOverrides ++= Seq(
"org.apache.avro" % "avro" % avroVersion % Provided,
"org.apache.avro" % "avro" % avroVersion % Test
)
),
apiMappings := {
def findJar(organization: String, name: String): File =
update.value.select { module: ModuleID =>
module.organization == organization && module.name == name
}.head

Map(
findJar("org.apache.parquet", "parquet-column") -> url(
s"https://www.javadoc.io/doc/org.apache.parquet/parquet-column/$parquetVersion/"
)
)
}
)

lazy val protobuf = project
Expand Down Expand Up @@ -537,7 +549,9 @@ lazy val tensorflow = project
},
// Something messes with Compile/packageSrc/mappings and adds protobuf managed sources
// Force back to original value from sbt
inConfig(Compile)(Defaults.packageTaskSettings(packageSrc, Defaults.packageSrcMappings))
inConfig(Compile)(Defaults.packageTaskSettings(packageSrc, Defaults.packageSrcMappings)),
inConfig(Compile)(Defaults.packageTaskSettings(packageDoc, Defaults.packageDocMappings)),
Compile / doc / scalacOptions ++= Seq("-skip-packages", "org.tensorflow")
)

lazy val neo4j = project
Expand Down
12 changes: 7 additions & 5 deletions parquet/src/main/scala/magnolify/parquet/Predicate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ import org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName
object Predicate {

/**
* Constructs a Parquet [[FilterPredicate]] based on a single primitive column and a user-defined
* function. Predicates can be logically combined using [[FilterApi.and]] and [[FilterApi.or]].
* Constructs a Parquet [[org.apache.parquet.filter2.predicate.FilterPredicate]] based on a single
* primitive column and a user-defined function. Predicates can be logically combined using
* [[org.apache.parquet.filter2.predicate.FilterApi.and]] and
* [[org.apache.parquet.filter2.predicate.FilterApi.or]].
*
* Note that Optional fields should use a predicate for their lifted type: that is, create a
* predicate for an optional String field using [[Predicate.onField[String]], even if its
* projected case class defines the field as `Option[String]`. When applying predicates, Parquet
* will filter out optional fields with a value of `null` before applying the predicate filter.
* predicate for an optional String field using onField[String], even if its projected case class
* defines the field as `Option[String]`. When applying predicates, Parquet will filter out
* optional fields with a value of `null` before applying the predicate filter.
*
* @param fieldName
* the name of the primitive column. Nested fields are separated by '.'s
Expand Down
2 changes: 2 additions & 0 deletions test/src/test/scala/magnolify/shared/EnumTypeSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package magnolify.shared
import magnolify.test.*
import magnolify.test.Simple.*

import scala.annotation.nowarn
import scala.util.{Properties, Try}

class EnumTypeSuite extends MagnolifySuite {
Expand Down Expand Up @@ -100,6 +101,7 @@ class EnumTypeSuite extends MagnolifySuite {
| ^
|""".stripMargin

@nowarn
val scala3Error =
"""|error:
|No given instance of type magnolify.shared.EnumType[Option[magnolify.test.ADT.Color]] was found for parameter et of method apply in object EnumType.
Expand Down

0 comments on commit 7af1303

Please sign in to comment.