Skip to content

Commit

Permalink
Merge branch 'main' into feature/auth-header
Browse files Browse the repository at this point in the history
  • Loading branch information
fedefernandez authored Nov 17, 2023
2 parents 7ca6b9a + 7589d64 commit e0a4e94
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 55 deletions.
13 changes: 6 additions & 7 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Cats jvmopts see https://weblogs.java.net/blog/kcpeppe/archive/2013/12/11/case-study-jvm-hotspot-flags
-Xms2G
-Xmx6G
-Xss64m
-XX:MaxMetaspaceSize=1024M
-XX:ReservedCodeCacheSize=250M
-Dfile.encoding=UTF8
-Xms1G
-Xmx5G
-Xss128m
-XX:ReservedCodeCacheSize=500M
-XX:+TieredCompilation
-XX:-UseGCOverheadLimit
-XX:+UseParallelGC
8 changes: 7 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.6.1
version = 3.7.17

style = defaultWithAlign
maxColumn = 100
Expand All @@ -7,6 +7,12 @@ runner {
dialect = scala213
}

fileOverride {
"glob:**/github4s/shared/src/test/scala-3/**" {
runner.dialect = scala3
}
}

continuationIndent.callSite = 2

newlines {
Expand Down
5 changes: 2 additions & 3 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ These are the people that have contributed to the _github4s_ project:
- [![47erbot](https://avatars.githubusercontent.com/u/24799081?v=4&s=20) **47erbot**](https://github.com/47erbot)
- [![BenFradet](https://avatars.githubusercontent.com/u/1737211?v=4&s=20) **BenFradet**](https://github.com/BenFradet)
- [![juanpedromoreno](https://avatars.githubusercontent.com/u/4879373?v=4&s=20) **juanpedromoreno**](https://github.com/juanpedromoreno)
- [![rafaparadela](https://avatars.githubusercontent.com/u/315070?v=4&s=20) **rafaparadela**](https://github.com/rafaparadela)
- [![47degdev](https://avatars.githubusercontent.com/u/5580770?v=4&s=20) **47degdev**](https://github.com/47degdev)
- [![fedefernandez](https://avatars.githubusercontent.com/u/720923?v=4&s=20) **fedefernandez**](https://github.com/fedefernandez)
- [![sloshy](https://avatars.githubusercontent.com/u/427237?v=4&s=20) **sloshy**](https://github.com/sloshy)
- [![jdesiloniz](https://avatars.githubusercontent.com/u/2835739?v=4&s=20) **jdesiloniz**](https://github.com/jdesiloniz)
- [![reimai](https://avatars.githubusercontent.com/u/1123908?v=4&s=20) **reimai**](https://github.com/reimai)
- [![anamariamv](https://avatars.githubusercontent.com/u/2183589?v=4&s=20) **anamariamv**](https://github.com/anamariamv)
- [![nicoulaj](https://avatars.githubusercontent.com/u/3162?v=4&s=20) **nicoulaj**](https://github.com/nicoulaj)
- [![calvellido](https://avatars.githubusercontent.com/u/7753447?v=4&s=20) **calvellido**](https://github.com/calvellido)
- [![fedefernandez](https://avatars.githubusercontent.com/u/720923?v=4&s=20) **fedefernandez**](https://github.com/fedefernandez)
- [![AdrianRaFo](https://avatars.githubusercontent.com/u/15971742?v=4&s=20) **AdrianRaFo**](https://github.com/AdrianRaFo)
- [![Daenyth](https://avatars.githubusercontent.com/u/14644?v=4&s=20) **Daenyth**](https://github.com/Daenyth)
- [![alejandrohdezma](https://avatars.githubusercontent.com/u/9027541?v=4&s=20) **alejandrohdezma**](https://github.com/alejandrohdezma)
Expand All @@ -52,7 +51,7 @@ These are the people that have contributed to the _github4s_ project:
- [![chalenge](https://avatars.githubusercontent.com/u/5385518?v=4&s=20) **chalenge**](https://github.com/chalenge)
- [![dcsobral](https://avatars.githubusercontent.com/u/141079?v=4&s=20) **dcsobral**](https://github.com/dcsobral)
- [![drwlrsn](https://avatars.githubusercontent.com/u/981387?v=4&s=20) **drwlrsn**](https://github.com/drwlrsn)
- [![israelpzglez](https://avatars.githubusercontent.com/u/646886?v=4&s=20) **israelpzglez**](https://github.com/israelpzglez)
- [![israelperezglez](https://avatars.githubusercontent.com/u/646886?v=4&s=20) **israelperezglez**](https://github.com/israelperezglez)
- [![javimartinez](https://avatars.githubusercontent.com/u/9149487?v=4&s=20) **javimartinez**](https://github.com/javimartinez)
- [![guersam](https://avatars.githubusercontent.com/u/969120?v=4&s=20) **guersam**](https://github.com/guersam)
- [![josevi96](https://avatars.githubusercontent.com/u/22874841?v=4&s=20) **josevi96**](https://github.com/josevi96)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[![Join the chat at https://gitter.im/47degrees/github4s](https://badges.gitter.im/47degrees/github4s.svg)](https://gitter.im/47degrees/github4s?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![codecov.io](http://codecov.io/gh/47degrees/github4s/branch/master/graph/badge.svg)](http://codecov.io/gh/47degrees/github4s) [![Maven Central](https://img.shields.io/badge/maven%20central-0.32.0-green.svg)](https://oss.sonatype.org/#nexus-search;gav~com.47deg~github4s*) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/47degrees/github4s/master/LICENSE) [![Latest version](https://img.shields.io/badge/github4s-0.32.0-green.svg)](https://index.scala-lang.org/47degrees/github4s) [![GitHub Issues](https://img.shields.io/github/issues/47degrees/github4s.svg)](https://github.com/47degrees/github4s/issues)
[![Join the chat at https://gitter.im/47degrees/github4s](https://badges.gitter.im/47degrees/github4s.svg)](https://gitter.im/47degrees/github4s?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![codecov.io](http://codecov.io/gh/47degrees/github4s/branch/master/graph/badge.svg)](http://codecov.io/gh/47degrees/github4s) [![Maven Central](https://img.shields.io/badge/maven%20central-0.32.1-green.svg)](https://oss.sonatype.org/#nexus-search;gav~com.47deg~github4s*) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/47degrees/github4s/master/LICENSE) [![Latest version](https://img.shields.io/badge/github4s-0.32.1-green.svg)](https://index.scala-lang.org/47degrees/github4s) [![GitHub Issues](https://img.shields.io/github/issues/47degrees/github4s.svg)](https://github.com/47degrees/github4s/issues)

Github4s
=============
Expand All @@ -11,7 +11,7 @@ Github4s
To get started with SBT, simply add the following to your build.sbt file.

```scala
libraryDependencies += "com.47deg" %% "github4s" % "0.32.0"
libraryDependencies += "com.47deg" %% "github4s" % "0.32.1"
```

## Github4s in the wild
Expand Down
22 changes: 11 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Global / onChangedBuildSource := ReloadOnSourceChanges

ThisBuild / organization := "com.47deg"

val scala212 = "2.12.17"
val scala213 = "2.13.10"
val scala3Version = "3.2.2"
val scala212 = "2.12.18"
val scala213 = "2.13.12"
val scala3Version = "3.3.1"
val scala2Versions = Seq(scala212, scala213)
val allScalaVersions = scala2Versions :+ scala3Version
ThisBuild / scalaVersion := scala213
Expand All @@ -29,17 +29,17 @@ lazy val github4s = (crossProject(JSPlatform, JVMPlatform))
.withoutSuffixFor(JVMPlatform)
.enablePlugins(MimaPlugin)
.settings(coreDeps: _*)
.jsSettings(
// See the README for why this is necessary
// https://github.com/scala-js/scala-js-macrotask-executor/tree/v1.1.1
// tl;dr: without it, performance problems and concurrency bugs abound
libraryDependencies += "org.scala-js" %%% "scala-js-macrotask-executor" % "1.1.1" % Test
)
.settings(
// Increase number of inlines, needed for circe semiauto derivation
scalacOptions ++= on(3)(Seq("-Xmax-inlines", "48")).value.flatten,
// See the README for why this is necessary
// https://github.com/scala-js/scala-js-macrotask-executor/tree/v1.0.0
// tl;dr: without it, performance problems and concurrency bugs abound
libraryDependencies += "org.scala-js" %%% "scala-js-macrotask-executor" % "1.0.0" % Test,
mimaPreviousArtifacts := Set("com.47deg" %% "github4s" % "0.32.0"),
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[IncompatibleMethTypeProblem]("github4s.http.HttpClient.this")
)
// Disable nonunit warning on tests
Test / scalacOptions -= "-Wnonunit-statement"
)

//////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ object ArbitraryDerivation { self =>
object semiauto:
extension (A: Arbitrary.type)
inline def derived[A]: Arbitrary[A] =
import auto.given
summonInline[Arbitrary[A]]

inline def deriveArb[A](using g: K0.Generic[A]): Arbitrary[A] =
Expand All @@ -26,20 +25,24 @@ object ArbitraryDerivation { self =>
// https://scastie.scala-lang.org/b8CXWfmXQUClqXplyA6TJg
opaque type DerivedGen[A] = Gen[A]
object DerivedGen extends DerivedGenInstances:
given [A]: Conversion[Gen[A], DerivedGen[A]] = identity
given [A]: Conversion[Gen[A], DerivedGen[A]] = identity
extension [A](gen: DerivedGen[A]) def arb: Arbitrary[A] = Arbitrary(gen)

private final class ArrayProduct(elems: Array[Any]) extends Product:
def canEqual(that: Any): Boolean = true
def productElement(n: Int): Any = elems(n)
def productArity: Int = elems.length
def canEqual(that: Any): Boolean = true
def productElement(n: Int): Any = elems(n)
def productArity: Int = elems.length
override def productIterator: Iterator[Any] = elems.iterator

def product[A](arbs: Seq[Arbitrary[_]])(using gen: K0.ProductGeneric[A]): DerivedGen[A] =
Gen.sequence[Array[Any], Any](arbs.map(_.arbitrary)).map(arr => gen.fromProduct(ArrayProduct(arr)).asInstanceOf[A])
Gen
.sequence[Array[Any], Any](arbs.map(_.arbitrary))
.map(arr => gen.fromProduct(ArrayProduct(arr)).asInstanceOf[A])

def coproduct[A](arbs: => IndexedSeq[Arbitrary[_ <: A]]): DerivedGen[A] =
Gen.lzy(if arbs.isEmpty then Gen.fail else Gen.choose(0, arbs.length - 1).flatMap(arbs(_).arbitrary))
Gen.lzy(
if arbs.isEmpty then Gen.fail else Gen.choose(0, arbs.length - 1).flatMap(arbs(_).arbitrary)
)

sealed abstract class DerivedGenInstances:
inline def summonAllArb[A, U](using gen: K0.Generic[A]): IndexedSeq[Arbitrary[_ <: U]] =
Expand Down
14 changes: 7 additions & 7 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ object ProjectPlugin extends AutoPlugin {

lazy val V = new {
val bm4 = "0.3.1"
val cats: String = "2.9.0"
val circe: String = "0.14.3"
val cats: String = "2.10.0"
val circe: String = "0.14.6"
val expecty = "0.16.0"
val http4s: String = "0.23.16"
val http4sBlazeClient: String = "0.23.13"
val http4s: String = "0.23.24"
val http4sBlazeClient: String = "0.23.15"
val paradise: String = "2.1.1"
val scalacheck = "1.17.0"
val scalacheckShapeless = "1.3.0"
val scalacheckPlusScalatest = "3.2.11.0"
val scalatest: String = "3.2.16"
val scalacheckPlusScalatest = "3.2.14.0"
val scalatest: String = "3.2.17"
val shapeless3 = "3.3.0"
}

Expand Down Expand Up @@ -85,7 +85,7 @@ object ProjectPlugin extends AutoPlugin {
"org.http4s" %% "http4s-dsl" % V.http4s % Test,
"org.http4s" %% "http4s-server" % V.http4s % Test,
"org.scalacheck" %% "scalacheck" % V.scalacheck % Test,
"org.scalatestplus" %% "scalacheck-1-15" % V.scalacheckPlusScalatest % Test
"org.scalatestplus" %% "scalacheck-1-16" % V.scalacheckPlusScalatest % Test
),
libraryDependencies ++= on(2, 12)(
compilerPlugin("org.scalamacros" %% "paradise" % V.paradise cross CrossVersion.full)
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.8.3
sbt.version = 1.9.7
31 changes: 15 additions & 16 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
ThisBuild / libraryDependencySchemes ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
)
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.4.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.7")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-codecov" % "0.2.1")
addSbtPlugin("com.alejandrohdezma" % "sbt-github" % "0.11.6")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.11.6")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.11.6")
addSbtPlugin("com.alejandrohdezma" % "sbt-remove-test-from-pom" % "0.1.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.2")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.4.4")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.1")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-codecov" % "0.2.1")
addSbtPlugin("com.alejandrohdezma" % "sbt-github" % "0.11.11")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.11.11")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.11.11")
addSbtPlugin("com.alejandrohdezma" % "sbt-remove-test-from-pom" % "0.1.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0")

0 comments on commit e0a4e94

Please sign in to comment.