diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index d24f13f3..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,138 +0,0 @@ -name: CI -on: - pull_request: - branches: - - '*' - push: - branches: - - master -jobs: - format: - name: Format - runs-on: ubuntu-20.04 - steps: - - name: Branch Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Install Java And Sbt - uses: olafurpg/setup-scala@v10 - with: - java-version: adopt@1.11 - - name: Cache - uses: actions/cache@v2 - with: - path: | - $HOME/.cache/coursier - $HOME/.ivy2/cache - $HOME/.sbt/boot/ - $HOME/.sbt - lib_managed - target - project/target - key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Check with Scalafmt - run: sbt ++2.13.8 checkFormat - build: - name: Test - needs: format - strategy: - matrix: - scala: - - 2.12.15 - - 2.13.8 - java: - - adopt@1.11 - - adopt@1.15 - os: - - ubuntu-20.04 - runs-on: ${{ matrix.os }} - steps: - - name: Branch Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Install Java And Sbt - uses: olafurpg/setup-scala@v10 - with: - java-version: ${{ matrix.java }} - - name: Cache - uses: actions/cache@v2 - with: - path: | - $HOME/.cache/coursier - $HOME/.ivy2/cache - $HOME/.sbt/boot/ - $HOME/.sbt - lib_managed - target - project/target - key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Test (${{ matrix.scala }}, ${{ matrix.java }}) - run: sbt ++${{ matrix.scala }} ciBuild - publish_212: - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - name: Publish Snapshot 2.12 - needs: build - runs-on: ubuntu-20.04 - steps: - - name: Branch Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Install Java And Sbt - uses: olafurpg/setup-scala@v10 - with: - java-version: adopt@1.11 - - name: Cache - uses: actions/cache@v2 - with: - path: | - $HOME/.cache/coursier - $HOME/.ivy2/cache - $HOME/.sbt/boot/ - $HOME/.sbt - lib_managed - target - project/target - key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Publish Snapshot for Scala 2.12 - run: CI_SNAPSHOT_RELEASE=publish sbt ++2.12.15 releaseIt - env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - publish_213: - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - name: Publish Snapshot 2.13 - needs: publish_212 - runs-on: ubuntu-20.04 - steps: - - name: Branch Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Install Java And Sbt - uses: olafurpg/setup-scala@v10 - with: - java-version: adopt@1.11 - - name: Cache - uses: actions/cache@v2 - with: - path: | - $HOME/.cache/coursier - $HOME/.ivy2/cache - $HOME/.sbt/boot/ - $HOME/.sbt - lib_managed - target - project/target - key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Publish Snapshot for Scala 2.13 - run: CI_SNAPSHOT_RELEASE=publish sbt ++2.13.8 releaseIt - env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..88b317c1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,267 @@ +# This file was automatically generated by sbt-github-actions using the +# githubWorkflowGenerate task. You should add and commit this file to +# your git repository. It goes without saying that you shouldn't edit +# this file by hand! Instead, if you wish to make changes, you should +# change your sbt build configuration to revise the workflow description +# to meet your needs, then regenerate this file. + +name: Continuous Integration + +on: + pull_request: + branches: ['**'] + push: + branches: ['**'] + tags: [v*] + +env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + build: + name: Build and Test + strategy: + matrix: + os: [ubuntu-latest] + scala: [2.12.15, 2.13.8] + java: [temurin@8, temurin@11, temurin@17] + project: [rootJVM] + exclude: + - scala: 2.12.15 + java: temurin@11 + - scala: 2.12.15 + java: temurin@17 + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Download Java (temurin@8) + id: download-java-temurin-8 + if: matrix.java == 'temurin@8' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 + with: + distribution: jdkfile + java-version: 8 + jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} + + - name: Download Java (temurin@11) + id: download-java-temurin-11 + if: matrix.java == 'temurin@11' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 11 + + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 + with: + distribution: jdkfile + java-version: 11 + jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }} + + - name: Download Java (temurin@17) + id: download-java-temurin-17 + if: matrix.java == 'temurin@17' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 17 + + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' + uses: actions/setup-java@v2 + with: + distribution: jdkfile + java-version: 17 + jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }} + + - name: Cache sbt + uses: actions/cache@v2 + with: + path: | + ~/.sbt + ~/.ivy2/cache + ~/.coursier/cache/v1 + ~/.cache/coursier/v1 + ~/AppData/Local/Coursier/Cache/v1 + ~/Library/Caches/Coursier/v1 + key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: Check that workflows are up to date + run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' 'project /' githubWorkflowCheck + + - name: Check headers and formatting + if: matrix.java == 'temurin@8' + run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck + + - name: Test + run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' test + + - name: Check binary compatibility + if: matrix.java == 'temurin@8' + run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' mimaReportBinaryIssues + + - name: Generate API documentation + if: matrix.java == 'temurin@8' + run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' doc + + - name: Make target directories + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') + run: mkdir -p fs2/target target .js/target .jvm/target zio/target .native/target core/target interop/target project/target + + - name: Compress target directories + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') + run: tar cf targets.tar fs2/target target .js/target .jvm/target zio/target .native/target core/target interop/target project/target + + - name: Upload target directories + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') + uses: actions/upload-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }} + path: targets.tar + + publish: + name: Publish Artifacts + needs: [build] + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') + strategy: + matrix: + os: [ubuntu-latest] + scala: [2.13.8] + java: [temurin@8] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Download Java (temurin@8) + id: download-java-temurin-8 + if: matrix.java == 'temurin@8' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 + with: + distribution: jdkfile + java-version: 8 + jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} + + - name: Download Java (temurin@11) + id: download-java-temurin-11 + if: matrix.java == 'temurin@11' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 11 + + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 + with: + distribution: jdkfile + java-version: 11 + jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }} + + - name: Download Java (temurin@17) + id: download-java-temurin-17 + if: matrix.java == 'temurin@17' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 17 + + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' + uses: actions/setup-java@v2 + with: + distribution: jdkfile + java-version: 17 + jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }} + + - name: Cache sbt + uses: actions/cache@v2 + with: + path: | + ~/.sbt + ~/.ivy2/cache + ~/.coursier/cache/v1 + ~/.cache/coursier/v1 + ~/AppData/Local/Coursier/Cache/v1 + ~/Library/Caches/Coursier/v1 + key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: Download target directories (2.12.15, rootJVM) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15-rootJVM + + - name: Inflate target directories (2.12.15, rootJVM) + run: | + tar xf targets.tar + rm targets.tar + + - name: Download target directories (2.13.8, rootJVM) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJVM + + - name: Inflate target directories (2.13.8, rootJVM) + run: | + tar xf targets.tar + rm targets.tar + + - name: Download target directories (2.13.8, rootJVM) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJVM + + - name: Inflate target directories (2.13.8, rootJVM) + run: | + tar xf targets.tar + rm targets.tar + + - name: Download target directories (2.13.8, rootJVM) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJVM + + - name: Inflate target directories (2.13.8, rootJVM) + run: | + tar xf targets.tar + rm targets.tar + + - name: Import signing key + if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' + run: echo $PGP_SECRET | base64 -di | gpg --import + + - name: Import signing key and strip passphrase + if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != '' + run: | + echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg + echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg + (echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1) + + - name: Publish + run: sbt '++${{ matrix.scala }}' tlRelease diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml new file mode 100644 index 00000000..547aaa43 --- /dev/null +++ b/.github/workflows/clean.yml @@ -0,0 +1,59 @@ +# This file was automatically generated by sbt-github-actions using the +# githubWorkflowGenerate task. You should add and commit this file to +# your git repository. It goes without saying that you shouldn't edit +# this file by hand! Instead, if you wish to make changes, you should +# change your sbt build configuration to revise the workflow description +# to meet your needs, then regenerate this file. + +name: Clean + +on: push + +jobs: + delete-artifacts: + name: Delete Artifacts + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Delete artifacts + run: | + # Customize those three lines with your repository and credentials: + REPO=${GITHUB_API_URL}/repos/${{ github.repository }} + + # A shortcut to call GitHub API. + ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; } + + # A temporary file which receives HTTP response headers. + TMPFILE=/tmp/tmp.$$ + + # An associative array, key: artifact name, value: number of artifacts of that name. + declare -A ARTCOUNT + + # Process all artifacts on this repository, loop on returned "pages". + URL=$REPO/actions/artifacts + while [[ -n "$URL" ]]; do + + # Get current page, get response headers in a temporary file. + JSON=$(ghapi --dump-header $TMPFILE "$URL") + + # Get URL of next page. Will be empty if we are at the last page. + URL=$(grep '^Link:' "$TMPFILE" | tr ',' '\n' | grep 'rel="next"' | head -1 | sed -e 's/.*.*//') + rm -f $TMPFILE + + # Number of artifacts on this page: + COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') )) + + # Loop on all artifacts on this page. + for ((i=0; $i < $COUNT; i++)); do + + # Get name of artifact and count instances of this name. + name=$(jq <<<$JSON -r ".artifacts[$i].name?") + ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1)) + + id=$(jq <<<$JSON -r ".artifacts[$i].id?") + size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") )) + printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size + ghapi -X DELETE $REPO/actions/artifacts/$id + done + done diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 67f26c0f..00000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,73 +0,0 @@ -name: Release -on: - release: - types: - - created -jobs: - release_212: - name: Release 2.12 - runs-on: ubuntu-20.04 - steps: - - name: Branch Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Install Java And Sbt - uses: olafurpg/setup-scala@v10 - with: - java-version: adopt@1.11 - - name: Setup Gpg - uses: olafurpg/setup-gpg@v3 - - name: Cache - uses: actions/cache@v2 - with: - path: | - $HOME/.cache/coursier - $HOME/.ivy2/cache - $HOME/.sbt/boot/ - $HOME/.sbt - lib_managed - target - project/target - key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Release for Scala 2.12 - run: CI_RELEASE=publishSigned sbt ++2.12.15 releaseIt - env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - release_213: - name: Release 2.13 - needs: release_212 - runs-on: ubuntu-20.04 - steps: - - name: Branch Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Install Java And Sbt - uses: olafurpg/setup-scala@v10 - with: - java-version: adopt@1.11 - - name: Setup Gpg - uses: olafurpg/setup-gpg@v3 - - name: Cache - uses: actions/cache@v2 - with: - path: | - $HOME/.cache/coursier - $HOME/.ivy2/cache - $HOME/.sbt/boot/ - $HOME/.sbt - lib_managed - target - project/target - key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Release for Scala 2.13 - run: CI_RELEASE=publishSigned sbt ++2.13.8 releaseIt - env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/build.sbt b/build.sbt index 063a1e96..9a397783 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ -lazy val scala_212 = "2.12.15" -lazy val scala_213 = "2.13.8" +val scala_212 = "2.12.15" +val scala_213 = "2.13.8" -lazy val versionOf = new { +val versionOf = new { val cats = "2.7.0" val catsEffect = "3.3.7" val fs2 = "3.2.5" @@ -15,52 +15,10 @@ lazy val versionOf = new { val silencer = "1.7.8" } -lazy val scala212Options = Seq( - "-deprecation", - "-encoding", - "UTF-8", - "-explaintypes", - "-Yrangepos", - "-feature", - "-Xfuture", - "-Ypartial-unification", - "-language:higherKinds", - "-language:existentials", - "-unchecked", - "-Yno-adapted-args", - "-Xlint:_,-type-parameter-shadow", - "-Xsource:2.13", - "-Ywarn-dead-code", - "-Ywarn-inaccessible", - "-Ywarn-infer-any", - "-Ywarn-nullary-override", - "-Ywarn-nullary-unit", - "-Ywarn-numeric-widen", - "-Ywarn-value-discard", - "-Xfatal-warnings", - "-opt:l:inline", - "-Ywarn-unused:imports", - "-Ywarn-unused:_,imports", - "-opt-warnings", - "-Xlint:constant", - "-Ywarn-extra-implicit", - "-opt-inline-from:" -) - -lazy val scala213Options = scala212Options diff Seq( - "-Ywarn-nullary-override", - "-Ypartial-unification", - "-Ywarn-nullary-unit", - "-Ywarn-inaccessible", - "-Ywarn-infer-any", - "-Yno-adapted-args", - "-Xfuture" -) - lazy val coreDependencies = Seq( "org.log4s" %% "log4s" % versionOf.log4s, "com.outr" %% "scribe" % versionOf.scribe -) map (_.withSources) +).map(_.withSources) lazy val fs2Dependencies = Seq( "org.log4s" %% "log4s" % versionOf.log4s, @@ -68,19 +26,19 @@ lazy val fs2Dependencies = Seq( "org.typelevel" %% "cats-core" % versionOf.cats, "org.typelevel" %% "cats-effect" % versionOf.catsEffect, "co.fs2" %% "fs2-core" % versionOf.fs2 -) map (_.withSources) +).map(_.withSources) lazy val zioDependencies = Seq( "org.log4s" %% "log4s" % versionOf.log4s, "com.outr" %% "scribe" % versionOf.scribe, "dev.zio" %% "zio" % versionOf.zio -) map (_.withSources) +).map(_.withSources) lazy val interopDependencies = Seq( "org.typelevel" %% "log4cats-core" % versionOf.log4cats, "org.typelevel" %% "log4cats-slf4j" % versionOf.log4cats % Test, "org.typelevel" %% "cats-effect" % versionOf.catsEffect % Test -) map (_.withSources) +).map(_.withSources) lazy val testDependencies = Seq( "org.scalacheck" %% "scalacheck" % versionOf.scalaCheck % Test, @@ -98,62 +56,27 @@ lazy val compilerPluginsDependencies = Seq( "com.github.ghik" %% "silencer-lib" % versionOf.silencer % Provided cross CrossVersion.full ) -lazy val crossBuildSettings = Seq( - scalaVersion := scala_213, - crossScalaVersions := Seq(scala_212, scala_213), - libraryDependencies ++= testDependencies ++ compilerPluginsDependencies, - Test / parallelExecution := false, - scalacOptions ++= - (CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 12)) => scala212Options - case _ => scala213Options - }) +ThisBuild / tlBaseVersion := "0.16" +ThisBuild / tlCiReleaseBranches := Seq("master") +ThisBuild / organization := "io.laserdisc" +ThisBuild / organizationName := "LaserDisc" +ThisBuild / licenses := Seq(License.MIT) +ThisBuild / developers := List(tlGitHubDev("barambani", "Filippo Mariotti")) +ThisBuild / crossScalaVersions := Seq(scala_212, scala_213) +ThisBuild / scalaVersion := scala_213 +ThisBuild / githubWorkflowJavaVersions := Seq( + JavaSpec.temurin("8"), + JavaSpec.temurin("11"), + JavaSpec.temurin("17") ) +ThisBuild / Test / parallelExecution := false -lazy val releaseSettings: Seq[Def.Setting[_]] = Seq( - Test / publishArtifact := false, - pomIncludeRepository := { _ => false }, - organization := "io.laserdisc", - homepage := Some(url("http://laserdisc.io")), - developers := List( - Developer("barambani", "Filippo Mariotti", "", url("https://github.com/barambani")) - ), - scmInfo := Some( - ScmInfo( - url("https://github.com/laserdisc-io/log-effect/tree/master"), - "scm:git:git@github.com:laserdisc-io/log-effect.git", - "scm:git:git@github.com:laserdisc-io/log-effect.git" - ) - ), - licenses := Seq( - "MIT License" -> - url("https://raw.githubusercontent.com/laserdisc-io/log-effect/master/LICENSE") - ) -) +ThisBuild / libraryDependencies ++= testDependencies ++ compilerPluginsDependencies -lazy val root = project - .in(file(".")) - .aggregate(core, fs2, zio, interop) - .settings(crossBuildSettings) - .settings(releaseSettings) - .settings( - name := "log-effect", - publishArtifact := false, - addCommandAlias("fmt", "scalafmt;Test/scalafmt;scalafmtSbt"), - addCommandAlias("checkFormat", "scalafmtCheck;Test/scalafmtCheck;scalafmtSbtCheck"), - addCommandAlias("ciBuild", "clean;test"), - addCommandAlias("fullBuild", "checkFormat;ciBuild"), - addCommandAlias( - "setReleaseOptions", - "set scalacOptions ++= Seq(\"-opt:l:method\", \"-opt:l:inline\", \"-opt-inline-from:laserdisc.**\", \"-opt-inline-from:\")" - ), - addCommandAlias("releaseIt", "clean;setReleaseOptions;session list;compile;ci-release") - ) +lazy val root = tlCrossRootProject.aggregate(core, fs2, zio, interop) lazy val core = project .in(file("core")) - .settings(crossBuildSettings) - .settings(releaseSettings) .settings( name := "log-effect-core", libraryDependencies ++= coreDependencies @@ -162,8 +85,6 @@ lazy val core = project lazy val fs2 = project .in(file("fs2")) .dependsOn(core) - .settings(crossBuildSettings) - .settings(releaseSettings) .settings( name := "log-effect-fs2", libraryDependencies ++= fs2Dependencies @@ -172,8 +93,6 @@ lazy val fs2 = project lazy val zio = project .in(file("zio")) .dependsOn(core) - .settings(crossBuildSettings) - .settings(releaseSettings) .settings( name := "log-effect-zio", libraryDependencies ++= zioDependencies @@ -182,8 +101,6 @@ lazy val zio = project lazy val interop = project .in(file("interop")) .dependsOn(core, fs2) - .settings(crossBuildSettings) - .settings(releaseSettings) .settings( name := "log-effect-interop", libraryDependencies ++= interopDependencies diff --git a/core/src/main/scala/log/effect/Failure.scala b/core/src/main/scala/log/effect/Failure.scala index 7cc1f86f..c4265a40 100644 --- a/core/src/main/scala/log/effect/Failure.scala +++ b/core/src/main/scala/log/effect/Failure.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect import log.effect.internal.Show diff --git a/core/src/main/scala/log/effect/LogLevel.scala b/core/src/main/scala/log/effect/LogLevel.scala index c56788d6..9c7d49d6 100644 --- a/core/src/main/scala/log/effect/LogLevel.scala +++ b/core/src/main/scala/log/effect/LogLevel.scala @@ -1,10 +1,29 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect import com.github.ghik.silencer.silent import log.effect.internal.Show -import scala.language.implicitConversions - sealed trait LogLevel extends Product with Serializable object LogLevel extends LogLevelSyntax { import LogLevels._ diff --git a/core/src/main/scala/log/effect/LogWriter.scala b/core/src/main/scala/log/effect/LogWriter.scala index dc29396d..e78eee2f 100644 --- a/core/src/main/scala/log/effect/LogWriter.scala +++ b/core/src/main/scala/log/effect/LogWriter.scala @@ -1,10 +1,29 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect import com.github.ghik.silencer.silent import log.effect.internal.{Id, Show} -import scala.language.implicitConversions - trait LogWriter[F[_]] { def write[A: Show](level: LogLevel, a: =>A): F[Unit] } diff --git a/core/src/main/scala/log/effect/LogWriterConstructor.scala b/core/src/main/scala/log/effect/LogWriterConstructor.scala index 8626ae1c..5bd1bb12 100644 --- a/core/src/main/scala/log/effect/LogWriterConstructor.scala +++ b/core/src/main/scala/log/effect/LogWriterConstructor.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect import java.util.{logging => jul} diff --git a/core/src/main/scala/log/effect/internal/EffectSuspension.scala b/core/src/main/scala/log/effect/internal/EffectSuspension.scala index be6653c2..dad827a1 100644 --- a/core/src/main/scala/log/effect/internal/EffectSuspension.scala +++ b/core/src/main/scala/log/effect/internal/EffectSuspension.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package internal diff --git a/core/src/main/scala/log/effect/internal/Functor.scala b/core/src/main/scala/log/effect/internal/Functor.scala index d5914721..0d2eeab7 100644 --- a/core/src/main/scala/log/effect/internal/Functor.scala +++ b/core/src/main/scala/log/effect/internal/Functor.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package internal diff --git a/core/src/main/scala/log/effect/internal/Show.scala b/core/src/main/scala/log/effect/internal/Show.scala index 8da25dce..dc188de8 100644 --- a/core/src/main/scala/log/effect/internal/Show.scala +++ b/core/src/main/scala/log/effect/internal/Show.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package internal diff --git a/core/src/main/scala/log/effect/internal/package.scala b/core/src/main/scala/log/effect/internal/package.scala index 1a015ec7..5901dc05 100644 --- a/core/src/main/scala/log/effect/internal/package.scala +++ b/core/src/main/scala/log/effect/internal/package.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package object internal { diff --git a/core/src/main/scala/log/effect/internal/syntax/FunctorSyntax.scala b/core/src/main/scala/log/effect/internal/syntax/FunctorSyntax.scala index b2dc8243..e19bc9de 100644 --- a/core/src/main/scala/log/effect/internal/syntax/FunctorSyntax.scala +++ b/core/src/main/scala/log/effect/internal/syntax/FunctorSyntax.scala @@ -1,9 +1,28 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package internal package syntax -import scala.language.implicitConversions - private[syntax] trait FunctorSyntax { implicit final def functorSyntax[F[_], A](fa: F[A]): FunctorOps[F, A] = new FunctorOps(fa) } diff --git a/core/src/main/scala/log/effect/internal/syntax/ShowSyntax.scala b/core/src/main/scala/log/effect/internal/syntax/ShowSyntax.scala index 645a6d4b..ec62e5f8 100644 --- a/core/src/main/scala/log/effect/internal/syntax/ShowSyntax.scala +++ b/core/src/main/scala/log/effect/internal/syntax/ShowSyntax.scala @@ -1,9 +1,28 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package internal package syntax -import scala.language.implicitConversions - private[syntax] trait ShowSyntax { implicit final def showSyntax[A](a: A): ShowOps[A] = new ShowOps(a) } diff --git a/core/src/main/scala/log/effect/internal/syntax/package.scala b/core/src/main/scala/log/effect/internal/syntax/package.scala index c85ba205..1707351a 100644 --- a/core/src/main/scala/log/effect/internal/syntax/package.scala +++ b/core/src/main/scala/log/effect/internal/syntax/package.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package internal diff --git a/core/src/test/scala/LogWriterSyntaxResolutionTest.scala b/core/src/test/scala/LogWriterSyntaxResolutionTest.scala index b99679a8..47eec728 100644 --- a/core/src/test/scala/LogWriterSyntaxResolutionTest.scala +++ b/core/src/test/scala/LogWriterSyntaxResolutionTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import com.github.ghik.silencer.silent import log.effect.internal.Show import org.scalatest.wordspec.AnyWordSpecLike diff --git a/fs2/src/main/scala/log/effect/fs2/Fs2LogWriter.scala b/fs2/src/main/scala/log/effect/fs2/Fs2LogWriter.scala index 8a1bb715..17c979e4 100644 --- a/fs2/src/main/scala/log/effect/fs2/Fs2LogWriter.scala +++ b/fs2/src/main/scala/log/effect/fs2/Fs2LogWriter.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package fs2 diff --git a/fs2/src/main/scala/log/effect/fs2/LogSelector.scala b/fs2/src/main/scala/log/effect/fs2/LogSelector.scala index d612eacb..94fab39c 100644 --- a/fs2/src/main/scala/log/effect/fs2/LogSelector.scala +++ b/fs2/src/main/scala/log/effect/fs2/LogSelector.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package fs2 diff --git a/fs2/src/main/scala/log/effect/fs2/SyncLogWriter.scala b/fs2/src/main/scala/log/effect/fs2/SyncLogWriter.scala index bbe5b421..9a64dca6 100644 --- a/fs2/src/main/scala/log/effect/fs2/SyncLogWriter.scala +++ b/fs2/src/main/scala/log/effect/fs2/SyncLogWriter.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package fs2 diff --git a/fs2/src/main/scala/log/effect/fs2/interop/show.scala b/fs2/src/main/scala/log/effect/fs2/interop/show.scala index 7071a587..cf4d09ad 100644 --- a/fs2/src/main/scala/log/effect/fs2/interop/show.scala +++ b/fs2/src/main/scala/log/effect/fs2/interop/show.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package fs2 package interop diff --git a/fs2/src/main/scala/log/effect/fs2/mtl/readerT.scala b/fs2/src/main/scala/log/effect/fs2/mtl/readerT.scala index bbe8863d..38408440 100644 --- a/fs2/src/main/scala/log/effect/fs2/mtl/readerT.scala +++ b/fs2/src/main/scala/log/effect/fs2/mtl/readerT.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package fs2 package mtl diff --git a/fs2/src/main/scala/log/effect/fs2/syntax/Fs2LogEffectSyntax.scala b/fs2/src/main/scala/log/effect/fs2/syntax/Fs2LogEffectSyntax.scala index d406454f..95ea6015 100644 --- a/fs2/src/main/scala/log/effect/fs2/syntax/Fs2LogEffectSyntax.scala +++ b/fs2/src/main/scala/log/effect/fs2/syntax/Fs2LogEffectSyntax.scala @@ -1,11 +1,30 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package fs2 package syntax import _root_.fs2.Stream -import scala.language.implicitConversions - private[syntax] trait Fs2LogEffectSyntax extends Fs2LogEffectCompanionSyntax { implicit def fs2LogEffectSyntax[F[_]](aLogWriter: LogWriter[F]): Fs2LogEffectOps[F] = new Fs2LogEffectOps(aLogWriter) diff --git a/fs2/src/main/scala/log/effect/fs2/syntax/package.scala b/fs2/src/main/scala/log/effect/fs2/syntax/package.scala index 820b7a76..c7fb3be0 100644 --- a/fs2/src/main/scala/log/effect/fs2/syntax/package.scala +++ b/fs2/src/main/scala/log/effect/fs2/syntax/package.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package fs2 diff --git a/fs2/src/test/scala/LogSelectorTest.scala b/fs2/src/test/scala/LogSelectorTest.scala index 1aa9f47a..f30f4776 100644 --- a/fs2/src/test/scala/LogSelectorTest.scala +++ b/fs2/src/test/scala/LogSelectorTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import cats.effect.{IO, Resource, Sync} import log.effect.LogWriter import log.effect.fs2.{LogSelector, TestLogCapture} diff --git a/fs2/src/test/scala/LogWriterResolutionTest.scala b/fs2/src/test/scala/LogWriterResolutionTest.scala index e1a6ae9b..91f7c0dc 100644 --- a/fs2/src/test/scala/LogWriterResolutionTest.scala +++ b/fs2/src/test/scala/LogWriterResolutionTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import cats.Applicative import cats.syntax.functor._ import com.github.ghik.silencer.silent diff --git a/fs2/src/test/scala/ReadmeConstructionCodeSnippetsTest.scala b/fs2/src/test/scala/ReadmeConstructionCodeSnippetsTest.scala index 915c1646..ee38c1b9 100644 --- a/fs2/src/test/scala/ReadmeConstructionCodeSnippetsTest.scala +++ b/fs2/src/test/scala/ReadmeConstructionCodeSnippetsTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import com.github.ghik.silencer.silent import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike diff --git a/fs2/src/test/scala/ReadmeLogSubmissionCodeSnippetsTest.scala b/fs2/src/test/scala/ReadmeLogSubmissionCodeSnippetsTest.scala index aa0a37eb..1ab15dbb 100644 --- a/fs2/src/test/scala/ReadmeLogSubmissionCodeSnippetsTest.scala +++ b/fs2/src/test/scala/ReadmeLogSubmissionCodeSnippetsTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import com.github.ghik.silencer.silent import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike diff --git a/fs2/src/test/scala/log/effect/fs2/TestLogCapture.scala b/fs2/src/test/scala/log/effect/fs2/TestLogCapture.scala index 624846f4..c936948b 100644 --- a/fs2/src/test/scala/log/effect/fs2/TestLogCapture.scala +++ b/fs2/src/test/scala/log/effect/fs2/TestLogCapture.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package fs2 diff --git a/interop/src/main/scala/log/effect/interop/Log4catsInterop.scala b/interop/src/main/scala/log/effect/interop/Log4catsInterop.scala index 667f0992..a67a0f7e 100644 --- a/interop/src/main/scala/log/effect/interop/Log4catsInterop.scala +++ b/interop/src/main/scala/log/effect/interop/Log4catsInterop.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package interop diff --git a/interop/src/main/scala/log/effect/interop/package.scala b/interop/src/main/scala/log/effect/interop/package.scala index c4323454..11386b92 100644 --- a/interop/src/main/scala/log/effect/interop/package.scala +++ b/interop/src/main/scala/log/effect/interop/package.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package object interop { diff --git a/interop/src/test/scala/InteropLogSelectorTest.scala b/interop/src/test/scala/InteropLogSelectorTest.scala index 718d2805..f1457936 100644 --- a/interop/src/test/scala/InteropLogSelectorTest.scala +++ b/interop/src/test/scala/InteropLogSelectorTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import cats.effect.{IO, Resource, Sync} import cats.syntax.flatMap._ import com.github.ghik.silencer.silent diff --git a/interop/src/test/scala/InteropTest.scala b/interop/src/test/scala/InteropTest.scala index 17afe1dc..df512ba8 100644 --- a/interop/src/test/scala/InteropTest.scala +++ b/interop/src/test/scala/InteropTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import com.github.ghik.silencer.silent import log.effect.interop.TestLogCapture import org.scalatest.matchers.should.Matchers diff --git a/interop/src/test/scala/log/effect/interop/TestLogCapture.scala b/interop/src/test/scala/log/effect/interop/TestLogCapture.scala index d3273d3a..3ab4558b 100644 --- a/interop/src/test/scala/log/effect/interop/TestLogCapture.scala +++ b/interop/src/test/scala/log/effect/interop/TestLogCapture.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package interop diff --git a/project/plugins.sbt b/project/plugins.sbt index d5fb5c99..0a773df2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1 @@ -addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.6") diff --git a/zio/src/main/scala/log/effect/zio/ZioLogWriter.scala b/zio/src/main/scala/log/effect/zio/ZioLogWriter.scala index 72664193..4dcafc5c 100644 --- a/zio/src/main/scala/log/effect/zio/ZioLogWriter.scala +++ b/zio/src/main/scala/log/effect/zio/ZioLogWriter.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package zio diff --git a/zio/src/test/scala/ConsoleLogWriterTest.scala b/zio/src/test/scala/ConsoleLogWriterTest.scala index f85f6613..3bd1420b 100644 --- a/zio/src/test/scala/ConsoleLogWriterTest.scala +++ b/zio/src/test/scala/ConsoleLogWriterTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import java.io.{ByteArrayOutputStream, PrintStream} import _root_.zio._ diff --git a/zio/src/test/scala/Log4sLogWriterTest.scala b/zio/src/test/scala/Log4sLogWriterTest.scala index 4a7aee0c..5b143525 100644 --- a/zio/src/test/scala/Log4sLogWriterTest.scala +++ b/zio/src/test/scala/Log4sLogWriterTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import com.github.ghik.silencer.silent import log.effect.zio.TestLogCapture import log.effect.zio.ZioLogWriter.log4sFromLogger diff --git a/zio/src/test/scala/LogWriterResolutionTest.scala b/zio/src/test/scala/LogWriterResolutionTest.scala index 83c0e70c..0ed969cb 100644 --- a/zio/src/test/scala/LogWriterResolutionTest.scala +++ b/zio/src/test/scala/LogWriterResolutionTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import com.github.ghik.silencer.silent import log.effect.internal import org.scalatest.wordspec.AnyWordSpecLike diff --git a/zio/src/test/scala/ReadmeLayerConstructionCodeSnippetsTest.scala b/zio/src/test/scala/ReadmeLayerConstructionCodeSnippetsTest.scala index a467ad91..dee8bab4 100644 --- a/zio/src/test/scala/ReadmeLayerConstructionCodeSnippetsTest.scala +++ b/zio/src/test/scala/ReadmeLayerConstructionCodeSnippetsTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import com.github.ghik.silencer.silent import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike diff --git a/zio/src/test/scala/ReadmeRioConstructionCodeSnippetsTest.scala b/zio/src/test/scala/ReadmeRioConstructionCodeSnippetsTest.scala index a7c4fbfe..4e951ef9 100644 --- a/zio/src/test/scala/ReadmeRioConstructionCodeSnippetsTest.scala +++ b/zio/src/test/scala/ReadmeRioConstructionCodeSnippetsTest.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + import com.github.ghik.silencer.silent import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike diff --git a/zio/src/test/scala/log/effect/zio/TestLogCapture.scala b/zio/src/test/scala/log/effect/zio/TestLogCapture.scala index 222cc52f..a607e8b1 100644 --- a/zio/src/test/scala/log/effect/zio/TestLogCapture.scala +++ b/zio/src/test/scala/log/effect/zio/TestLogCapture.scala @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2022 LaserDisc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package log.effect package zio