Permalink
Browse files

Added jvmopts to fix memory issues when compiling and testing.

Updated to SBT 1.1.1.
  • Loading branch information...
darkfrog26 committed Mar 30, 2018
1 parent d96229b commit 4b5433c526a7f42f8e113f9632a2820f580a1ef4
@@ -0,0 +1,10 @@
-Xms1024M
-Xmx8192M
-Xss2M
-XX:MaxMetaspaceSize=4096M
-XX:MaxPermSize=2048M
-XX:ReservedCodeCacheSize=500M
-XX:+TieredCompilation
-XX:-UseGCOverheadLimit
-XX:+CMSClassUnloadingEnabled
-XX:+UseConcMarkSweepGC
@@ -1,12 +1,30 @@
import sbtcrossproject.{CrossType, crossProject}
name := "youi"
organization in ThisBuild := "io.youi"
version in ThisBuild := "0.9.0-M7"
version in ThisBuild := "0.9.0-M8-SNAPSHOT"
scalaVersion in ThisBuild := "2.12.5"
crossScalaVersions in ThisBuild := List("2.12.5", "2.11.12")
resolvers in ThisBuild += Resolver.sonatypeRepo("releases")
resolvers in ThisBuild += Resolver.sonatypeRepo("snapshots")
scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation", "-feature")
publishTo in ThisBuild := sonatypePublishTo.value
sonatypeProfileName in ThisBuild := "io.youi"
publishMavenStyle in ThisBuild := true
licenses in ThisBuild := Seq("MIT" -> url("https://github.com/outr/youi/blob/master/LICENSE"))
sonatypeProjectHosting in ThisBuild := Some(xerial.sbt.Sonatype.GitHubHosting("outr", "youi", "matt@outr.com"))
homepage in ThisBuild := Some(url("https://github.com/outr/youi"))
scmInfo in ThisBuild := Some(
ScmInfo(
url("https://github.com/outr/youi"),
"scm:git@github.com:outr/youi.git"
)
)
developers in ThisBuild := List(
Developer(id="darkfrog", name="Matt Hicks", email="matt@matthicks.com", url=url("http://matthicks.com"))
)
val profigVersion = "2.2.1"
val scribeVersion = "2.3.1"
val powerScalaVersion = "2.0.5"
@@ -41,7 +59,7 @@ lazy val root = project.in(file("."))
publishLocal := {}
)
lazy val macros = crossProject.in(file("macros"))
lazy val macros = crossProject(JSPlatform, JVMPlatform).in(file("macros"))
.settings(
name := "youi-macros",
description := "Dependency for internal Macro functionality",
@@ -55,7 +73,7 @@ lazy val macros = crossProject.in(file("macros"))
lazy val macrosJS = macros.js
lazy val macrosJVM = macros.jvm
lazy val core = crossProject.in(file("core"))
lazy val core = crossProject(JSPlatform, JVMPlatform).in(file("core"))
.settings(
name := "youi-core",
description := "Core functionality leveraged and shared by most other sub-projects of YouI.",
@@ -90,7 +108,7 @@ lazy val core = crossProject.in(file("core"))
lazy val coreJS = core.js
lazy val coreJVM = core.jvm
lazy val spatial = crossProject.in(file("spatial"))
lazy val spatial = crossProject(JSPlatform, JVMPlatform).in(file("spatial"))
.settings(
name := "youi-spatial",
libraryDependencies ++= Seq(
@@ -165,7 +183,7 @@ lazy val serverUndertow = project.in(file("serverUndertow"))
)
.dependsOn(server)
lazy val communication = crossProject.in(file("communication"))
lazy val communication = crossProject(JSPlatform, JVMPlatform).in(file("communication"))
.settings(
name := "youi-communication",
libraryDependencies ++= Seq(
@@ -178,7 +196,7 @@ lazy val communication = crossProject.in(file("communication"))
lazy val communicationJS = communication.js
lazy val communicationJVM = communication.jvm.dependsOn(server)
lazy val ui = crossProject.in(file("ui"))
lazy val ui = crossProject(JSPlatform, JVMPlatform).in(file("ui"))
.settings(
name := "youi-ui"
)
@@ -209,7 +227,7 @@ lazy val optimizer = project.in(file("optimizer"))
)
.dependsOn(stream)
lazy val app = crossProject.in(file("app"))
lazy val app = crossProject(JSPlatform, JVMPlatform).in(file("app"))
.settings(
name := "youi-app",
libraryDependencies ++= Seq(
@@ -222,7 +240,7 @@ lazy val app = crossProject.in(file("app"))
lazy val appJS = app.js
lazy val appJVM = app.jvm
lazy val example = crossProject.in(file("example"))
lazy val example = crossProject(JSPlatform, JVMPlatform).in(file("example"))
.settings(
name := "youi-example"
)
@@ -1 +1 @@
sbt.version=0.13.17
sbt.version=1.1.1
@@ -1,8 +1,11 @@
resolvers += "Artima Maven Repository" at "http://repo.artima.com/releases"
resolvers += "Typesafe Repository" at "https://repo.typesafe.com/typesafe/releases/"
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.11")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.4.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.4.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.3")
@@ -3,18 +3,19 @@ package io.youi.server
import io.youi.http.{CacheControl, Content, HttpConnection, Status}
import io.youi.net.ContentType
import io.youi.server.dsl._
import perfolation._
object DefaultErrorHandler extends ErrorHandler {
lazy val lastModified: Long = System.currentTimeMillis()
def html(status: Status): Content = <html>
def html(status: Status): Content = p"""<html>
<head>
<title>Error {status.code}</title>
<title>Error ${status.code}</title>
</head>
<body>
{status.code} - {status.message}
${status.code} - ${status.message}
</body>
</html>.withContentType(ContentType.`text/html`).withLastModified(lastModified)
</html>""".withContentType(ContentType.`text/html`).withLastModified(lastModified)
override def handle(connection: HttpConnection, t: Option[Throwable]): Unit = connection.update { response =>
val status = if (response.status.isError) {
@@ -264,7 +264,7 @@ object UndertowServerImplementation extends ServerImplementationCreator {
})
}
case fc: FileContent => ResourceServer.serve(exchange, fc)
case URLContent(url, _) => {
case URLContent(url, _, _) => {
val resource = new URLResource(url, "")
resource.serve(exchange.getResponseSender, exchange, new IoCallback {
override def onComplete(exchange: HttpServerExchange, sender: Sender): Unit = {

This file was deleted.

Oops, something went wrong.

0 comments on commit 4b5433c

Please sign in to comment.