-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap all methods of org.apache.avro.SchemaBuilder and its nested classes. Reimplements the full SchemaBuilder API, with the exceptions of the self methods and the shortcut methods of the nested classes. Side effects are now wrapped in cats.effect.Sync, and now typeclass composition replaces inheritance, but extension methods are used to remain faithful to the Java API.
- Loading branch information
1 parent
a2e551c
commit 2b754ec
Showing
5 changed files
with
1,717 additions
and
0 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 |
---|---|---|
@@ -1,2 +1,12 @@ | ||
# schemabuilder4cats | ||
A referentially transparent FFI to `org.apache.avro.SchemaBuilder` | ||
|
||
### Welcome to `schemabuilder4cats` | ||
|
||
##### Add the dependency: | ||
|
||
"com.julianpeeters" %% "schemabuilder4cats" % "0.1.0-SNAPSHOT" | ||
|
||
### `schemabuilder4cats` Essentials | ||
|
||
The `SchemaBuilder` API is modelled after `org.apache.avro.SchemaBuilder` ([Javadoc](https://avro.apache.org/docs/1.11.1/api/java/)). |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
lazy val ApacheAvroV = "1.11.1" | ||
lazy val CatsEffectV = "3.5.1" | ||
lazy val MUnitCEV = "1.0.7" | ||
|
||
ThisBuild / description := "A referentially transparent FFI to `org.apache.avro.SchemaBuilder`" | ||
ThisBuild / organization := "com.julianpeeters" | ||
ThisBuild / scalaVersion := "3.3.0" | ||
ThisBuild / version := "0.1.0-SNAPSHOT" | ||
ThisBuild / versionScheme := Some("semver-spec") | ||
|
||
lazy val commonSettings = Seq( | ||
scalacOptions ++= Seq( | ||
"-deprecation", | ||
"-feature", | ||
"-Werror", | ||
"-source:future", | ||
"-Wunused:all", | ||
"-Wvalue-discard" | ||
) | ||
) | ||
|
||
lazy val schemabuilder4cats = (project in file(".")) | ||
.settings( | ||
commonSettings, | ||
name := "schemabuilder4cats", | ||
libraryDependencies ++= Seq( | ||
// main | ||
"org.apache.avro" % "avro" % ApacheAvroV, | ||
"org.typelevel" %% "cats-effect" % CatsEffectV, | ||
// test | ||
"org.typelevel" %% "munit-cats-effect-3" % MUnitCEV % Test, | ||
) | ||
) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.9.3 |
Oops, something went wrong.