Skip to content

Commit

Permalink
bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
massimosiani committed Apr 13, 2024
1 parent 464b092 commit 4ff11ab
Show file tree
Hide file tree
Showing 16 changed files with 86 additions and 83 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,49 +29,49 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13]
java: [temurin@8]
java: [temurin@11]
project: [rootJVM]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@8)
id: setup-java-temurin-8
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v3
- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 11
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
run: sbt +update

- name: Check that workflows are up to date
run: sbt githubWorkflowCheck

- name: Check headers and formatting
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck

- name: Check scalafix lints
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check'

- name: Test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

- name: Check binary compatibility
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues

- name: Generate API documentation
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc

- name: Make target directories
Expand All @@ -84,7 +84,7 @@ jobs:

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
path: targets.tar
Expand All @@ -96,29 +96,29 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
java: [temurin@8]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@8)
id: setup-java-temurin-8
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v3
- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 11
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
run: sbt +update

- name: Download target directories (2.13, rootJVM)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM

Expand All @@ -132,15 +132,15 @@ jobs:
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: echo $PGP_SECRET | base64 -di | gpg --import
run: echo $PGP_SECRET | base64 -d -i - | gpg --import

- name: Import signing key and strip passphrase
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: |
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
echo "$PGP_SECRET" | base64 -d -i - > /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)
Expand All @@ -157,25 +157,25 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
java: [temurin@8]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@8)
id: setup-java-temurin-8
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v3
- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 11
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
run: sbt +update

- name: Submit Dependencies
Expand All @@ -189,25 +189,25 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
java: [temurin@8]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@8)
id: setup-java-temurin-8
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v3
- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 11
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
run: sbt +update

- name: Generate site
Expand Down
2 changes: 1 addition & 1 deletion .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ OrganizeImports.groups = [
"*"
"re:(javax?|scala)\\."
]
OrganizeImports.importSelectorsOrder = Ascii
OrganizeImports.importSelectorsOrder = SymbolsFirst
OrganizeImports.importsOrder = Ascii
OrganizeImports.preset = DEFAULT
OrganizeImports.removeUnused = true
Expand Down
12 changes: 10 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.7.12"
version = "3.8.1"
maxColumn = 120
align.preset = most
align.stripMargin = true
Expand All @@ -11,13 +11,21 @@ optIn.breakChainOnFirstMethodDot = false
newlines.avoidInResultType = true
newlines.beforeCurlyLambdaParams = multilineWithCaseOnly
rewrite.rules = [Imports, PreferCurlyFors, RedundantBraces, RedundantParens, SortModifiers]
# rewrite.imports.sort = original
rewrite.imports.sort = original
rewrite.redundantBraces.stringInterpolation = true
rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.newSyntax.control = false
rewrite.scala3.newSyntax.deprecated = true
rewriteTokens {
"⇒" = "=>"
"→" = "->"
"←" = "<-"
}
runner.dialect = scala3
runner.dialectOverride.allowAsForImportRename = true
runner.dialectOverride.allowPostfixStarVarargSplices = true
runner.dialectOverride.allowQuestionMarkAsTypeWildcard = true
runner.dialectOverride.allowSignificantIndentation = false
runner.dialectOverride.allowStarWildcardImport = true
spaces.inImportCurlyBraces = false
trailingCommas = multiple
7 changes: 3 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import laika.ast.Path.Root
import laika.ast.Styles
import laika.helium.config.{HeliumIcon, IconLink, ThemeNavigationSection, TextLink}
import laika.helium.config.{HeliumIcon, IconLink, TextLink, ThemeNavigationSection}
import Dependencies.versions._

ThisBuild / tlBaseVersion := "0.3"
Expand All @@ -15,17 +15,16 @@ ThisBuild / developers := List(
ThisBuild / tlCiHeaderCheck := true
ThisBuild / tlCiScalafixCheck := true
ThisBuild / tlCiScalafmtCheck := true
ThisBuild / tlJdkRelease := Some(11)
ThisBuild / tlMimaPreviousVersions := Set.empty // TODO: remove after release
ThisBuild / tlSiteIsTypelevelProject := None
ThisBuild / tlSitePublishBranch := Some("main")
ThisBuild / tlSonatypeUseLegacyHost := false

val Scala213 = "2.13.11"
val Scala213 = "2.13.13"
ThisBuild / crossScalaVersions := Seq(Scala213)
ThisBuild / scalaVersion := Scala213 // the default Scala

ThisBuild / scalacOptions ++= (if (tlIsScala3.value) Seq() else Seq("-language:implicitConversions", "-Xsource:3"))

lazy val root = tlCrossRootProject.aggregate(natchezAkkaHttp, natchezPekkoHttp, exampleTapir, exampleVanillaAkka, tests)

lazy val natchezAkkaHttp = crossProject(JVMPlatform)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Massimo Siani
* Copyright 2024 Massimo Siani
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Massimo Siani
* Copyright 2024 Massimo Siani
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Massimo Siani
* Copyright 2024 Massimo Siani
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,11 +31,11 @@ trait EntryPointOps[F[_]] {
def liftT(routes: Kleisli[F, Span[F], Route])(implicit A: Async[F], D: Dispatcher[F]): Route = { requestContext =>
val request = requestContext.request
val kernel = toKernel(request)
D.unsafeToFuture(
self
.continueOrElseRoot(name = request.uri.path.toString(), kernel = kernel)
.use(span => routes.run(span).flatMap(route => A.fromFuture(A.delay(route(requestContext)))))
)
D.unsafeToFuture(
self
.continueOrElseRoot(name = request.uri.path.toString(), kernel = kernel)
.use(span => routes.run(span).flatMap(route => A.fromFuture(A.delay(route(requestContext)))))
)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Massimo Siani
* Copyright 2024 Massimo Siani
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -100,7 +100,7 @@ object NatchezAkkaHttp {
case Outcome.Errored(e) => addRequestFields(requestContext.request) *> addErrorFields(e)
case Outcome.Canceled() =>
addRequestFields(requestContext.request) *> Trace[F]
.put(("cancelled", TraceValue.BooleanValue(true)), Tags.error(true))
.put(("cancelled", TraceValue.BooleanValue(value = true)), Tags.error(bool = true))
}

private def addErrorFields[F[_]: Trace](e: Throwable): F[Unit] = Trace[F].attachError(e)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Massimo Siani
* Copyright 2024 Massimo Siani
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,11 +31,11 @@ trait EntryPointOps[F[_]] {
def liftT(routes: Kleisli[F, Span[F], Route])(implicit A: Async[F], D: Dispatcher[F]): Route = { requestContext =>
val request = requestContext.request
val kernel = toKernel(request)
D.unsafeToFuture(
self
.continueOrElseRoot(name = request.uri.path.toString(), kernel = kernel)
.use(span => routes.run(span).flatMap(route => A.fromFuture(A.delay(route(requestContext)))))
)
D.unsafeToFuture(
self
.continueOrElseRoot(name = request.uri.path.toString(), kernel = kernel)
.use(span => routes.run(span).flatMap(route => A.fromFuture(A.delay(route(requestContext)))))
)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Massimo Siani
* Copyright 2024 Massimo Siani
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -100,7 +100,7 @@ object NatchezPekkoHttp {
case Outcome.Errored(e) => addRequestFields(requestContext.request) *> addErrorFields(e)
case Outcome.Canceled() =>
addRequestFields(requestContext.request) *> Trace[F]
.put(("cancelled", TraceValue.BooleanValue(true)), Tags.error(true))
.put(("cancelled", TraceValue.BooleanValue(value = true)), Tags.error(bool = true))
}

private def addErrorFields[F[_]: Trace](e: Throwable): F[Unit] = Trace[F].attachError(e)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Massimo Siani
* Copyright 2024 Massimo Siani
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Massimo Siani
* Copyright 2024 Massimo Siani
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
12 changes: 6 additions & 6 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ object Dependencies {
object versions {
val akka = "2.6.21"
val akkaHttp = "10.2.10"
val catsEffect = "3.5.1"
val catsEffect = "3.5.4"
val log4cats = "2.6.0"
val log4j = "2.20.0"
val log4j = "2.23.1"
val munit = "0.7.29"
val natchez = "0.3.3"
val pekko = "1.0.1"
val pekkoHttp = "1.0.0"
val natchez = "0.3.5"
val pekko = "1.0.2"
val pekkoHttp = "1.0.1"
val scalacheck = "1.17.0"
val tapir = "1.7.0"
val tapir = "1.10.4"
}
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.3
sbt.version=1.9.9
Loading

0 comments on commit 4ff11ab

Please sign in to comment.