Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
language: scala
scala:
- 2.11.5
- 2.10.4
- 2.12.2
jdk:
- oraclejdk7
- oraclejdk8
sudo: false
cache:
directories:
- $HOME/.ivy2/cache
script:
- sbt ++$TRAVIS_SCALA_VERSION --warn update compile test:compile it:compile && sbt ++$TRAVIS_SCALA_VERSION test it:test && sbt ++$TRAVIS_SCALA_VERSION --warn unidoc
- sbt ++$TRAVIS_SCALA_VERSION --warn update test:compile it:compile && sbt ++$TRAVIS_SCALA_VERSION test it:test
187 changes: 97 additions & 90 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,103 +1,110 @@

organization in ThisBuild := "com.github.dwhjames"

licenses in ThisBuild += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))

version in ThisBuild := "0.7.0"


scalaVersion in ThisBuild := "2.11.6"

crossScalaVersions in ThisBuild := Seq("2.10.4", "2.11.6")

scalacOptions in ThisBuild ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-unchecked",
"-Xfatal-warnings",
"-Xfuture",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard"
)

scalacOptions in ThisBuild ++= (
if (scalaVersion.value.startsWith("2.10")) Nil
else List("-Ywarn-unused-import")
)

inThisBuild(List(
name := "Datomisca",
organization := "llc.flyingwalrus",
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
scalaVersion := "2.12.3"
))

val compilerOptions = Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-unchecked",
"-Xfatal-warnings",
"-Xfuture",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard"
)

resolvers in ThisBuild ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.typesafeRepo("releases"),
"clojars" at "https://clojars.org/repo",
"couchbase" at "http://files.couchbase.com/maven2"
)


shellPrompt in ThisBuild := CustomShellPrompt.customPrompt


// configure publishing to bintray
bintray.Plugin.bintraySettings

"clojars" at "https://clojars.org/repo"
)

lazy val datomisca = project.
in(file(".")).
aggregate(macros, core, tests, integrationTests)

// needed for aggregated build
MacroSettings.settings

libraryDependencies += Dependencies.Compile.datomic

// disable some aggregation tasks for subprojects
aggregate in doc := false

aggregate in Keys.`package` := false

aggregate in packageBin := false

aggregate in packageDoc := false

aggregate in packageSrc := false

aggregate in publish := false

aggregate in publishLocal := false

aggregate in PgpKeys.publishSigned := false

aggregate in PgpKeys.publishLocalSigned := false


lazy val macros = project in file("macros")

// map macros project classes and sources into root project
mappings in (Compile, packageBin) <++= mappings in (macros, Compile, packageBin)

mappings in (Compile, packageSrc) <++= mappings in (macros, Compile, packageSrc)
lazy val tests = project.in(file("tests")).
settings(noPublishSettings).
settings(
name := "datomisca-tests",
libraryDependencies ++= Seq(
datomic,
specs2
),
fork in Test := true,
publishArtifact := false
).
dependsOn(macros, core)

lazy val integrationTests = (project in file("integration")).
settings(noPublishSettings).
settings(Defaults.itSettings).
settings(
name := "datomisca-tests",
libraryDependencies ++= Seq(
datomic,
scalatest,
xmlModule
),
fork in IntegrationTest := true,
publishArtifact := false
).
dependsOn(macros, core).
configs(IntegrationTest)

lazy val core = project.
in(file("core")).
lazy val core = project.in(file("core")).
settings(
name := "datomisca-core",
baseSettings,
libraryDependencies += datomic,
(sourceGenerators in Compile) += ((sourceManaged in Compile) map Boilerplate.genCore).taskValue
).
dependsOn(macros)

// map core project classes and sources into root project
mappings in (Compile, packageBin) <++= mappings in (core, Compile, packageBin)

mappings in (Compile, packageSrc) <++= mappings in (core, Compile, packageSrc)


lazy val tests = project.
in(file("tests")).
dependsOn(macros, core)

lazy val macros = project.in(file("macros")).
settings(
name := "datomisca-macros",
addCompilerPlugin(paradise),
baseSettings,
libraryDependencies ++= Seq(
datomic,
reflect(scalaVersion.value)
)
)

lazy val integrationTests = project.
in(file("integration")).
dependsOn(macros, core).
configs(IntegrationTest)
lazy val docs = project.in(file("docs")).
settings(
name := "Datomisca Docs",
moduleName := "datomisca-docs"
).
settings(docSettings).
settings(noPublishSettings).
settings(addCompilerPlugin(paradise)).
dependsOn(core, macros).
enablePlugins(MicrositesPlugin)

val baseSettings = Seq(
scalacOptions ++= compilerOptions
)

val docSettings = baseSettings ++ Seq()

val publishSettings = Seq()

val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)

def datomic = "com.datomic" % "datomic-free" % "0.9.5561.54" % Provided
def specs2 = "org.specs2" %% "specs2" % "2.4.17" % Test
def scalatest = "org.scalatest" %% "scalatest" % "3.0.3" % "it"
def xmlModule = "org.scala-lang.modules" %% "scala-xml" % "1.0.6"
def paradise = "org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.patch
def reflect(vers: String) = "org.scala-lang" % "scala-reflect" % vers
17 changes: 0 additions & 17 deletions core/build.sbt

This file was deleted.

7 changes: 2 additions & 5 deletions core/src/main/scala/datomisca/Attribute.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

package datomisca

import scala.language.reflectiveCalls


/** The representation of Datomic attributes
*
* @constructor construct an attribute out of an ident, valueType,
Expand Down Expand Up @@ -55,15 +52,15 @@ final case class Attribute[DD, Card <: Cardinality](
def withNoHistory(b: Boolean) = copy( noHistory = Some(b) )

/** Construct the reverse attribute, if this is a reference attribute */
def reverse(implicit ev: =:=[DatomicRef.type, DD]): Attribute[DatomicRef.type, Cardinality.many.type] =
def reverse(/* implicit ev: =:=[DatomicRef.type, DD]*/): Attribute[DatomicRef.type, Cardinality.many.type] =
copy(
ident = clojure.lang.Keyword.intern(ident.getNamespace, "_" + ident.getName),
valueType = SchemaType.ref,
cardinality = Cardinality.many
)

/** Construct the reverse attribute, if this is a component reference attribute */
def reverseComponent(implicit ev: =:=[DatomicRef.type, DD]): Attribute[DatomicRef.type, Cardinality.one.type] = {
def reverseComponent(/* implicit ev: =:=[DatomicRef.type, DD]*/): Attribute[DatomicRef.type, Cardinality.one.type] = {
require(isComponent.getOrElse(false))
copy(
ident = clojure.lang.Keyword.intern(ident.getNamespace, "_" + ident.getName),
Expand Down
2 changes: 0 additions & 2 deletions core/src/main/scala/datomisca/DId.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package datomisca

import scala.language.existentials

import datomic.Util

sealed trait DId extends Any {
Expand Down
5 changes: 1 addition & 4 deletions core/src/main/scala/datomisca/Datomic.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
package datomisca

import scala.collection.JavaConverters._
import scala.util.{Try, Success, Failure}

import clojure.{lang => clj}

import scala.util.Try

/** Main object containing:
* - all Datomic basic functions (Peer, Transactor)
Expand Down
2 changes: 0 additions & 2 deletions core/src/main/scala/datomisca/DatomicMapping.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ package datomisca

import functional.CombinatorImplicits

import scala.language.implicitConversions

object DatomicMapping
extends CombinatorImplicits
{
Expand Down
3 changes: 0 additions & 3 deletions core/src/main/scala/datomisca/Fact.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

package datomisca

import scala.language.reflectiveCalls


object Fact {
/** Creates a single assertion about the given entity id `id`.
*
Expand Down
2 changes: 0 additions & 2 deletions core/src/main/scala/datomisca/Log.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package datomisca

import java.util.{Date => JDate}

/** Datomic's database log is a recording of all transaction data in historic
* order, organized for efficient access by transaction.
*
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/datomisca/exceptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object ExceptionInfo {

def getData(ex: clj.IExceptionInfo): Map[String, String] = {
val builder = Map.newBuilder[String, String]
var iter = ex.getData.iterator
val iter = ex.getData.iterator
while (iter.hasNext) {
val entry = iter.next.asInstanceOf[clj.IMapEntry]
builder += (entry.key.toString -> entry.`val`.toString)
Expand Down
1 change: 0 additions & 1 deletion core/src/main/scala/datomisca/excision.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package datomisca

import scala.language.reflectiveCalls
import scala.collection.JavaConverters._

import java.util.Date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@

package datomisca.executioncontext

import java.util.concurrent.{ LinkedBlockingQueue, Callable, Executor, ExecutorService, Executors, ThreadFactory, TimeUnit, ThreadPoolExecutor }
import java.util.Collection
import scala.concurrent.forkjoin._
import scala.concurrent.{ BlockContext, ExecutionContext, Awaitable, CanAwait, ExecutionContextExecutor, ExecutionContextExecutorService }
import scala.concurrent.duration.Duration
import java.util.concurrent._
import scala.concurrent.{ BlockContext, CanAwait, ExecutionContextExecutor }
import scala.util.control.NonFatal


Expand Down
2 changes: 0 additions & 2 deletions core/src/main/scala/datomisca/schemaManagement.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package datomisca

import scala.language.reflectiveCalls

import scala.concurrent.{ ExecutionContext, Future }
import scala.util.Try

Expand Down
3 changes: 0 additions & 3 deletions core/src/main/scala/datomisca/toAndFromDatomic.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ import java.{util => ju}
import java.util.{Date, UUID}
import java.net.URI

import clojure.{lang => clj}


/**
* Think of FromDatomicInj[DD, T] as a type-level function: DD => T
* The implicits here construct a multi-parameter type class,
Expand Down
3 changes: 0 additions & 3 deletions core/src/main/scala/datomisca/txdata.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

package datomisca

import scala.language.reflectiveCalls


trait TxData {
def toTxData: AnyRef
}
Expand Down
16 changes: 16 additions & 0 deletions docs/src/main/resources/microsite/css/override.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.technologies {
display: none;
}

.jumbotron {
background-image: none;
}

.sidebar-nav > .sidebar-brand a .brand-wrapper {
background-size: 36px 36px !important;
}

#site-header .navbar-wrapper .brand .icon-wrapper {
width: 36px;
background-size: 100%;
}
Loading