From a30dc1c3b01da5ab44360bd6604b10d0120c66a3 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Wed, 18 Jan 2023 14:54:44 +0330 Subject: [PATCH 1/9] add scaladoc support. --- .github/workflows/site.yml | 48 +++++-- README.md | 279 ++++++++++++++++++++++++++++++------- build.sbt | 31 +++-- project/plugins.sbt | 7 +- 4 files changed, 281 insertions(+), 84 deletions(-) diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index 761aff4a3..3550fbec3 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -3,25 +3,49 @@ name: Website 'on': + workflow_dispatch: {} release: types: - published push: branches: - master + pull_request: {} jobs: + build: + name: Build and Test + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: Git Checkout + uses: actions/checkout@v3.3.0 + with: + fetch-depth: '0' + - name: Setup Scala + uses: actions/setup-java@v3.9.0 + with: + distribution: temurin + java-version: 17 + check-latest: true + - name: Check if the README file is up to date + run: sbt docs/checkReadme + - name: Check if the site workflow is up to date + run: sbt docs/checkGithubWorkflow + - name: Check artifacts build process + run: sbt +publishLocal + - name: Check website build process + run: sbt docs/clean; sbt docs/buildWebsite publish-docs: name: Publish Docs runs-on: ubuntu-latest - if: ${{ (github.event_name == 'release') && (github.event.action == 'published') - }} + if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }} steps: - name: Git Checkout - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v3.3.0 with: fetch-depth: '0' - name: Setup Scala - uses: actions/setup-java@v3.6.0 + uses: actions/setup-java@v3.9.0 with: distribution: temurin java-version: 17 @@ -32,26 +56,27 @@ jobs: node-version: 16.x registry-url: https://registry.npmjs.org - name: Publish Docs to NPM Registry - run: sbt docs/publishToNpm + run: sbt docs/publishToNpm env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} generate-readme: name: Generate README runs-on: ubuntu-latest + if: ${{ (github.event_name == 'push') || ((github.event_name == 'release') && (github.event_name == 'published')) }} steps: - name: Git Checkout - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v3.3.0 with: ref: ${{ github.head_ref }} fetch-depth: '0' - name: Setup Scala - uses: actions/setup-java@v3.6.0 + uses: actions/setup-java@v3.9.0 with: distribution: temurin java-version: 17 check-latest: true - name: Generate Readme - run: sbt docs/generateReadme + run: sbt docs/generateReadme - name: Commit Changes run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" @@ -59,9 +84,9 @@ jobs: git add README.md git commit -m "Update README.md" || echo "No changes to commit" - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v4.2.3 with: - body: | + body: |- Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin. I will automatically update the README.md file whenever there is new change for README.md, e.g. @@ -69,6 +94,5 @@ jobs: - After any changes to the "docs/index.md" file, I will update the README.md file accordingly. branch: zio-sbt-website/update-readme commit-message: Update README.md - branch-suffix: short-commit-hash + delete-branch: true title: Update README.md - diff --git a/README.md b/README.md index 30a00d57a..587fd496e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,28 @@ +[//]: # (This file was autogenerated using `zio-sbt-website` plugin via `sbt generateReadme` command.) +[//]: # (So please do not edit it manually. Instead, change "docs/index.md" file or sbt setting keys) +[//]: # (e.g. "readmeDocumentation" and "readmeSupport".) + # ZIO SQL -| Project Stage | CI | Release | Snapshot | Discord | -| --- | --- | --- | --- | --- | -| [![Project stage][Stage]][Stage-Page] | ![CI][badge-ci] | [![Release Artifacts][Badge-SonatypeReleases]][Link-SonatypeReleases] | [![Snapshot Artifacts][Badge-SonatypeSnapshots]][Link-SonatypeSnapshots] | [![badge-discord]][link-discord] | +ZIO SQL lets you write type-safe, type-inferred, and composable SQL queries in ordinary Scala, helping you prevent persistence bugs before they happen, and leverage your IDE to make writing SQL productive, safe, and fun. + +[![Production Ready](https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](https://github.com/zio/zio-sql/workflows/CI/badge.svg) [![Sonatype Releases](https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-sql_2.13.svg?label=Sonatype%20Release)](https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-sql_2.13/) [![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-sql_2.13.svg?label=Sonatype%20Snapshot)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-sql_2.13/) [![javadoc](https://javadoc.io/badge2/dev.zio/zio-sql-docs_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/zio-sql-docs_2.13) [![ZIO SQL](https://img.shields.io/github/stars/zio/zio-sql?style=social)](https://github.com/zio/zio-sql) + +## Introduction + +* **Type-safety**. ZIO SQL queries are type-safe by construction. Most classes of bugs can be detected at compile-time, shortening your feedback loop and helping you use your IDE to write correct queries. +* **Composable**. All ZIO SQL components are ordinary values, which can be transformed and composed in sensible ways. This uniformity and regularity means you have a lot of power in a small package. +* **Type-inferred**. ZIO SQL uses maximal variance and lower-kinded types, which means it features very good type inference. You can let Scala figure out the types required for type-safe SQL. +* **No magic**. ZIO SQL does not need any macros or plug-ins to operate (everything is a value!), and it works across both Scala 2.x and Scala 3. Optionally, Scala schema can be created from database schemas. + +ZIO SQL can be used as a library for modeling SQL in a type-safe ADT. In addition, ZIO SQL has a JDBC interface, which utilizes the type-safe SQL ADT for interacting with common JDBC databases. + +For the JDBC module: + +- Like Slick, ZIO SQL has an emphasis on type-safe SQL construction using Scala values and methods. However, ZIO SQL utilizes reified lenses, contravariant intersection types, and in-query nullability to improve ergonomics for end-users. Unlike Slick, the intention is to use names resembling SQL instead of trying to mimic the Scala collections. +- Like Doobie, ZIO SQL is purely functional, but ZIO SQL does compile-time query validation that catches most issues, and has rich ZIO integration, offering improved type-safety compared to monofunctor effects and minimal dependencies (depending only on ZIO). + +ZIO SQL does not offer Language Integrated Queries (LINQ) or similar functionality. It is intended only as a data model for representing SQL queries and an accompanying lightweight JDBC-based executor. ## Current status: Non-production release @@ -13,63 +33,204 @@ :white_check_mark: - some more work needed #### General features: -Feature | Progress -:------------ | :------------- -Type-safe schema | :heavy_check_mark: -Type-safe DSL | :heavy_check_mark: -Running Reads | :heavy_check_mark: -Running Deletes | :heavy_check_mark: -Running Updates | :heavy_check_mark: -Running Inserts | :heavy_check_mark: -Transactions | :white_check_mark: -Connection pool | :white_check_mark: + +| Feature | Progress | +|:-----------------|:-------------------| +| Type-safe schema | :heavy_check_mark: | +| Type-safe DSL | :heavy_check_mark: | +| Running Reads | :heavy_check_mark: | +| Running Deletes | :heavy_check_mark: | +| Running Updates | :heavy_check_mark: | +| Running Inserts | :heavy_check_mark: | +| Transactions | :white_check_mark: | +| Connection pool | :white_check_mark: | #### Db-specific features: -Feature | PostgreSQL | SQL Server | Oracle | MySQL -:------------ | :-------------| :-------------|:-------------------| :------------- -Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -Render Delete | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -Render Update | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -Render Insert | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -Functions | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -Types | :white_check_mark: | | | :white_check_mark: | -Operators | | | | | - -## What is ZIO SQL? -ZIO SQL lets you write type-safe, type-inferred, and composable SQL queries in ordinary Scala, helping you prevent persistence bugs before they happen, and leverage your IDE to make writing SQL productive, safe, and fun. - - * **Type-safety**. ZIO SQL queries are type-safe by construction. Most classes of bugs can be detected at compile-time, shortening your feedback loop and helping you use your IDE to write correct queries. - * **Composable**. All ZIO SQL components are ordinary values, which can be transformed and composed in sensible ways. This uniformity and regularity means you have a lot of power in a small package. - * **Type-inferred**. ZIO SQL uses maximal variance and lower-kinded types, which means it features very good type inference. You can let Scala figure out the types required for type-safe SQL. - * **No magic**. ZIO SQL does not need any macros or plug-ins to operate (everything is a value!), and it works across both Scala 2.x and Scala 3. Optionally, Scala schema can be created from database schemas. - -ZIO SQL can be used as a library for modeling SQL in a type-safe ADT. In addition, ZIO SQL has a JDBC interface, which utilizes the type-safe SQL ADT for interacting with common JDBC databases. +| Feature | PostgreSQL | SQL Server | Oracle | MySQL | +|:--------------|:-------------------|:-------------------|:-------------------|:-------------------| +| Render Read | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Render Delete | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Render Update | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Render Insert | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Functions | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Types | :white_check_mark: | | | :white_check_mark: | +| Operators | | | | | -For the JDBC module: +## Installation - - Like Slick, ZIO SQL has an emphasis on type-safe SQL construction using Scala values and methods. However, ZIO SQL utilizes reified lenses, contravariant intersection types, and in-query nullability to improve ergonomics for end-users. Unlike Slick, the intention is to use names resembling SQL instead of trying to mimic the Scala collections. - - Like Doobie, ZIO SQL is purely functional, but ZIO SQL does compile-time query validation that catches most issues, and has rich ZIO integration, offering improved type-safety compared to monofunctor effects and minimal dependencies (depending only on ZIO). +ZIO SQL is packaged into separate modules for different databases. Depending on which of these (currently supported) systems you're using, you will need to add one of the following dependencies: -ZIO SQL does not offer Language Integrated Queries (LINQ) or similar functionality. It is intended only as a data model for representing SQL queries and an accompanying lightweight JDBC-based executor. +```scala +//PostgreSQL +libraryDependencies += "dev.zio" %% "zio-sql-postgres" % "0.1.1" + +//MySQL +libraryDependencies += "dev.zio" %% "zio-sql-mysql" % "0.1.1" + +//Oracle +libraryDependencies += "dev.zio" %% "zio-sql-oracle" % "0.1.1" + +//SQL Server +libraryDependencies += "dev.zio" %% "zio-sql-sqlserver" % "0.1.1" +``` + +## Imports and modules + +Most of the needed imports will be resolved with + +```scala +import zio.sql._ +``` + +ZIO SQL relies heavily on path dependent types, so to use most of the features you need to be in the scope of one of the database modules: + +```scala +trait MyRepositoryModule extends PostgresModule { + + // your ZIO SQL code here + +} + +// other available modules are MysqlModule, OracleModule and SqlServerModule +``` + +We will assume this scope in the following examples. + +## Table schema + +In order to construct correct and type-safe queries, we need to describe tables by writing user defined data type - case class in which +name of the case class represents table name, field names represent column names and field types represent column types. + +Values that will represent tables in DSL are then created by calling `defineTable` method which takes case class type parameter. +In order for `defineTable` to work, user need to provide implicit `Schema` of data type. + +```scala +import java.util.UUID +import zio.sql.postgresql.PostgresJdbcModule +import java.time._ + +object Repository extends PostgresJdbcModule { + final case class Product(id: UUID, name: String, price: BigDecimal) + implicit val productSchema = DeriveSchema.gen[Product] + + val products = defineTableSmart[Product] + + final case class Order(id: UUID, productId: UUID, quantity: Int, orderDate: LocalDate) + implicit val orderSchema = DeriveSchema.gen[Order] + + val orders = defineTable[Order] +} +``` + +`defineTable` method is overloaded with an alternative that takes table name as an input. User can also specify table name using `@name` annotation. +Alternatively user can use `defineTableSmart` method which will smartly pluralize table name according to english grammar. +`OrderOrigin` -> `order_origins` +`Foot` -> `feet` +`PersonAddress` -> `person_addresses` +Field names are also converted to lowercase and snake case. +`productId` -> `product_id` and so on. + + +## Table schema decomposition + +Once we have our table definition we need to decompose table into columns which we will use in queries. +Using the previous example with `Product` and `Order` table -[badge-ci]: https://github.com/zio/zio-sql/workflows/CI/badge.svg -[Badge-SonatypeReleases]: https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-sql_2.13.svg "Sonatype Releases" -[Badge-SonatypeSnapshots]: https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-sql_2.13.svg "Sonatype Snapshots" -[badge-discord]: https://img.shields.io/discord/629491597070827530?logo=discord "chat on discord" -[Link-SonatypeReleases]: https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-sql_2.13/ "Sonatype Releases" -[Link-SonatypeSnapshots]: https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-sql_2.13/ "Sonatype Snapshots" -[link-discord]: https://discord.gg/2ccFBr4 "Discord" -[Stage]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg -[Stage-Page]: https://github.com/zio/zio/wiki/Project-Stages - -## Setup +```scala +val (id, name, price) = products.columns + +val (orderId, productId, quantity) = orders.columns +``` + +## Selects + +Simple select. + +```scala +val allProducts = select(productId, name, price).from(products) +``` + +Using `where` clause. + +```scala +def productById(id: UUID) = + select(productId, name, price).from(products).where(productId === id) +``` + +Inner join. + +```scala +val ordersWithProductNames = + select(orderId, name).from(products.join(orders).on(productId === fkProductId)) +``` + +Left outer join. + +```scala +val leftOuter = + select(orderId, name).from(products.leftOuter(orders).on(productId === fkProductId)) +``` + +Right outer join. + +```scala +val rightOuter = + select(orderId, name).from(products.rightOuter(orders).on(productId === fkProductId)) +``` + +Using `limit` and `offset` + +```scala +val limitedResults = + select(orderId, name) + .from(products.join(orders) + .on(productId === fkProductId)) + .limit(5) + .offset(10) +``` + +## Inserts + +```scala +insertInto(products) + (productId, name, price) + .values((UUID.randomUUID(), "Zionomicon", 10.5)) +``` + +## Updates + +TODO: details + +## Deletes + +TODO: details + +## Transactions + +TODO: details + +## Printing queries + +TODO: details + +## Running queries + +TODO: details + +## Documentation + +Learn more on the [ZIO SQL homepage](https://zio.dev/zio-sql/)! + +## Contributing + +For the general guidelines, see ZIO [contributor's guide](https://zio.dev/about/contributing).### TL;DR Prerequisites (installed): - | Technology | Version | - | ------------ | ---------------- | - | sbt | 1.4.3 | - | Docker | 3.1 | +| Technology | Version | +|------------|---------| +| sbt | 1.4.3 | +| Docker | 3.1 | To set up the project follow below steps: 1. Fork the repository. @@ -78,7 +239,17 @@ To set up the project follow below steps: 4. In project directory execute `sbt test`. 5. Pick up an issue & you are ready to go! -If you want to learn more, please check out: +## Code of Conduct + +See the [Code of Conduct](https://zio.dev/about/code-of-conduct) + +## Support + +Come chat with us on [![Badge-Discord]][Link-Discord]. + +[Badge-Discord]: https://img.shields.io/discord/629491597070827530?logo=discord "chat on discord" +[Link-Discord]: https://discord.gg/2ccFBr4 "Discord" + +## License - - [ZIO SQL Homepage](https://zio.dev/zio-sql) - - [ZIO SQL Discord](https://discord.gg/2ccFBr4) +[License](LICENSE) diff --git a/build.sbt b/build.sbt index 10a4517ac..fa69133ea 100644 --- a/build.sbt +++ b/build.sbt @@ -46,7 +46,8 @@ lazy val root = project postgres, sqlserver, jdbc_hikaricp, - macros + macros, + docs ) lazy val core = crossProject(JSPlatform, JVMPlatform) @@ -91,19 +92,25 @@ lazy val macros = project lazy val docs = project .in(file("zio-sql-docs")) .settings( - publish / skip := true, - moduleName := "zio-sql-docs", + moduleName := "zio-sql-docs", scalacOptions -= "-Yno-imports", scalacOptions -= "-Xfatal-warnings", - projectName := "ZIO SQL", - badgeInfo := Some( - BadgeInfo( - artifact = "zio-sql_2.12", - projectStage = ProjectStage.ProductionReady - ) + projectName := "ZIO SQL", + mainModuleName := (coreJVM / moduleName).value, + projectStage := ProjectStage.ProductionReady, + ScalaUnidoc / unidoc / unidocProjectFilter := inProjects( + coreJVM, + driver, + jdbc, + mysql, + oracle, + postgres, + sqlserver, + jdbc_hikaricp, + macros ), - docsPublishBranch := "master", - readmeContribution := readmeContribution.value + + docsPublishBranch := "master", + readmeContribution := readmeContribution.value + """|### TL;DR |Prerequisites (installed): | @@ -120,7 +127,7 @@ lazy val docs = project |5. Pick up an issue & you are ready to go! |""".stripMargin ) - .dependsOn(postgres) + .dependsOn(coreJVM, postgres) .enablePlugins(WebsitePlugin) lazy val examples = project diff --git a/project/plugins.sbt b/project/plugins.sbt index 09fcbe0da..acea7ecba 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,14 +4,9 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.3") -addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") -addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.1") -addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.1.5+10-49adf3d7-SNAPSHOT") - -resolvers ++= Resolver.sonatypeOssRepos("public") +addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.6") From bcc5ff742522fd8cfca8efaad2d7d6a5178efc02 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Wed, 18 Jan 2023 15:43:19 +0330 Subject: [PATCH 2/9] fmt. --- project/plugins.sbt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index acea7ecba..7335b8393 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,12 +1,12 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.3") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") -addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.1") -addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.6") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.3") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") +addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.1") +addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.6") From a45a2ab1944c24ed5a8583ab6508d015847606c3 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Sat, 21 Jan 2023 10:41:48 +0330 Subject: [PATCH 3/9] cross scala versions for docs project. --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index fa69133ea..b6ee87388 100644 --- a/build.sbt +++ b/build.sbt @@ -95,6 +95,7 @@ lazy val docs = project moduleName := "zio-sql-docs", scalacOptions -= "-Yno-imports", scalacOptions -= "-Xfatal-warnings", + crossScalaVersions := Seq(Scala213, Scala212, ScalaDotty), projectName := "ZIO SQL", mainModuleName := (coreJVM / moduleName).value, projectStage := ProjectStage.ProductionReady, From 4a9198b281212196f02576bffbd2db7ca30a51df Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Sat, 21 Jan 2023 15:24:15 +0330 Subject: [PATCH 4/9] remove some extra projects. --- build.sbt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index b6ee87388..17551db19 100644 --- a/build.sbt +++ b/build.sbt @@ -106,9 +106,7 @@ lazy val docs = project mysql, oracle, postgres, - sqlserver, - jdbc_hikaricp, - macros + sqlserver ), docsPublishBranch := "master", readmeContribution := readmeContribution.value + From 0a931d1cf435d21f35c01d64fa5fd1f5b26148d1 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Sun, 22 Jan 2023 12:11:37 +0330 Subject: [PATCH 5/9] add just core jvm. --- build.sbt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 17551db19..3854e9e66 100644 --- a/build.sbt +++ b/build.sbt @@ -100,13 +100,7 @@ lazy val docs = project mainModuleName := (coreJVM / moduleName).value, projectStage := ProjectStage.ProductionReady, ScalaUnidoc / unidoc / unidocProjectFilter := inProjects( - coreJVM, - driver, - jdbc, - mysql, - oracle, - postgres, - sqlserver + coreJVM ), docsPublishBranch := "master", readmeContribution := readmeContribution.value + From b423d6f6dad25ad4e794f3cc05b14075f46703b8 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Sun, 22 Jan 2023 19:21:54 +0330 Subject: [PATCH 6/9] empty scaladoc. --- build.sbt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 3854e9e66..5fac47eef 100644 --- a/build.sbt +++ b/build.sbt @@ -99,9 +99,7 @@ lazy val docs = project projectName := "ZIO SQL", mainModuleName := (coreJVM / moduleName).value, projectStage := ProjectStage.ProductionReady, - ScalaUnidoc / unidoc / unidocProjectFilter := inProjects( - coreJVM - ), + ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(), docsPublishBranch := "master", readmeContribution := readmeContribution.value + """|### TL;DR From 99db1ad4f35727c97ab08914250d3107656a1bb6 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Mon, 23 Jan 2023 14:06:52 +0330 Subject: [PATCH 7/9] remove postgres. --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5fac47eef..7ad5e0edc 100644 --- a/build.sbt +++ b/build.sbt @@ -118,7 +118,7 @@ lazy val docs = project |5. Pick up an issue & you are ready to go! |""".stripMargin ) - .dependsOn(coreJVM, postgres) + .dependsOn(coreJVM) .enablePlugins(WebsitePlugin) lazy val examples = project From afc9e296c44793dd2e11daf9fd0219e21af9dbc8 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Mon, 23 Jan 2023 14:23:03 +0330 Subject: [PATCH 8/9] ignore forcing the ci. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1d978041..6db45b2ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: - name: Cache scala dependencies uses: coursier/cache-action@v5 - name: Run tests - run: sbt ++${{ matrix.scala }}! test + run: sbt ++${{ matrix.scala }} test website: runs-on: ubuntu-20.04 From 13d272e166134b4371baeb2f6be6895dd1bd9e43 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Mon, 23 Jan 2023 15:07:18 +0330 Subject: [PATCH 9/9] remove depend on --- build.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7ad5e0edc..a633ac84e 100644 --- a/build.sbt +++ b/build.sbt @@ -118,7 +118,6 @@ lazy val docs = project |5. Pick up an issue & you are ready to go! |""".stripMargin ) - .dependsOn(coreJVM) .enablePlugins(WebsitePlugin) lazy val examples = project