Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update versions & minor fixes #75

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,23 @@ data/
logs/
.idea/
.bsp/
sdap.sbt
sdap.sbt

# macOS
.DS_Store

# Bloop
.bsp

# VS Code
.vscode/

# Metals
.bloop/
.metals/
metals.sbt

# IDEA
.idea
.idea_modules
/.worksheet/
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
val zioVersion = "2.0.13"
val scala3_Version = "3.3.1"
val scala2_13Version = "2.13.12"
val scala2_12Version = "2.12.18"
val zioConfigVersion = "4.0.0-RC16"
val nebulaClientVersion = "3.6.1"
val zioVersion = "2.1.14"
val scala3_Version = "3.6.3"
val scala2_13Version = "2.13.16"
val scala2_12Version = "2.12.20"
val zioConfigVersion = "4.0.3"
val nebulaClientVersion = "3.8.4"
val logbackVersion = "1.4.11"
val silencerVersion = "1.4.2"
val testcontainersNebulaVersion = "0.1.2"
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/zio/nebula/NebulaSessionClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ trait NebulaSessionClient {

object NebulaSessionClient {

lazy val layer: ZLayer[Scope with NebulaSessionPoolConfig, Throwable, NebulaSessionClient] = ZLayer.fromZIO {
lazy val layer: ZLayer[Scope & NebulaSessionPoolConfig, Throwable, NebulaSessionClient] = ZLayer.fromZIO {
for {
nebulaConfig <- ZIO.service[NebulaSessionPoolConfig]
sessionPool <- ZIO.acquireRelease(
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/scala/zio/nebula/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import zio.nebula.storage._
package object nebula {

type SessionClient = NebulaSessionClient
type Client = NebulaClient with NebulaPoolConfig
type Client = NebulaClient & NebulaPoolConfig
type Storage = NebulaStorageClient
type Meta = NebulaMetaClient

Expand All @@ -24,8 +24,7 @@ package object nebula {
lazy val ClientEnv: ZLayer[Scope, Throwable, Client] =
ZLayer.makeSome[Scope, Client](
NebulaClient.layer,
NebulaConfig.poolConfigLayer,
NebulaConfig.sessionConfigLayer
NebulaConfig.poolConfigLayer
)

lazy val StorageEnv: ZLayer[Scope, Throwable, Storage] = ZLayer.makeSome[Scope, Storage](
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/scala/zio/nebula/NebulaSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import testcontainers.containers.NebulaSimpleClusterContainer

trait NebulaSpec extends ZIOSpecDefault {

type Nebula = Client with Storage with Meta with Scope
type Nebula = Client & Storage & Meta & Scope

val container: NebulaSimpleClusterContainer = new NebulaSimpleClusterContainer(subnetIp = "172.30.0.0/16")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import zio.nebula.net.{ NebulaClient, Stmt }

final class NebulaClientExample(nebulaClient: NebulaClient) {

def execute(stmt: String): ZIO[Scope with NebulaPoolConfig, Throwable, NebulaResultSet] =
def execute(stmt: String): ZIO[Scope & NebulaPoolConfig, Throwable, NebulaResultSet] =
nebulaClient.openSession(false).flatMap(_.execute(Stmt.str(stmt)))
}

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.8
sbt.version=1.10.7