Skip to content

Commit

Permalink
v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
marcgrue committed Jul 5, 2024
1 parent 49441e4 commit f838fa6
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 56 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand All @@ -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
)
Expand Down
91 changes: 45 additions & 46 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -499,4 +498,4 @@ lazy val withoutDocs = Def.settings(
Test / publishArtifact := false,
doc / sources := Seq.empty,
packageDoc / publishArtifact := false
)
)
22 changes: 21 additions & 1 deletion project/build-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To have molecule jars generated, add `-Dmolecule=true`
## Compile JS

sbt
moleculeJS/fastOptJS
moleculeJS/fastLinkJS


## Publish
Expand All @@ -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..

4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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"
27 changes: 27 additions & 0 deletions project/releases/v0.9.0.md
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 19 additions & 0 deletions project/resources/ScalaCollectionsMermaid.md
Original file line number Diff line number Diff line change
@@ -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;
```
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f838fa6

Please sign in to comment.