Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
7588d5e
Fix method name in Hub's documentation (#5618)
mijicd Sep 16, 2021
32470e2
Update zio-interop-reactivestreams to 1.3.7 (#5619)
scala-steward Sep 16, 2021
9e3247a
Implement ZStream#zipAllSortedByKeyWith (#5571)
adamgfraser Sep 16, 2021
a931935
Update sbt-scalafix to 0.9.31 (#5625)
scala-steward Sep 17, 2021
84d773b
Update zio-aws-core, zio-aws-ec2, ... to 3.17.40.1 (#5626)
scala-steward Sep 17, 2021
b7cdc7a
Update scalafmt-core to 3.0.4 (#5635)
scala-steward Sep 17, 2021
e26ea50
Update cats-effect to 2.5.4 (#5639)
scala-steward Sep 18, 2021
5c27be0
Update cats-effect to 3.2.9 (#5641)
scala-steward Sep 18, 2021
3fbeda4
improve documentation (#5594)
adamgfraser Sep 18, 2021
d23535f
Update zio-config-magnolia, ... to 1.0.9 (#5645)
scala-steward Sep 19, 2021
08fe9f5
Update zio-config-magnolia, ... to 1.0.10 (#5647)
scala-steward Sep 20, 2021
f3cc1fd
Merge branch 'master' of https://github.com/zio/zio into series/2.x
adamgfraser Sep 20, 2021
441aeb7
Upstream Shared Layers To ZIOApp (#5643)
adamgfraser Sep 20, 2021
cea16d2
Implement ZSink and ZTransducer Unwrap Operators (#5640)
adamgfraser Sep 20, 2021
ac9fa35
handle empty pull (#5651)
adamgfraser Sep 20, 2021
41586d1
Merge branch 'master' of https://github.com/zio/zio into series/2.x
adamgfraser Sep 20, 2021
55f23f6
chore(deps): update zio.version to v1.0.12 (#5652)
renovate[bot] Sep 20, 2021
3e5320e
chore(deps): update dependency prismjs to 1.25.0 [security] (#5654)
renovate[bot] Sep 20, 2021
07d5591
Update zio-aws-core, zio-aws-ec2, ... to 3.17.42.1 (#5656)
scala-steward Sep 21, 2021
57c0a3f
Update http4s-blaze-client, ... to 0.23.4 (#5657)
scala-steward Sep 21, 2021
e197837
Update zio-aws-core, zio-aws-ec2, ... to 3.17.42.3 (#5660)
scala-steward Sep 22, 2021
d01f03a
Remove site deployment from the series 1.x branch (#5658)
atooni Sep 22, 2021
1185c36
Gunzip channel (#5222)
kmatasfp Sep 23, 2021
eb10e1e
Implement iso/utf decoders (#5437)
paulpdaniels Sep 23, 2021
fe2fd7b
Fix typo in splitChunksN (#5667)
vigoo Sep 23, 2021
28f2cfd
Implement ZStream.fromBlockingIterator (#5174)
luis3m Sep 23, 2021
c19df8d
Add ZStream.fromFile and others (#5175)
luis3m Sep 23, 2021
381af36
Update README (#5672)
kolov Sep 24, 2021
eac7686
Implement ZChannel.mergeAllWith (#5172)
luis3m Sep 24, 2021
f1c5fd7
Preserve Original Error In ZStream#timeoutError (#5671)
adamgfraser Sep 24, 2021
85eb868
Port ZStream#collectType to the new encoding (#5190)
iravid Sep 24, 2021
ccf36ef
Update scalafmt-core to 3.0.5 (#5674)
scala-steward Sep 25, 2021
03b1d7c
Deprecated message in zio.App points to zio.ZIOAppDefault (#5668)
adrianfilip Sep 26, 2021
4a4a295
Update sbt-ci-release to 1.5.9 (#5663)
scala-steward Sep 26, 2021
18d0ac8
Update scala-compiler, scala-library, ... to 2.12.15 (#5613)
scala-steward Sep 26, 2021
8c4cd85
Update quill-jdbc-zio to 3.10.0 (#5526)
scala-steward Sep 26, 2021
9b9612f
Update zio-test-akka-http to 1.0.3 (#5673)
scala-steward Sep 26, 2021
39ba0aa
propagate error (#5680)
adamgfraser Sep 27, 2021
ddc001a
Update zio-aws-core, zio-aws-ec2, ... to 3.17.42.4 (#5682)
scala-steward Sep 27, 2021
3de01cb
managed and transactional tests (#5683)
adamgfraser Sep 27, 2021
c2c8fbb
Fix getRef in Fiber.orElse (#5690)
zeal18 Sep 28, 2021
9f7befe
chore(deps): update node.js to v14.18.0 (#5689)
renovate[bot] Sep 28, 2021
58eb937
Update zio-aws-core, zio-aws-ec2, ... to 3.17.42.5 (#5691)
scala-steward Sep 29, 2021
0e85b08
Update Internal Names (#5688)
adamgfraser Sep 29, 2021
9bf2c42
Breadth First Search Generators (#5677)
adamgfraser Sep 29, 2021
f3fcc57
Deprecate SuiteM (#5686)
adamgfraser Sep 29, 2021
9542e26
Deprecate Some Additional Methods (#5687)
adamgfraser Sep 29, 2021
34d229e
Reorganization of Data Types (#5662)
khajavi Sep 29, 2021
36c61a0
ZIO 2.0 Migration Guide (#5381)
khajavi Sep 29, 2021
2ff47e2
Metrics Documentation (#5644)
khajavi Sep 29, 2021
c71dc71
Deprecate CheckM (#5684)
adamgfraser Sep 29, 2021
706a821
Update jsoup to 1.14.3 (#5695)
scala-steward Sep 30, 2021
bee569e
preserve partial ordering of stream elements (#5693)
adamgfraser Sep 30, 2021
948bf6e
Update zio-kafka to 0.17.0 (#5698)
scala-steward Sep 30, 2021
47d653b
Implement ZIOAppPlatformSpecific (#5697)
adamgfraser Sep 30, 2021
b2f14e8
preserve chunking (#5692)
adamgfraser Sep 30, 2021
22caf07
Contributing to Documentation (#5681)
khajavi Sep 30, 2021
1222b35
Add accessor method for Clock.localDateTime (#5661)
nartamonov Sep 30, 2021
6a74a2d
Merge branch 'master' of https://github.com/zio/zio into series/2.x
adamgfraser Sep 30, 2021
754637c
JVM metrics + DefaultJvmMetricsExporter ZIOApp (#5582)
vigoo Sep 30, 2021
be51ec5
Update util-core to 21.9.0 (#5700)
scala-steward Oct 1, 2021
b1af540
Use Smaller Generator For Property Based Tests (#5699)
adamgfraser Oct 1, 2021
5adad7e
Update zio-zmx to 0.0.9 (#5701)
scala-steward Oct 1, 2021
9f9fc57
Update rezilience to 0.7.0 (#5702)
scala-steward Oct 1, 2021
f8bc762
Update scalafmt-core to 3.0.6 (#5708)
scala-steward Oct 2, 2021
a696e42
Update maven-compat, maven-embedder to 3.8.3 (#5710)
scala-steward Oct 3, 2021
94bdc2a
Update zio-aws-core, zio-aws-ec2, ... to 3.17.42.6 (#5712)
scala-steward Oct 4, 2021
2cdb8e6
Removes ensuringFirst from ZStream (#5717)
vigoo Oct 4, 2021
c1df699
Fix Exit value propagation for Channels (#5718)
vigoo Oct 5, 2021
d9e50ff
remove deprecated use of security manager
adamgfraser Oct 5, 2021
df2b4cc
Merge branch 'series/2.x' of https://github.com/zio/zio into series/2.x
adamgfraser Oct 5, 2021
b2e7923
Revert "remove deprecated use of security manager"
adamgfraser Oct 5, 2021
d03eb88
Preserve Scope of Forked Fibers in ZStream#interruptWhen (#5720)
adamgfraser Oct 5, 2021
4720c89
generalize (#5715)
adamgfraser Oct 5, 2021
3a5e82c
Document some missing sections on the STM data type (#5711)
khajavi Oct 5, 2021
99b58e5
Implement ZIOAspect.disableLogging (#5723)
adamgfraser Oct 6, 2021
2c7b39b
Update http4s-blaze-client, ... to 0.23.5 (#5735)
scala-steward Oct 6, 2021
578ba4b
Update zio-aws-core, zio-aws-ec2, ... to 3.17.42.7 (#5740)
scala-steward Oct 7, 2021
054ca9c
Update sbt-scalajs, scalajs-compiler, ... to 1.7.1 (#5738)
scala-steward Oct 8, 2021
bb4476a
implement tomanagedauto (#5727)
adamgfraser Oct 8, 2021
0d040aa
Update zio-aws-core, zio-aws-ec2, ... to 3.17.42.9 (#5746)
scala-steward Oct 9, 2021
94bb0db
Update caliban, caliban-zio-http to 1.2.0 (#5748)
scala-steward Oct 10, 2021
dc79e81
Update zio-aws-core, zio-aws-ec2, ... to 3.17.56.1 (#5747)
scala-steward Oct 10, 2021
cefb731
Execution Tracing (#5744)
adamgfraser Oct 10, 2021
298fa45
Bring Back ZIOApp.Proxy (#5745)
adamgfraser Oct 10, 2021
efc39e4
feat: catchNonFatal (#5741)
runtologist Oct 11, 2021
b75d59f
Add collectAll and foreach to ZLayer (#5756)
jypma Oct 12, 2021
3a78d8b
feat: flesh out runtime stats (#5751)
runtologist Oct 12, 2021
d89dad2
Update fs2-core to 2.5.10 (#5757)
scala-steward Oct 12, 2021
d03ad18
Update reactor-core to 3.4.11 (#5758)
scala-steward Oct 12, 2021
25faa64
fix signature (#5755)
adamgfraser Oct 12, 2021
0bb1eb4
deprecate (#5759)
adamgfraser Oct 12, 2021
5457ed6
Propagate Tracing Information (#5750)
adamgfraser Oct 12, 2021
016c8e9
ZPool (#5761)
jdegoes Oct 12, 2021
9ceed2b
generalize (#5734)
adamgfraser Oct 12, 2021
860a93e
Fix the @mockable macro to handle inheritance (#5737)
Oct 12, 2021
c36312f
Implement Random.scalaRandom (#5731)
adamgfraser Oct 12, 2021
0348392
Update Documentation of Running a ZIO Effect (#5730)
khajavi Oct 12, 2021
ddc4436
HasMany Documentation (#5716)
khajavi Oct 12, 2021
8338db9
rename (#5724)
adamgfraser Oct 12, 2021
4f9cc1e
ZState Documentation (#5704)
khajavi Oct 12, 2021
6977f44
Update http4s-blaze-client, ... to 0.23.6 (#5764)
scala-steward Oct 13, 2021
81bbcb4
Compositional Concurrency (#5664)
adamgfraser Oct 13, 2021
839e51f
Rename ZIOAppArgs#args to ZIOAppArgs#getArgs (#5733)
adamgfraser Oct 13, 2021
64016b0
add article section for zio-telemetry (#5705)
khajavi Oct 13, 2021
7cb7cf8
Add ZTransducer.groupAdjacentBy (#5767)
davidlar Oct 13, 2021
cc87480
remove scalafix (#5766)
adamgfraser Oct 13, 2021
6a08dcf
Implement Executor#submitAndYield (#5725)
adamgfraser Oct 13, 2021
4397444
remove scala steward (#5765)
adamgfraser Oct 13, 2021
53d8933
chore(deps): update node.js to v14.18.1 (#5760)
renovate[bot] Oct 13, 2021
c36bded
Support Propagating FiberRef Values Across Fiber Boundaries (#5752)
adamgfraser Oct 13, 2021
d7246e3
Merge branch 'master' of https://github.com/zio/zio into series/2.x
adamgfraser Oct 13, 2021
d0fd22d
Update zio-aws-core, zio-aws-ec2, ... to 3.17.58.1 (#5769)
scala-steward Oct 13, 2021
8241038
Fix Compilation Error On ZIO 2 Branch (#5770)
adamgfraser Oct 14, 2021
8483c92
use ZIOApp.Proxy to compose apps. (#5773)
khajavi Oct 14, 2021
caa3772
Introduction to ZIO Aspects (#5749)
khajavi Oct 14, 2021
0b5e47f
fix trace unapply method (#5774)
adamgfraser Oct 14, 2021
cea746c
Scala 3 Tracing (#5775)
adamgfraser Oct 14, 2021
64e82f6
implement tmap#updatewith (#5776)
adamgfraser Oct 14, 2021
6a72408
Implement Scheduler#asScheduledExecutorService (#5040)
adamgfraser Oct 14, 2021
f963a9a
add scalafix ZIO 2 upgrade rules (#5739)
kitlangton Oct 14, 2021
9bd794c
Documentation of Logging and Debugging Functionality (#5729)
khajavi Oct 15, 2021
6520d95
Improve Performance Of Chunk (#4634)
adamgfraser Oct 15, 2021
c21cadb
chore(deps): update actions/checkout action to v2.3.5 (#5781)
renovate[bot] Oct 15, 2021
c587266
add tamer to community (#5709)
gurghet Oct 16, 2021
0b7a26b
Implement Default Supervisor (#4736)
adamgfraser Oct 16, 2021
26bcaf7
Implement ChunkIterator (#5783)
adamgfraser Oct 17, 2021
afb7100
Ignore Build Metadata on ZIO Versions (#5788)
khajavi Oct 17, 2021
325f08b
initial work (#5787)
adamgfraser Oct 17, 2021
7ef4311
Align parameters with docs comment (#5470) (#5795)
jupposessho Oct 19, 2021
338645e
Readd helper methods to create histogram buckets with linear / expone…
atooni Oct 19, 2021
374698e
Update to Scala 3.1.0 (#5793)
sideeffffect Oct 19, 2021
a337b3c
Merge latest series/2.x into documentation
atooni Oct 20, 2021
ee840d2
fix docs. wrong import class (ZIOApp) while using ZIOAppDefault. (#5…
keyno63 Oct 20, 2021
503ceef
Merge branch 'master' of https://github.com/zio/zio into series/2.x
adamgfraser Oct 21, 2021
1a1ed34
Merge remote-tracking branch 'zio/documentation' into documentation
atooni Oct 21, 2021
6fe3c9f
Merge remote-tracking branch 'zio/series/2.x' into documentation
atooni Oct 21, 2021
60ccb16
Get latest 2.x version directly from git
atooni Oct 21, 2021
28e673b
Extractinbg bash script to quick test site generation
atooni Oct 21, 2021
3428fa6
Extract script to check Site generation upon push
atooni Oct 21, 2021
daadd65
Readd file that was deleted accidentally
atooni Oct 21, 2021
7e7855f
Optimise checkSite script
atooni Oct 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 13 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected].4
uses: actions/[email protected].5
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- name: Cache scala dependencies
Expand All @@ -33,7 +33,7 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected].4
uses: actions/[email protected].5
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- name: Cache scala dependencies
Expand All @@ -46,7 +46,7 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected].4
uses: actions/[email protected].5
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- name: Cache scala dependencies
Expand All @@ -59,20 +59,14 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected].4
uses: actions/[email protected].5
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check Website Generation
run: |
./sbt docs/mdoc
cd website
mv version2-only-docusaurus.config.js docusaurus.config.js
rm -f versions.json
yarn install
yarn build
cd ..
./scripts/checkSite.sh

test:
runs-on: ubuntu-20.04
Expand All @@ -81,28 +75,28 @@ jobs:
fail-fast: false
matrix:
java: ['8']
scala: ['2.11.12', '2.12.15', '2.13.6', '3.0.2']
scala: ['2.11.12', '2.12.15', '2.13.6', '3.1.0']
platform: ['JVM']
steps:
- name: Checkout current branch
uses: actions/[email protected].4
uses: actions/[email protected].5
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
with:
java-version: ${{ matrix.java }}
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Mima Checks
if: ${{ !startsWith(matrix.scala, '3.0.') }}
if: ${{ !startsWith(matrix.scala, '3.') }}
run: ./sbt ++${{ matrix.scala }}! mimaChecks
- name: Test 2.11.x
if: ${{ startsWith(matrix.scala, '2.11.') }}
run: ./sbt ++${{ matrix.scala }}! test${{ matrix.platform }}211
- name: Test 2.12.x and 2.13.x
if: ${{ !startsWith(matrix.scala, '2.11.') && !startsWith(matrix.scala, '3.0.') }}
if: ${{ !startsWith(matrix.scala, '2.11.') && !startsWith(matrix.scala, '3.') }}
run: ./sbt ++${{ matrix.scala }}! test${{ matrix.platform }}
- name: Test 3.x
if: ${{ startsWith(matrix.scala, '3.0.') }}
if: ${{ startsWith(matrix.scala, '3.') }}
run: ./sbt ++${{ matrix.scala }}! test${{ matrix.platform }}Dotty

testJvms:
Expand All @@ -115,7 +109,7 @@ jobs:
platform: ['JVM']
steps:
- name: Checkout current branch
uses: actions/[email protected].4
uses: actions/[email protected].5
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
with:
Expand All @@ -135,7 +129,7 @@ jobs:
platform: ['JS', 'Native']
steps:
- name: Checkout current branch
uses: actions/[email protected].4
uses: actions/[email protected].5
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
with:
Expand All @@ -159,7 +153,7 @@ jobs:
if: github.event_name != 'pull_request'
steps:
- name: Checkout current branch
uses: actions/[email protected].4
uses: actions/[email protected].5
with:
fetch-depth: 0
- name: Setup Scala and Java
Expand Down
22 changes: 12 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(macroDefinitionSettings)
.settings(
scalacOptions ++= {
if (scalaVersion.value == ScalaDotty)
if (scalaVersion.value == Scala3)
Seq.empty
else
Seq("-P:silencer:globalFilters=[zio.stacktracer.TracingImplicits.disableAutoTrace]")
Expand Down Expand Up @@ -225,7 +225,7 @@ lazy val streams = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(macroDefinitionSettings)
.settings(
scalacOptions ++= {
if (scalaVersion.value == ScalaDotty)
if (scalaVersion.value == Scala3)
Seq.empty
else
Seq("-P:silencer:globalFilters=[zio.stacktracer.TracingImplicits.disableAutoTrace]")
Expand Down Expand Up @@ -280,7 +280,7 @@ lazy val test = crossProject(JSPlatform, JVMPlatform, NativePlatform)
)
.settings(
scalacOptions ++= {
if (scalaVersion.value == ScalaDotty)
if (scalaVersion.value == Scala3)
Seq.empty
else
Seq("-P:silencer:globalFilters=[zio.stacktracer.TracingImplicits.disableAutoTrace]")
Expand Down Expand Up @@ -327,13 +327,13 @@ lazy val testMagnolia = crossProject(JVMPlatform, JSPlatform)
.settings(
crossScalaVersions --= Seq(Scala211),
scalacOptions ++= {
if (scalaVersion.value == ScalaDotty)
if (scalaVersion.value == Scala3)
Seq.empty
else
Seq("-language:experimental.macros")
},
libraryDependencies ++= {
if (scalaVersion.value == ScalaDotty)
if (scalaVersion.value == Scala3)
Seq.empty
else
Seq(
Expand Down Expand Up @@ -631,6 +631,7 @@ lazy val docs = project.module
"dev.zio" %% "zio-schema" % "0.1.1",
"dev.zio" %% "zio-sqs" % "0.4.2",
"dev.zio" %% "zio-opentracing" % "0.8.2",
"io.laserdisc" %% "tamer-db" % "0.16.1",
"io.jaegertracing" % "jaeger-core" % "1.6.0",
"io.jaegertracing" % "jaeger-client" % "1.6.0",
"io.jaegertracing" % "jaeger-zipkin" % "1.6.0",
Expand All @@ -657,10 +658,10 @@ lazy val docs = project.module
"io.github.gaelrenoux" %% "tranzactio" % "2.1.0",
"io.github.neurodyne" %% "zio-arrow" % "0.2.1",
"nl.vroste" %% "zio-amqp" % "0.2.2",
"io.github.vigoo" %% "zio-aws-core" % "3.17.56.1",
"io.github.vigoo" %% "zio-aws-ec2" % "3.17.56.1",
"io.github.vigoo" %% "zio-aws-elasticbeanstalk" % "3.17.56.1",
"io.github.vigoo" %% "zio-aws-netty" % "3.17.56.1",
"io.github.vigoo" %% "zio-aws-core" % "3.17.58.1",
"io.github.vigoo" %% "zio-aws-ec2" % "3.17.58.1",
"io.github.vigoo" %% "zio-aws-elasticbeanstalk" % "3.17.58.1",
"io.github.vigoo" %% "zio-aws-netty" % "3.17.58.1",
"io.github.neurodyne" %% "zio-aws-s3" % "0.4.13",
"io.d11" %% "zhttp" % "1.0.0.0-RC17",
"com.coralogix" %% "zio-k8s-client" % "1.3.4",
Expand All @@ -671,7 +672,8 @@ lazy val docs = project.module
"com.typesafe.slick" %% "slick-hikaricp" % "3.3.3",
"info.senia" %% "zio-test-akka-http" % "1.0.3",
"io.getquill" %% "quill-jdbc-zio" % "3.10.0"
)
),
resolvers += "Confluent" at "https://packages.confluent.io/maven"
)
.settings(macroDefinitionSettings)
.settings(mdocJS := Some(jsdocs))
Expand Down
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/zio/ZIOAppDefault.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import zio.stacktracer.TracingImplicits.disableAutoTrace
* The entry point for a ZIO application.
*
* {{{
* import zio.ZIOApp
* import zio.ZIOAppDefault
* import zio.Console._
*
* object MyApp extends ZIOAppDefault {
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Include ZIO in your project by adding the following to your `build.sbt` file:

```scala mdoc:passthrough
println(s"""```""")
println(s"""libraryDependencies += "dev.zio" %% "zio" % "${zio.BuildInfo.version.split('+').head}"""")
println(s"""libraryDependencies += "dev.zio" %% "zio" % "${java.lang.System.getenv("ZIO_LATEST_2")}"""")
println(s"""```""")
```

If you want to use ZIO streams, you should also include the following dependency:

```scala mdoc:passthrough
println(s"""```""")
println(s"""libraryDependencies += "dev.zio" %% "zio-streams" % "${zio.BuildInfo.version.split('+').head}"""")
println(s"""libraryDependencies += "dev.zio" %% "zio-streams" % "${java.lang.System.getenv("ZIO_LATEST_2")}"""")
println(s"""```""")
```

Expand Down
2 changes: 1 addition & 1 deletion docs/howto/migrate/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ object MyApp extends zio.App {
Now in ZIO 2.x, the `zio.App` trait is deprecated and, we have the `zio.ZIOAppDefault` trait which is simpler than the former approach (Note that the `ZApp` and `ManagedApp` are also deprecated, and we should use the `ZIOAppDefault` instead):

```scala mdoc:compile-only
import zio.ZIOApp
import zio.ZIOAppDefault
import zio.Console._

object MyApp extends ZIOAppDefault {
Expand Down
71 changes: 71 additions & 0 deletions docs/resources/ecosystem/community/tamer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
## Tamer

[Tamer](https://github.com/laserdisc-io/tamer) is a multi-functional Kafka connector for producing data based on [ZIO Kafka](https://github.com/zio/zio-kafka).

### Introduction

Tamer is a completely customizable source connector that produces to Kafka. It ships with preconfigured modules for SQL, cloud storage and REST API, but you can provide your own functions and Tamer will take care of the rest.

### Installation

Depending on the source you have at hand you can add the correct dependency in your `build.sbt`:

```scala
libraryDependencies += "io.laserdisc" %% "tamer-db" % "0.16.1"
libraryDependencies += "io.laserdisc" %% "tamer-oci-objectstorage" % "0.16.1"
libraryDependencies += "io.laserdisc" %% "tamer-rest" % "0.16.1"
libraryDependencies += "io.laserdisc" %% "tamer-s3" % "0.16.1"
```

### Example

Let's say you have a inventory DB that's compatible with [Doobie](https://github.com/tpolecat/doobie), you can get all of your items with just a few lines of code:

```scala
import tamer._
import tamer.db._

import doobie.implicits.legacy.instant._
import doobie.syntax.string._
import zio._
import zio.duration._
import zio.json._

import java.time.Instant

case class Row(id: String, name: String, description: Option[String], modifiedAt: Instant)
extends tamer.db.Timestamped(modifiedAt)

object Row {
implicit val rowJsonCodec = DeriveJsonCodec.gen[Row]
}

object DatabaseSimple extends zio.App {
// Here we'll go with zio-json codec, you can use avro, circe and jsoniter
// out-of-the box or plug yours!
implicit val stateKeyJsonCodec = DeriveJsonCodec.gen[tamer.Tamer.StateKey]
implicit val windowJsonCodec = DeriveJsonCodec.gen[tamer.db.Window]

val program: RIO[ZEnv, Unit] = tamer.db.DbSetup
.tumbling(window =>
sql"""SELECT id, name, description, modified_at
|FROM users
|WHERE modified_at > ${window.from} AND modified_at <= ${window.to}""".stripMargin
.query[Row]
)(
recordKey = (_, v) => v.id,
from = Instant.parse("2020-01-01T00:00:00.00Z"),
tumblingStep = 5.days
)
.runWith(dbLayerFromEnvironment ++ tamer.kafkaConfigFromEnvironment)

override final def run(args: List[String]): URIO[ZEnv, ExitCode] =
program.exitCode

// If you have other codecs like circe in the classpath you have to disambiguate
implicit lazy val stateKeyCodec: Codec[Tamer.StateKey] = Codec.optionalZioJsonCodec
implicit lazy val windowCodec: Codec[tamer.db.Window] = Codec.optionalZioJsonCodec
implicit lazy val stringCodec: Codec[String] = Codec.optionalZioJsonCodec
}
```
See full example [on the GitHub repo](https://github.com/laserdisc-io/tamer/blob/4e1a7646fb44041648d9aa3ba089decb81ebe487/example/src/main/scala/tamer/db/DatabaseSimple.scala)
36 changes: 19 additions & 17 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ object BuildHelper {
.loadFromReader(scala.io.Source.fromFile(".github/workflows/ci.yml").bufferedReader())
val yaml = doc.asInstanceOf[JMap[String, JMap[String, JMap[String, JMap[String, JMap[String, JList[String]]]]]]]
val list = yaml.get("jobs").get("test").get("strategy").get("matrix").get("scala").asScala
list.map(v => (v.split('.').take(2).mkString("."), v)).toMap
list.map { v =>
val vs = v.split('.'); val init = vs.take(vs(0) match { case "2" => 2; case _ => 1 }); (init.mkString("."), v)
}.toMap
}
val Scala211: String = versions("2.11")
val Scala212: String = versions("2.12")
val Scala213: String = versions("2.13")
val ScalaDotty: String = versions("3.0")
val Scala211: String = versions("2.11")
val Scala212: String = versions("2.12")
val Scala213: String = versions("2.13")
val Scala3: String = versions("3")

val SilencerVersion = "1.7.6"

Expand Down Expand Up @@ -63,30 +65,30 @@ object BuildHelper {
)

val dottySettings = Seq(
crossScalaVersions += ScalaDotty,
crossScalaVersions += Scala3,
scalacOptions ++= {
if (scalaVersion.value == ScalaDotty)
if (scalaVersion.value == Scala3)
Seq("-noindent")
else
Seq()
},
scalacOptions --= {
if (scalaVersion.value == ScalaDotty)
if (scalaVersion.value == Scala3)
Seq("-Xfatal-warnings")
else
Seq()
},
Compile / doc / sources := {
val old = (Compile / doc / sources).value
if (scalaVersion.value == ScalaDotty) {
if (scalaVersion.value == Scala3) {
Nil
} else {
old
}
},
Test / parallelExecution := {
val old = (Test / parallelExecution).value
if (scalaVersion.value == ScalaDotty) {
if (scalaVersion.value == Scala3) {
false
} else {
old
Expand Down Expand Up @@ -190,13 +192,13 @@ object BuildHelper {
def crossPlatformSources(scalaVer: String, platform: String, conf: String, baseDir: File) = {
val versions = CrossVersion.partialVersion(scalaVer) match {
case Some((2, 11)) =>
List("2.11", "2.11+", "2.11-2.12", "2.x")
List("2.11+", "2.11-2.12")
case Some((2, 12)) =>
List("2.12", "2.11+", "2.12+", "2.11-2.12", "2.12-2.13", "2.x")
List("2.11+", "2.12+", "2.11-2.12", "2.12-2.13")
case Some((2, 13)) =>
List("2.13", "2.11+", "2.12+", "2.13+", "2.12-2.13", "2.x")
case Some((3, 0)) =>
List("dotty", "2.11+", "2.12+", "2.13+", "3.x")
List("2.11+", "2.12+", "2.13+", "2.12-2.13")
case Some((3, _)) =>
List("2.11+", "2.12+", "2.13+")
case _ =>
List()
}
Expand Down Expand Up @@ -228,7 +230,7 @@ object BuildHelper {
ThisBuild / scalaVersion := Scala213,
scalacOptions ++= stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value),
libraryDependencies ++= {
if (scalaVersion.value == ScalaDotty)
if (scalaVersion.value == Scala3)
Seq(
"com.github.ghik" % s"silencer-lib_$Scala213" % SilencerVersion % Provided
)
Expand Down Expand Up @@ -263,7 +265,7 @@ object BuildHelper {
def macroDefinitionSettings = Seq(
scalacOptions += "-language:experimental.macros",
libraryDependencies ++= {
if (scalaVersion.value == ScalaDotty) Seq()
if (scalaVersion.value == Scala3) Seq()
else
Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided",
Expand Down
Loading