From 5acf40971b1666be820b02317356b675d7072bbd Mon Sep 17 00:00:00 2001 From: Sakib Hadziavdic Date: Fri, 10 Apr 2026 16:55:05 +0200 Subject: [PATCH 1/7] update deder --- .deder/server.properties | 1 - deder.pkl | 2 +- examples/api/test/src/JsonApiSuite.scala | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.deder/server.properties b/.deder/server.properties index 46af699d..1cf0e65c 100644 --- a/.deder/server.properties +++ b/.deder/server.properties @@ -1,3 +1,2 @@ -version=v0.0.21 #logLevel=debug diff --git a/deder.pkl b/deder.pkl index 78c14c9c..d89673d8 100644 --- a/deder.pkl +++ b/deder.pkl @@ -1,4 +1,4 @@ -amends "https://sake92.github.io/deder/config/DederProject.pkl" +amends "https://sake92.github.io/deder/config/v0.2.1/DederProject.pkl" local const function pomSettings( _artifactId: String, diff --git a/examples/api/test/src/JsonApiSuite.scala b/examples/api/test/src/JsonApiSuite.scala index 525c58bb..55659bd5 100644 --- a/examples/api/test/src/JsonApiSuite.scala +++ b/examples/api/test/src/JsonApiSuite.scala @@ -75,7 +75,6 @@ class JsonApiSuite extends munit.FunSuite { } // filtering GET - // TODO reenable locally { val queryParams = ProductsQuery(Set("Chocolate"), Option(1)).toSttpQuery() val res = quickRequest.get(uri"$baseUrl/products".withParams(queryParams)).send() From 887cd6f2b73bac0b07e9e23fb104a54bbd4ee902 Mon Sep 17 00:00:00 2001 From: Sakib Hadziavdic Date: Sat, 11 Apr 2026 07:06:57 +0200 Subject: [PATCH 2/7] Add Scala Native to sharaf-http4s --- deder.pkl | 37 ++++++++++++++----- .../ba/sake/sharaf/http4s/SharafHttpApp.scala | 12 ++++-- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/deder.pkl b/deder.pkl index d89673d8..1ee66d82 100644 --- a/deder.pkl +++ b/deder.pkl @@ -228,19 +228,35 @@ local const sharafUndertowModules = }.get local const sharafHttp4sModules = - new CreateScalaModules { + new CreateCrossModules { root = "sharaf-http4s" + local const _pomSettings = + pomSettings("sharaf-http4s", "Sharaf Http4s", "Sharaf integration with Http4s") template = (baseTemplate) { - pomSettings = pomSettings("sharaf-http4s", "Sharaf Http4s", "Sharaf integration with Http4s") - moduleDeps { - sharafCoreModules.jvm - } - deps { "org.http4s::http4s-server::0.23.32" } + pomSettings = _pomSettings + moduleDeps { sharafCoreModules.jvm } + deps { "org.http4s::http4s-server::0.23.34" } } testTemplate = (baseTemplate.asTest()) { deps { "org.scalameta::munit::1.1.0" - "org.http4s::http4s-client::0.23.32" + "org.http4s::http4s-client::0.23.34" + } + } + nativeTemplate = (baseTemplate.asNative()) { + scalaNativeVersion = versions.scalaNativeVersion + pomSettings = _pomSettings + moduleDeps { sharafCoreModules.native } + deps { + "org.http4s::http4s-server::0.23.34" + "com.lihaoyi::sourcecode::0.4.2" + "io.github.cquiroz::scala-java-time::2.6.0" + } + } + nativeTestTemplate = (nativeTemplate.asTest()) { + deps { + "org.scalameta::munit::1.1.0" + "org.http4s::http4s-client::0.23.34" } } }.get @@ -403,7 +419,7 @@ local const http4sExampleModules = new CreateScalaModules { root = "examples/http4s" template = (baseExampleTemplate) { - moduleDeps { sharafHttp4sModules.main } + moduleDeps { sharafHttp4sModules.jvm } deps { "org.http4s::http4s-ember-server::0.23.32" } } testTemplate = (baseExampleTemplate.asTest()) { @@ -425,7 +441,10 @@ modules { sharafCoreModules.native sharafCoreModules.native_test ...sharafUndertowModules.all - ...sharafHttp4sModules.all + sharafHttp4sModules.jvm + sharafHttp4sModules.jvm_test + sharafHttp4sModules.native + sharafHttp4sModules.native_test ...sharafHelidonModules.all ...sharafJdkHttpserverModules.all sharafSnunit diff --git a/sharaf-http4s/src/ba/sake/sharaf/http4s/SharafHttpApp.scala b/sharaf-http4s/src/ba/sake/sharaf/http4s/SharafHttpApp.scala index 4a8ba98e..cc935c90 100644 --- a/sharaf-http4s/src/ba/sake/sharaf/http4s/SharafHttpApp.scala +++ b/sharaf-http4s/src/ba/sake/sharaf/http4s/SharafHttpApp.scala @@ -30,12 +30,16 @@ def SharafHttpApp(sharafHandler: SharafHandler) = Seq.empty // TODO: remove header })) - body <- IO.pure(response.body match { + body <- response.body match { case Some(body) => - fs2.io.readOutputStream(4096)(outputStream => IO.blocking(response.rw.write(body, outputStream))) + IO.blocking { + val baos = new java.io.ByteArrayOutputStream() + response.rw.write(body, baos) + fs2.Stream.emits[IO, Byte](baos.toByteArray()) + } case None => - fs2.Stream.empty[IO] - }) + IO.pure(fs2.Stream.empty[IO]) + } response <- IO.pure( Http4sResponse[IO]( From 5faa391238b2425e8acd096a5ce6980bda72e444 Mon Sep 17 00:00:00 2001 From: Sakib Hadziavdic Date: Sat, 11 Apr 2026 11:09:31 +0200 Subject: [PATCH 3/7] Bump deder to v0.2.2 --- .deder/server.properties | 2 -- deder.pkl | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 .deder/server.properties diff --git a/.deder/server.properties b/.deder/server.properties deleted file mode 100644 index 1cf0e65c..00000000 --- a/.deder/server.properties +++ /dev/null @@ -1,2 +0,0 @@ - -#logLevel=debug diff --git a/deder.pkl b/deder.pkl index 1ee66d82..6c034531 100644 --- a/deder.pkl +++ b/deder.pkl @@ -1,4 +1,4 @@ -amends "https://sake92.github.io/deder/config/v0.2.1/DederProject.pkl" +amends "https://sake92.github.io/deder/config/v0.2.2/DederProject.pkl" local const function pomSettings( _artifactId: String, @@ -172,12 +172,6 @@ local const sharafCoreModules = testTemplate = (sharafCoreTemplate.asTest()) { deps { "org.scalameta::munit::1.1.0" } } - jsTemplate = (sharafCoreTemplate.asJs()) { - scalaJsVersion = versions.scalaJsVersion - } - jsTestTemplate = (jsTemplate.asTest()) { - deps { "org.scalameta::munit::1.1.0" } - } nativeTemplate = (sharafCoreTemplate.asNative()) { scalaNativeVersion = versions.scalaNativeVersion moduleDeps { From 65c945661c9e291ade99ecd751c663ac0eefa392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sakib=20Had=C5=BEiavdi=C4=87?= Date: Sun, 12 Apr 2026 17:34:19 +0200 Subject: [PATCH 4/7] Update DederProject.pkl URL to early access version --- deder.pkl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deder.pkl b/deder.pkl index 6c034531..746429d2 100644 --- a/deder.pkl +++ b/deder.pkl @@ -1,4 +1,4 @@ -amends "https://sake92.github.io/deder/config/v0.2.2/DederProject.pkl" +amends "https://sake92.github.io/deder/config/early-access/DederProject.pkl" local const function pomSettings( _artifactId: String, From dd4f422bbcd0fb163574a5b15ad153cf1c124ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sakib=20Had=C5=BEiavdi=C4=87?= Date: Sun, 12 Apr 2026 18:23:25 +0200 Subject: [PATCH 5/7] . --- deder.pkl | 1 + 1 file changed, 1 insertion(+) diff --git a/deder.pkl b/deder.pkl index 746429d2..d6bb0f90 100644 --- a/deder.pkl +++ b/deder.pkl @@ -451,3 +451,4 @@ modules { ...snunitExampleModules.all ...http4sExampleModules.all } + From a067ad5e9a60d2338f3f7b4aa6598aa570c79e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sakib=20Had=C5=BEiavdi=C4=87?= Date: Mon, 13 Apr 2026 08:09:13 +0200 Subject: [PATCH 6/7] Enable multithreading in native test template --- deder.pkl | 1 + 1 file changed, 1 insertion(+) diff --git a/deder.pkl b/deder.pkl index d6bb0f90..0c3ad1e6 100644 --- a/deder.pkl +++ b/deder.pkl @@ -248,6 +248,7 @@ local const sharafHttp4sModules = } } nativeTestTemplate = (nativeTemplate.asTest()) { + multithreading = true deps { "org.scalameta::munit::1.1.0" "org.http4s::http4s-client::0.23.34" From 01c3ab922fd9ceac58db99a67c99c507eff44033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sakib=20Had=C5=BEiavdi=C4=87?= Date: Mon, 13 Apr 2026 09:59:00 +0200 Subject: [PATCH 7/7] Update DederProject.pkl URL to version 0.2.3 --- deder.pkl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deder.pkl b/deder.pkl index 0c3ad1e6..eff3af3a 100644 --- a/deder.pkl +++ b/deder.pkl @@ -1,4 +1,4 @@ -amends "https://sake92.github.io/deder/config/early-access/DederProject.pkl" +amends "https://sake92.github.io/deder/config/v0.2.3/DederProject.pkl" local const function pomSettings( _artifactId: String,