diff --git a/build.sbt b/build.sbt index c9fa87378..893c2c9f1 100644 --- a/build.sbt +++ b/build.sbt @@ -9,7 +9,7 @@ def buildLevelSettings: Seq[Setting[_]] = inThisBuild( Seq( organization := "org.scala-sbt", - version := "1.1.2-SNAPSHOT", + version := "1.2.0-SNAPSHOT", description := "sbt is an interactive build tool", bintrayOrganization := Some("sbt"), bintrayRepository := { @@ -77,7 +77,10 @@ def testedBaseSettings: Seq[Setting[_]] = val mimaSettings = Def settings ( mimaPreviousArtifacts := { - ((0 to 4).map(v => s"1.0.$v") ++ (0 to 0).map(v => s"1.1.$v")).map{ v => + Seq( + "1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", + "1.1.0", "1.1.1", + ).map { v => organization.value % moduleName.value % v cross (if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled) }.toSet } diff --git a/main-command/src/main/scala/sbt/internal/server/Server.scala b/main-command/src/main/scala/sbt/internal/server/Server.scala index 7e31910e6..261e63336 100644 --- a/main-command/src/main/scala/sbt/internal/server/Server.scala +++ b/main-command/src/main/scala/sbt/internal/server/Server.scala @@ -60,9 +60,16 @@ private[sbt] object Server { // Named pipe already has an exclusive lock. addServerError(new Win32NamedPipeServerSocket(pipeName)) case ConnectionType.Local => - tryClient(new UnixDomainSocket(socketfile.getAbsolutePath)) + val maxSocketLength = new UnixDomainSocketLibrary.SockaddrUn().sunPath.length - 1 + val path = socketfile.getAbsolutePath + if (path.length > maxSocketLength) + sys.error("socket file absolute path too long; " + + "either switch to another connection type " + + "or define a short \"SBT_GLOBAL_SERVER_DIR\" value. " + + s"Current path: ${path}") + tryClient(new UnixDomainSocket(path)) prepareSocketfile() - addServerError(new UnixDomainServerSocket(socketfile.getAbsolutePath)) + addServerError(new UnixDomainServerSocket(path)) case ConnectionType.Tcp => tryClient(new Socket(InetAddress.getByName(host), port)) addServerError(new ServerSocket(port, 50, InetAddress.getByName(host))) diff --git a/main/src/main/scala/sbt/internal/CommandExchange.scala b/main/src/main/scala/sbt/internal/CommandExchange.scala index b09b488d0..1daab4db2 100644 --- a/main/src/main/scala/sbt/internal/CommandExchange.scala +++ b/main/src/main/scala/sbt/internal/CommandExchange.scala @@ -120,8 +120,10 @@ private[sbt] final class CommandExchange { if (server.isEmpty && firstInstance.get) { val portfile = s.baseDir / "project" / "target" / "active.json" val h = Hash.halfHashString(IO.toURI(portfile).toString) - val tokenfile = BuildPaths.getGlobalBase(s) / "server" / h / "token.json" - val socketfile = BuildPaths.getGlobalBase(s) / "server" / h / "sock" + val serverDir = + sys.env get "SBT_GLOBAL_SERVER_DIR" map file getOrElse BuildPaths.getGlobalBase(s) / "server" + val tokenfile = serverDir / h / "token.json" + val socketfile = serverDir / h / "sock" val pipeName = "sbt-server-" + h val connection = ServerConnection( connectionType, diff --git a/project/build.properties b/project/build.properties index 8b697bbb9..31334bbd3 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.1.0 +sbt.version=1.1.1