Skip to content

Commit

Permalink
Remove sockets module (scalacenter#30)
Browse files Browse the repository at this point in the history
* Remove sockets module

* Use ipcsocket fork

* Use ipcsocket tweaked fork

* Empty commit to trigger CI

* Empty commit to trigger CI

* Empty commit to trigger CI
  • Loading branch information
alexarchambault authored Dec 14, 2021
1 parent 6986051 commit ced1557
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 1,266 deletions.
21 changes: 5 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,6 @@ lazy val jsonConfig213 = crossProject(JSPlatform, JVMPlatform)
target := (file("config") / "target" / "json-config-2.13" / "js").getAbsoluteFile
)

lazy val sockets = project
.settings(
sonatypeSetting,
crossPaths := false,
autoScalaLibrary := false,
description := "IPC: Unix Domain Socket and Windows Named Pipes for Java",
libraryDependencies ++= Seq(Dependencies.jna, Dependencies.jnaPlatform),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
sources in (Compile, doc) := Nil
)

lazy val tmpDirSettings = Def.settings(
javaOptions in Test += {
val tmpDir = (baseDirectory in ThisBuild).value / "target" / "tests-tmp"
Expand All @@ -169,7 +158,6 @@ import build.BuildImplementation.jvmOptions
// For the moment, the dependency is fixed
lazy val frontend: Project = project
.dependsOn(
sockets,
shared,
backend,
backend % "test->test",
Expand Down Expand Up @@ -218,7 +206,8 @@ lazy val frontend: Project = project
Dependencies.caseApp,
Dependencies.scalaDebugAdapter,
Dependencies.libdaemonjvm,
Dependencies.logback
Dependencies.logback,
Dependencies.ipcsocket
)
)

Expand Down Expand Up @@ -275,15 +264,16 @@ lazy val bloopgun = project
)

lazy val launcher = project
.dependsOn(sockets, bloopgun, frontend % "test->test")
.dependsOn(bloopgun, frontend % "test->test")
.settings(testSuiteSettings)
.settings(
sonatypeSetting,
name := "bloop-launcher",
fork in Test := true,
parallelExecution in Test := false,
libraryDependencies ++= List(
Dependencies.coursierInterface
Dependencies.coursierInterface,
Dependencies.ipcsocket
),
tmpDirSettings
)
Expand Down Expand Up @@ -345,7 +335,6 @@ lazy val nativeBridge04 = project

lazy val stuff = project
.aggregate(
sockets,
frontend,
backend,
launcher,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/main/scala/bloop/bsp/BspServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import bloop.data.ClientInfo
import bloop.engine.{ExecutionContext, State}
import bloop.io.{AbsolutePath, RelativePath, ServerHandle}
import bloop.logging.{BspClientLogger, DebugFilter}
import bloop.sockets.UnixDomainServerSocket
import bloop.sockets.Win32NamedPipeServerSocket
import monix.eval.Task
import monix.execution.Ack
import monix.execution.Scheduler
Expand All @@ -22,6 +20,8 @@ import monix.reactive.observers.Subscriber
import monix.reactive.{Observable, Observer}
import monix.reactive.observables.ObservableLike
import monix.execution.cancelables.CompositeCancelable
import org.scalasbt.ipcsocket.UnixDomainServerSocket
import org.scalasbt.ipcsocket.Win32NamedPipeServerSocket

import scala.concurrent.Future
import scala.concurrent.Promise
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/main/scala/bloop/io/ServerHandle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bloop.io

import java.net.{InetAddress, InetSocketAddress, ServerSocket}

import bloop.sockets.{UnixDomainServerSocket, Win32NamedPipeServerSocket}
import org.scalasbt.ipcsocket.{UnixDomainServerSocket, Win32NamedPipeServerSocket}

sealed trait ServerHandle {
def uri: String
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/test/scala/bloop/bsp/BspClientTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ trait BspClientTest {
}

def establishClientConnection(cmd: Commands.ValidatedBsp): me.Task[java.net.Socket] = {
import bloop.sockets.UnixDomainSocket
import bloop.sockets.Win32NamedPipeSocket
import org.scalasbt.ipcsocket.UnixDomainSocket
import org.scalasbt.ipcsocket.Win32NamedPipeSocket
val connectToServer = me.Task {
cmd match {
case cmd: Commands.TcpBsp => new java.net.Socket(cmd.host, cmd.port)
Expand Down
2 changes: 1 addition & 1 deletion launcher/src/main/scala/bloop/launcher/bsp/BspBridge.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import bloop.launcher.core.Feedback
import bloop.bloopgun.core.Shell
import bloop.bloopgun.util.Environment
import bloop.launcher.{printError, printQuoted, println}
import bloop.sockets.UnixDomainSocket
import bloop.bloopgun.core.Shell.StatusCommand
import org.scalasbt.ipcsocket.UnixDomainSocket

import scala.collection.mutable.ListBuffer
import scala.concurrent.Promise
Expand Down
1 change: 1 addition & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ object Dependencies {
val asmUtil = "org.ow2.asm" % "asm-util" % asmVersion

val libdaemonjvm = "io.github.alexarchambault.libdaemon" %% "libdaemon" % "0.0.5"
val ipcsocket = "com.github.alexarchambault.tmp.ipcsocket" % "ipcsocket" % "1.4.1-aa-3"
}

This file was deleted.

177 changes: 0 additions & 177 deletions sockets/src/main/java/bloop/sockets/UnixDomainServerSocket.java

This file was deleted.

Loading

0 comments on commit ced1557

Please sign in to comment.