-
Notifications
You must be signed in to change notification settings - Fork 165
Add support for unix domain sockets (and peer authentication) #1192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mpilquist
wants to merge
37
commits into
main
Choose a base branch
from
topic/peer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
58d1d97
Add support for unix domain sockets
mpilquist c521068
WIP: Attempt to test unix domain socket support
mpilquist 7a54717
Try to fix GHA by switching to ubuntu-22.04 image
mpilquist 1edf156
Don't use File.separator
mpilquist 0e8733f
Revert GHA base image change
mpilquist c037c5c
Merge branch 'main' into topic/peer
mpilquist a4dfb7c
Bump to JDK 17
mpilquist bdd4bec
Debug tests
mpilquist ba0777a
Debug
mpilquist f8c03e2
Debug
mpilquist 35c387b
Debug
mpilquist 7b0df14
Debug
mpilquist d8c4989
Debug
mpilquist e5d258c
Debug
mpilquist 5c52e14
Debug
mpilquist bc2d336
Ignore exception when terminating socket
mpilquist 67993c1
Ensure site coverage runs with J17
mpilquist eae043c
Exclude unix domain socket test from Mac and Windows builds
mpilquist 7ca500b
Cleanup
mpilquist 374c70d
Cleanup
mpilquist 07661bc
Update to fs2 3.13.0-M1
mpilquist 968395f
Adjust exceptions thrown from host/port conversions
mpilquist ffeee5c
Bump to fs2 3.13.0-M2
mpilquist ce8b2d9
Bump to fs2 3.13.0-M2
mpilquist 5b68226
Update to latest fs2
mpilquist 6805072
Merge branch 'main' into topic/peer
mpilquist 7b733ad
Merge branch 'main' into topic/peer
mpilquist f5e6fe4
Merge branch 'main' into topic/peer
mpilquist b51f59c
Prepare for Native 0.5 - update dependencies
keynmol 3ff8ac9
Merge branch 'topic/peer' into scala-native-0.5/prep
keynmol 3d56fb3
Merge pull request #1218 from keynmol/scala-native-0.5/prep
mpilquist d73862b
Bump cats-parse
mpilquist f355ffd
Bump circe-core
mpilquist 0bcc75d
Fix artifact resolution
mpilquist 718a636
Update workflow
mpilquist 2c2db11
Disable tracing on native to avoid NPE
mpilquist b6e0544
Use munit.internal.PlatformCompat
mpilquist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,10 +16,9 @@ ThisBuild / developers := List( | |
| ThisBuild / tlCiReleaseBranches += "series/0.6.x" | ||
| ThisBuild / tlCiScalafmtCheck := false | ||
| ThisBuild / tlSitePublishBranch := Some("series/0.6.x") | ||
| ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest") | ||
| ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11")) | ||
| ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17")) | ||
| ThisBuild / tlJdkRelease := Some(8) | ||
|
|
||
| ThisBuild / resolvers += Resolver.sonatypeCentralSnapshots | ||
| ThisBuild / githubWorkflowBuildPreamble ++= nativeBrewInstallWorkflowSteps.value | ||
| ThisBuild / nativeBrewInstallCond := Some("matrix.project == 'skunkNative'") | ||
|
|
||
|
|
@@ -38,6 +37,7 @@ ThisBuild / githubWorkflowAddedJobs += | |
| id = "coverage", | ||
| name = s"Generate coverage report (2.13 JVM only)", | ||
| scalas = Nil, | ||
| javas = githubWorkflowJavaVersions.value.toList, | ||
| sbtStepPreamble = Nil, | ||
| steps = githubWorkflowJobSetup.value.toList ++ | ||
| List( | ||
|
|
@@ -58,11 +58,16 @@ ThisBuild / mimaBinaryIssueFilters ++= List( | |
|
|
||
| ThisBuild / tlFatalWarnings := false | ||
|
|
||
| ThisBuild / resolvers += Resolver.sonatypeCentralSnapshots | ||
|
|
||
| ThisBuild / libraryDependencySchemes += | ||
| "org.scala-native" %% "test-interface_native0.5" % VersionScheme.Always | ||
|
|
||
| // This is used in a couple places | ||
| lazy val fs2Version = "3.12.2" | ||
| lazy val fs2Version = "3.13.0-M7" | ||
| lazy val openTelemetryVersion = "1.52.0" | ||
| lazy val otel4sVersion = "0.13.1" | ||
| lazy val refinedVersion = "0.11.0" | ||
| lazy val otel4sVersion = "0.14-eadbb3d-SNAPSHOT" | ||
| lazy val refinedVersion = "0.11.3" | ||
|
|
||
| // Global Settings | ||
| lazy val commonSettings = Seq( | ||
|
|
@@ -107,26 +112,26 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) | |
| name := "skunk-core", | ||
| description := "Tagless, non-blocking data access library for Postgres.", | ||
| libraryDependencies ++= Seq( | ||
| "org.typelevel" %%% "cats-core" % "2.11.0", | ||
| "org.typelevel" %%% "cats-effect" % "3.6.3", | ||
| "org.typelevel" %%% "cats-core" % "2.13.0", | ||
| "org.typelevel" %%% "cats-effect" % "3.7.0-RC1", | ||
| "co.fs2" %%% "fs2-core" % fs2Version, | ||
| "co.fs2" %%% "fs2-io" % fs2Version, | ||
| "org.scodec" %%% "scodec-bits" % "1.1.38", | ||
| "org.scodec" %%% "scodec-core" % (if (tlIsScala3.value) "2.2.2" else "1.11.10"), | ||
| "org.scodec" %%% "scodec-cats" % "1.2.0", | ||
| "org.scodec" %%% "scodec-bits" % "1.2.4", | ||
| "org.scodec" %%% "scodec-core" % (if (tlIsScala3.value) "2.3.3" else "1.11.11"), | ||
| "org.scodec" %%% "scodec-cats" % "1.3.0-RC1", | ||
| "org.typelevel" %%% "otel4s-core-trace" % otel4sVersion, | ||
| "org.tpolecat" %%% "sourcepos" % "1.1.0", | ||
| "org.typelevel" %%% "twiddles-core" % "0.8.0", | ||
| "org.tpolecat" %%% "sourcepos" % "1.2.0", | ||
| "org.typelevel" %%% "twiddles-core" % "0.9.0", | ||
| ) ++ Seq( | ||
| "com.beachape" %%% "enumeratum" % "1.7.4", | ||
| "com.beachape" %%% "enumeratum" % "1.9.0", | ||
| ).filterNot(_ => tlIsScala3.value) | ||
| ).jvmSettings( | ||
| libraryDependencies += "com.ongres.scram" % "client" % "2.1", | ||
| ).platformsSettings(JSPlatform, NativePlatform)( | ||
| libraryDependencies ++= Seq( | ||
| "com.armanbilge" %%% "saslprep" % "0.1.1", | ||
| "io.github.cquiroz" %%% "scala-java-time" % "2.5.0", | ||
| "io.github.cquiroz" %%% "locales-minimal-en_us-db" % "1.5.3" | ||
| "com.armanbilge" %%% "saslprep" % "0.1.2", | ||
| "io.github.cquiroz" %%% "scala-java-time" % "2.6.0", | ||
| "io.github.cquiroz" %%% "locales-minimal-en_us-db" % "1.5.4" | ||
| ), | ||
| ) | ||
|
|
||
|
|
@@ -152,8 +157,8 @@ lazy val circe = crossProject(JVMPlatform, JSPlatform, NativePlatform) | |
| .settings( | ||
| name := "skunk-circe", | ||
| libraryDependencies ++= Seq( | ||
| "io.circe" %%% "circe-core" % "0.14.8", | ||
| "io.circe" %%% "circe-jawn" % "0.14.8" | ||
| "io.circe" %%% "circe-core" % "0.14.14", | ||
| "io.circe" %%% "circe-jawn" % "0.14.14" | ||
| ) | ||
| ) | ||
|
|
||
|
|
@@ -166,7 +171,7 @@ lazy val postgis = crossProject(JVMPlatform, JSPlatform, NativePlatform) | |
| .settings( | ||
| name := "skunk-postgis", | ||
| libraryDependencies ++= Seq( | ||
| "org.typelevel" %%% "cats-parse" % "1.0.0" | ||
| "org.typelevel" %%% "cats-parse" % "1.1.0" | ||
| ), | ||
| ) | ||
|
|
||
|
|
@@ -178,25 +183,29 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform) | |
| .settings(commonSettings) | ||
| .settings( | ||
| libraryDependencies ++= Seq( | ||
| "org.scalameta" %%% "munit" % "1.0.0", | ||
| "org.scalameta" % "junit-interface" % "1.1.1", | ||
| "org.typelevel" %%% "scalacheck-effect-munit" % "2.0.0-M2", | ||
| "org.typelevel" %%% "munit-cats-effect" % "2.1.0", | ||
| "org.typelevel" %%% "cats-free" % "2.11.0", | ||
| "org.typelevel" %%% "cats-laws" % "2.11.0", | ||
| "org.typelevel" %%% "cats-effect-testkit" % "3.6.3", | ||
| "org.typelevel" %%% "discipline-munit" % "2.0.0-M3", | ||
| "org.typelevel" %%% "cats-time" % "0.5.1", | ||
| "org.typelevel" %%% "scalacheck-effect-munit" % "2.1.0-RC1", | ||
| "org.typelevel" %%% "munit-cats-effect" % "2.2.0-RC1", | ||
| "org.typelevel" %%% "cats-free" % "2.13.0", | ||
| "org.typelevel" %%% "cats-laws" % "2.13.0", | ||
| "org.typelevel" %%% "cats-effect-testkit" % "3.7.0-RC1", | ||
| "org.typelevel" %%% "discipline-munit" % "2.0.0", | ||
| "org.typelevel" %%% "cats-time" % "0.6.0", | ||
| "eu.timepit" %%% "refined-cats" % refinedVersion, | ||
| "org.typelevel" %%% "otel4s-sdk-trace" % otel4sVersion, | ||
| "org.typelevel" %%% "otel4s-sdk-exporter-trace" % otel4sVersion, | ||
| ), | ||
| testFrameworks += new TestFramework("munit.Framework"), | ||
| testOptions += { | ||
| if(System.getProperty("os.arch").startsWith("aarch64")) { | ||
| Tests.Argument(TestFrameworks.MUnit, "--exclude-tags=X86ArchOnly") | ||
| } else Tests.Argument() | ||
| } | ||
| var excludedTags = List.empty[String] | ||
| if (System.getProperty("os.arch").startsWith("aarch64")) | ||
| excludedTags = "X86ArchOnly" :: excludedTags | ||
| if (!System.getProperty("os.name").contains("linux")) | ||
| excludedTags = "LinuxOnly" :: excludedTags | ||
| if (excludedTags.nonEmpty) | ||
| Tests.Argument(TestFrameworks.MUnit, "--exclude-tags=" + excludedTags.mkString(",")) | ||
| else Tests.Argument() | ||
| }, | ||
| Test / baseDirectory := (ThisBuild / Test / run / baseDirectory).value | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make forked tests working directory be root of build instead of root of submodule |
||
| ) | ||
| .jvmSettings( | ||
| Test / fork := true, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this (anymore?)