diff --git a/README.md b/README.md index 1aa9cc7cd..672c317ca 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ sbt.version = 1.10.0 `project/plugins.sbt`: ```scala -addSbtPlugin("org.scalamolecule" % "sbt-molecule" % "1.7.0") +addSbtPlugin("org.scalamolecule" % "sbt-molecule" % "1.8.0") ``` `build.sbt`: @@ -193,11 +193,12 @@ lazy val yourProject = project.in(file("app")) .settings( libraryDependencies ++= Seq( // One or more of: - "org.scalamolecule" %%% "molecule-datalog-datomic" % "0.8.0", - "org.scalamolecule" %%% "molecule-sql-h2" % "0.8.0", - "org.scalamolecule" %%% "molecule-sql-mariadb" % "0.8.0", - "org.scalamolecule" %%% "molecule-sql-mysql" % "0.8.0", - "org.scalamolecule" %%% "molecule-sql-postgres" % "0.8.0", + "org.scalamolecule" %%% "molecule-sql-postgres" % "0.9.0", + "org.scalamolecule" %%% "molecule-sql-sqlite" % "0.9.0", + "org.scalamolecule" %%% "molecule-sql-mysql" % "0.9.0", + "org.scalamolecule" %%% "molecule-sql-mariadb" % "0.9.0", + "org.scalamolecule" %%% "molecule-sql-h2" % "0.9.0", + "org.scalamolecule" %%% "molecule-datalog-datomic" % "0.9.0", ), moleculeSchemas := Seq("app") // paths to your data model definitions ) diff --git a/build.sbt b/build.sbt index a30508718..d08d5fee2 100644 --- a/build.sbt +++ b/build.sbt @@ -19,10 +19,8 @@ inThisBuild( organizationName := "ScalaMolecule", organizationHomepage := Some(url("http://www.scalamolecule.org")), versionScheme := Some("early-semver"), - version := "0.8.1-SNAPSHOT", - // scalaVersion := scala212, - // scalaVersion := scala213, - scalaVersion := scala3, + version := "0.9.0", + scalaVersion := scala213, crossScalaVersions := allScala, // Run tests for all systems sequentially to avoid data locks with db @@ -187,46 +185,46 @@ lazy val datalogDatomic = crossProject(JSPlatform, JVMPlatform) .settings( testFrameworks := testingFrameworks, - // Temporarily limit number of tests to be compiled by sbt (comment out this whole sbt setting to test all) - // Note that intellij doesn't recognize this setting - there you can right-click on files and exclude - unmanagedSources / excludeFilter := { - val test = "src/test/scala/molecule/datalog/datomic" - def path(platform: String) = (baseDirectory.value / s"../$platform/$test").getCanonicalPath - val jsTests = path("js") - val jvmTests = path("jvm") - val sharedTests = path("shared") - val allowed = Seq( - // sharedTests + "/compliance/aggr", - // sharedTests + "/compliance/api", - // sharedTests + "/compliance/crud", - // sharedTests + "/compliance/crud/update", - // sharedTests + "/compliance/crud/update/ops", - // sharedTests + "/compliance/crud/update/relation", - // sharedTests + "/compliance/filter", - // sharedTests + "/compliance/filterAttr", - // sharedTests + "/compliance/inspect", - // sharedTests + "/compliance/pagination", - // sharedTests + "/compliance/partitions", - // sharedTests + "/compliance/relation", - // sharedTests + "/compliance/sort", - // sharedTests + "/compliance/subscription", - // sharedTests + "/compliance/time", - // sharedTests + "/compliance/validation", - // sharedTests + "/compliance", - sharedTests + "/setup", - jvmTests + "/setup", - jsTests + "/setup", - jsTests + "/AdhocJS_datomic.scala", - // jvmTests + "/AdhocJVM_datomic.scala", - // sharedTests + "/Adhoc_datomic.scala", - ) - new SimpleFileFilter(f => - (f.getCanonicalPath.startsWith(jsTests) - || f.getCanonicalPath.startsWith(jvmTests) - || f.getCanonicalPath.startsWith(sharedTests)) && - !allowed.exists(p => f.getCanonicalPath.startsWith(p)) - ) - }, + // // Temporarily limit number of tests to be compiled by sbt (comment out this whole sbt setting to test all) + // // Note that intellij doesn't recognize this setting - there you can right-click on files and exclude + // unmanagedSources / excludeFilter := { + // val test = "src/test/scala/molecule/datalog/datomic" + // def path(platform: String) = (baseDirectory.value / s"../$platform/$test").getCanonicalPath + // val jsTests = path("js") + // val jvmTests = path("jvm") + // val sharedTests = path("shared") + // val allowed = Seq( + // // sharedTests + "/compliance/aggr", + // // sharedTests + "/compliance/api", + // // sharedTests + "/compliance/crud", + // // sharedTests + "/compliance/crud/update", + // // sharedTests + "/compliance/crud/update/ops", + // // sharedTests + "/compliance/crud/update/relation", + // // sharedTests + "/compliance/filter", + // // sharedTests + "/compliance/filterAttr", + // // sharedTests + "/compliance/inspect", + // // sharedTests + "/compliance/pagination", + // // sharedTests + "/compliance/partitions", + // // sharedTests + "/compliance/relation", + // // sharedTests + "/compliance/sort", + // // sharedTests + "/compliance/subscription", + // // sharedTests + "/compliance/time", + // // sharedTests + "/compliance/validation", + // // sharedTests + "/compliance", + // sharedTests + "/setup", + // jvmTests + "/setup", + // jsTests + "/setup", + // jsTests + "/AdhocJS_datomic.scala", + // // jvmTests + "/AdhocJVM_datomic.scala", + // // sharedTests + "/Adhoc_datomic.scala", + // ) + // new SimpleFileFilter(f => + // (f.getCanonicalPath.startsWith(jsTests) + // || f.getCanonicalPath.startsWith(jvmTests) + // || f.getCanonicalPath.startsWith(sharedTests)) && + // !allowed.exists(p => f.getCanonicalPath.startsWith(p)) + // ) + // }, ) .jsSettings(jsEnvironment) .dependsOn(datalogCore) @@ -417,7 +415,8 @@ lazy val compilerArgs = Def.settings( "-language:existentials", "-unchecked", "-Xfatal-warnings", - "11" + // "-source:11", // ? + // "-target:11" ) ++ (CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, 12)) => Seq( @@ -499,4 +498,4 @@ lazy val withoutDocs = Def.settings( Test / publishArtifact := false, doc / sources := Seq.empty, packageDoc / publishArtifact := false -) +) \ No newline at end of file diff --git a/project/build-info.md b/project/build-info.md index c938b93fb..8870552a7 100644 --- a/project/build-info.md +++ b/project/build-info.md @@ -32,7 +32,7 @@ To have molecule jars generated, add `-Dmolecule=true` ## Compile JS sbt - moleculeJS/fastOptJS + moleculeJS/fastLinkJS ## Publish @@ -48,3 +48,23 @@ Publish versions separately sbt ++2.12.19 publishLocal sbt ++2.12.19 publishSigned -Ddocs=true + +### Misc + +To see available paths for tests if generated code is missing on classpath + + sbt + test:soureDirectories + +or inspect + + sbt + inspect tree compile:managedSourceDirectories + inspect tree compile:unmanagedSourceDirectories + inspect tree compile + inspect tree test:managedSourceDirectories + inspect tree test:unmanagedSourceDirectories + inspect tree test + +etc.. + \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index b6c9f6959..7268e3782 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,8 +1,8 @@ -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") -addSbtPlugin("org.scalamolecule" % "sbt-molecule" % "1.7.1-SNAPSHOT") +addSbtPlugin("org.scalamolecule" % "sbt-molecule" % "1.8.0") libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0" diff --git a/project/releases/v0.9.0.md b/project/releases/v0.9.0.md new file mode 100644 index 000000000..ca39540da --- /dev/null +++ b/project/releases/v0.9.0.md @@ -0,0 +1,27 @@ +This is a big release with a lot of fundamental changes. + +### Letting go of MongDB + +Realising that Molecule likely won't appeal to the schema-less use cases of Mongo. Besides, Mongo with it's two data models (embedded/referenced) is a nightmare to implement. Possible, but likely not worth it. + +Some background examples of thoughts against Mongo: +https://www.reddit.com/r/PostgreSQL/comments/19bkn8b/doubt_regarding_postgresql_vs_mongodb/ +https://www.reddit.com/r/programming/comments/15qtfvf/goodbye_mongodb/ + +And an older one: +https://news.ycombinator.com/item?id=6712703 + + +### Welcoming SQlite + +SQlite is now implemented in Molecule. It's fast. + + +### General improvements + +- Improved Map api and key/value handling. +- More powerful and clear update/upsert semantics allowing updating across relationships! +- Distinction between Seqs of all primitive types except Byte that is saved in an Array for serialization etc. +- General focusing of expression api. +- Aggregation of collection types dropped to keep things simple and focused. +- RawQuery now return List[List[Any]] - dropping futile attempt at returning a typed result. Raw is raw. \ No newline at end of file diff --git a/project/resources/ScalaCollectionsMermaid.md b/project/resources/ScalaCollectionsMermaid.md new file mode 100644 index 000000000..a704f3d48 --- /dev/null +++ b/project/resources/ScalaCollectionsMermaid.md @@ -0,0 +1,19 @@ + + +```mermaid +graph TD + A(Traversable) --> B(Iterable) + B --> C(Seq) + B --> D(Set) + B --> E(Map) + C --> F(IndexedSeq) + C --> G(LinearSeq) + D --> H(SortedSet) + H --> I(BiSet) + E --> J(SortedMap) + + classDef Red fill:#00AED499; + class C,D,E Red; + + linkStyle default fill: none, stroke: grey; +``` diff --git a/sql/sqlite/shared/src/test/scala/molecule/sql/sqlite/compliance/api/AsyncApi.scala b/sql/sqlite/shared/src/test/scala/molecule/sql/sqlite/compliance/api/AsyncApi.scala index 076371026..745c97cff 100644 --- a/sql/sqlite/shared/src/test/scala/molecule/sql/sqlite/compliance/api/AsyncApi.scala +++ b/sql/sqlite/shared/src/test/scala/molecule/sql/sqlite/compliance/api/AsyncApi.scala @@ -1,6 +1,6 @@ package molecule.sql.sqlite.compliance.api -import molecule.coreTests.spi.api._ +import molecule.coreTests.spi.api.AsyncApi import molecule.sql.sqlite.setup.TestAsync_sqlite object AsyncApi extends AsyncApi with TestAsync_sqlite