Skip to content

Commit

Permalink
WIP: build.sbt,Deps.scala,SubObjects.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
fdietze committed Aug 6, 2020
1 parent 1926e41 commit 3fe565c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
13 changes: 0 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// shadow sbt-scalajs' crossProject and CrossType until Scala.js 1.0.0 is released
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

name := "wust"

// docker versions do not allow '+'
Expand Down Expand Up @@ -74,17 +71,12 @@ lazy val commonSettings = Seq(
"-feature" ::
"-language:_" ::
"-Xfuture" ::
"-Yno-adapted-args" ::
"-Ywarn-infer-any" ::
"-Ywarn-nullary-override" ::
"-Ywarn-nullary-unit" ::
// "-opt-warnings:at-inline-failed" ::
"-Xlint:_" ::
"-Ywarn-unused:-imports" ::
// "-Ywarn-self-implicit" ::
// "-Ywarn-dead-code" :: // does not work well with scalajs js.native in facades
"-Ywarn-extra-implicit" ::
"-P:silencer:checkUnused" ::
"-Ypatmat-exhaust-depth" :: "off" :: // needed for huge match in FeatureDetails
Nil,

Expand Down Expand Up @@ -117,11 +109,6 @@ lazy val commonSettings = Seq(
// scalacOptions in Test ~= (_ filterNot (_ == "-Xplugin-require:scalaxy-streams")),
// scalacOptions in Test += "-Xplugin-disable:scalaxy-streams",
// addCompilerPlugin("com.github.fdietze" % "scalaxy-streams" % "2.12-819f13722a-1"), //TODO: https://github.com/nativelibs4java/scalaxy-streams/pull/13

libraryDependencies ++= Seq(
compilerPlugin("com.github.ghik" %% "silencer-plugin" % Deps.silencerVersion),
"com.github.ghik" %% "silencer-lib" % Deps.silencerVersion % Provided
)
)

lazy val commonWebSettings = Seq(
Expand Down
14 changes: 6 additions & 8 deletions project/Deps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import sbt._
object Deps {
import Def.{ setting => dep }

val silencerVersion = "1.4.2"

val acyclicDef = "com.lihaoyi" %% "acyclic" % "0.2.0"
val acyclic = dep(acyclicDef % "provided")

Expand All @@ -27,7 +25,7 @@ object Deps {
val httpCore = dep("com.typesafe.akka" %% "akka-http-core" % httpVersion)
val httpCirce = dep("de.heikoseeberger" %% "akka-http-circe" % "1.30.0")
val httpPlay = dep("de.heikoseeberger" %% "akka-http-play-json" % "1.30.0")
val httpCors = dep("ch.megard" %% "akka-http-cors" % "0.3.1")
val httpCors = dep("ch.megard" %% "akka-http-cors" % "1.1.0")
val stream = dep("com.typesafe.akka" %% "akka-stream" % version)
val actor = dep("com.typesafe.akka" %% "akka-actor" % version)
val testkit = dep("com.typesafe.akka" %% "akka-testkit" % version)
Expand All @@ -50,7 +48,7 @@ object Deps {
val scalaJsDom = dep("org.scala-js" %%% "scalajs-dom" % "1.0.0")
val d3v4 = dep("com.github.fdietze.scala-js-d3v4" %%% "scala-js-d3v4" % "809f086")
// val d3v4 = dep("com.github.fdietze" %%% "scala-js-d3v4" % "master-SNAPSHOT")
val fontawesome = dep("com.github.fdietze" % "scala-js-fontawesome" % "308e305")
val fontawesome = dep("com.github.fdietze.scala-js-fontawesome" %%% "scala-js-fontawesome" % "559c7f7")
val vectory = dep("com.github.fdietze.vectory" %%% "vectory" % "14bf5d2")
val scalarx = dep("com.lihaoyi" %%% "scalarx" % "0.4.3")
val outwatch = new {
Expand Down Expand Up @@ -81,7 +79,7 @@ object Deps {
val base58s = dep("io.github.fdietze.base58s" %%% "base58s" % "43d5684")
val monix = dep("io.monix" %%% "monix" % "3.2.2")
// val taggedTypes = dep("org.rudogma" %%% "supertagged" % "2.0-RC1")
val taggedTypes = dep("com.github.lolgab" % "scala-supertagged" % "scalajs-1.0.0-RC2-SNAPSHOT")
val taggedTypes = dep("com.github.fdietze.scala-supertagged" % "supertagged_2.13" % "0157b28") // until https://github.com/rudogma/scala-supertagged/pull/2 is merged
val colorado = dep("com.github.fdietze.colorado" %%% "colorado" % "d36c389")
val scalacss = dep("com.github.japgolly.scalacss" %%% "core" % "0.6.1")
val kantanRegex = new {
Expand Down Expand Up @@ -109,16 +107,16 @@ object Deps {
}

// auth
val hasher = dep("com.roundeights" %% "hasher" % "1.2.0")
val hasher = dep("com.roundeights" %% "hasher" % "1.2.0") //TODO: https://github.com/Nycto/Hasher/pull/28
val jbcrypt = dep("org.mindrot" % "jbcrypt" % "0.4")
val jwt = dep("com.pauldijou" %% "jwt-circe" % "4.2.0")
val bouncyCastle = dep("org.bouncycastle" % "bcpkix-jdk15on" % "1.60")
val oAuthServer = dep("com.nulab-inc" %% "scala-oauth2-core" % "1.3.0")
val oAuthAkkaProvider = dep("com.nulab-inc" %% "akka-http-oauth2-provider" % "1.3.0")
val oAuthClient = dep("com.github.fdietze" % "akka-http-oauth2-client" % "cf77841")
val oAuthClient = dep("com.github.fdietze.akka-http-oauth2-client" %% "akka-http-oauth2-client" % "dd8e734")

// database
val quill = dep("io.getquill" %% "quill-async-postgres" % "3.2.2")
val quill = dep("io.getquill" %% "quill-async-postgres" % "3.5.2")

// interfaces
//val github4s = dep("com.47deg" %% "github4s" % "0.17.0") // only temporarly here
Expand Down
3 changes: 1 addition & 2 deletions util/shared/src/main/scala/wust/util/macros/SubObjects.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package wust.util.macros

import scala.reflect.macros.blackbox.Context
import scala.collection.breakOut

// This macro is for expanding a class type into a list of objects that extend this class.
// Example:
Expand All @@ -27,7 +26,7 @@ object SubObjectsMacro {
case _ => Set.empty
}

val subObjects: Array[Tree] = recursiveSubObjects(traitTag.tpe.typeSymbol).map(utils.fullNameTree)(breakOut)
val subObjects: Array[Tree] = recursiveSubObjects(traitTag.tpe.typeSymbol).map(utils.fullNameTree).toArray
c.Expr[Array[Trait]](q"..$subObjects")
/* TODO: generates too much runtime code:
var array = [$m_Lwust_webApp_state_Feature$TaskUnchecked$(), $m_Lwust_webApp_state_Feature$TaskChecked$(), $m_Lwust_webApp_state_Feature$TaskReordered$()];
Expand Down

0 comments on commit 3fe565c

Please sign in to comment.