Skip to content

Commit

Permalink
Merge pull request #6 from zio/disable_mdoc_compilation
Browse files Browse the repository at this point in the history
temporary disable mdoc compilation
  • Loading branch information
senia-psm authored Apr 28, 2023
2 parents f355710 + 547a3c6 commit 39c0fb5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ lazy val zioBsonMagnolia = project
"org.scala-lang.modules" %% "scala-collection-compat" % scalaCollectionCompatVersion
),
scalaReflectTestSettings,
macroDefinitionSettings
macroDefinitionSettings,
scalacOptions -= "-Xfatal-warnings"
)
.settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"))
.enablePlugins(BuildInfoPlugin)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ val res: Either[String,Banana] = Left(.curvature: Expected BSON type Double, but

You can configure typeclass derivation with annotations.

```scala mdoc:compile-only
```scala
import zio.bson._
import zio.bson.BsonBuilder._
import zio.bson.magnolia._
Expand Down
14 changes: 14 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const sidebars = {
sidebar: [
{
type: "category",
label: "ZIO Bson",
collapsed: false,
link: { type: "doc", id: "index" },
items: [
]
}
]
};

module.exports = sidebars;
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ object BsonCodecConfiguration {
* case class Outer(mySum: MySum)
* }}}
*
* Result BSON for `DiscriminatorField("$type")`:
* Result BSON for `DiscriminatorField("type")`:
* {{{
* {
* mySum: {
* $type: "SomeBranch"
* type: "SomeBranch"
* a: 123
* }
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package zio.bson.magnolia

import zio.bson.BsonCodec

import scala.language.experimental.macros

object DeriveBsonCodec {
def derive[T]: BsonCodec[T] = macro genBoth[T]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import zio.bson.{BsonDecoder, _}

import scala.collection.immutable.{ArraySeq, HashMap}
import scala.jdk.CollectionConverters._
import scala.language.experimental.macros

trait DeriveBsonDecoder {
type Typeclass[T] = BsonDecoder[T]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import zio.bson.magnolia.BsonCodecConfiguration.SumTypeHandling
import zio.bson.{BsonEncoder, _}

import scala.jdk.CollectionConverters._
import scala.language.experimental.macros

trait DeriveBsonEncoder {
type Typeclass[T] = BsonEncoder[T]
Expand Down

0 comments on commit 39c0fb5

Please sign in to comment.