Update ZIO library (#6072)

close #6069

Changelog:
- update: ZIO major version bump
This commit is contained in:
Dmitry Bushev 2023-03-28 10:58:59 +03:00 committed by GitHub
parent 6b9cbeacb2
commit aa97787603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
83 changed files with 330 additions and 824 deletions

View File

@ -444,8 +444,8 @@ val icuVersion = "71.1"
// === ZIO ====================================================================
val zioVersion = "1.0.12"
val zioInteropCatsVersion = "3.2.9.0"
val zioVersion = "2.0.10"
val zioInteropCatsVersion = "23.0.0.2"
val zio = Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-interop-cats" % zioInteropCatsVersion
@ -856,8 +856,13 @@ lazy val `project-manager` = (project in file("lib/scala/project-manager"))
rebuildNativeImage := NativeImage
.buildNativeImage(
"project-manager",
staticOnLinux = true,
initializeAtRuntime = Seq("scala.util.Random")
staticOnLinux = true,
initializeAtRuntime = Seq(
"scala.util.Random",
"zio.internal.ZScheduler$$anon$4",
"zio.Runtime$",
"zio.FiberRef$"
)
)
.dependsOn(VerifyReflectionSetup.run)
.dependsOn(installNativeImage)
@ -1582,7 +1587,8 @@ lazy val `engine-runner` = project
// Note [WSLoggerManager Shutdown Hook]
"org.enso.loggingservice.WSLoggerManager$",
"io.methvin.watchservice.jna.CarbonAPI",
"org.enso.syntax2.Parser"
"org.enso.syntax2.Parser",
"zio.internal.ZScheduler$$anon$4"
)
)
.dependsOn(installNativeImage)

View File

@ -202,23 +202,28 @@ Copyright notices related to this dependency can be found in the directory `comm
'izumi-reflect-thirdparty-boopickle-shaded_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `dev.zio.izumi-reflect-thirdparty-boopickle-shaded_2.13-1.1.3`.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.izumi-reflect-thirdparty-boopickle-shaded_2.13-2.2.5`.
'izumi-reflect_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `dev.zio.izumi-reflect_2.13-1.1.3`.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.izumi-reflect_2.13-2.2.5`.
'zio-internal-macros_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio-internal-macros_2.13-2.0.10`.
'zio-stacktracer_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio-stacktracer_2.13-1.0.12`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio-stacktracer_2.13-2.0.10`.
'zio_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio_2.13-1.0.12`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio_2.13-2.0.10`.
'circe-core_2.13', licensed under the Apache 2.0, is distributed with the engine.

View File

@ -1,61 +0,0 @@
/*
* Copyright 2019-2020 Septimal Mind Ltd
* Copyright 2020 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2013-2020 Miles Sabin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Copyright 2017-2020 John A. De Goes and the ZIO Contributors
/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2017-2018 Łukasz Biały, Paul Chiusano, Michael Pilquist,
* Oleg Pyzhcov, Fabio Labella, Alexandru Nedelcu, Pavel Chlupacek.
*
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-----------------------
See dev.zio.izumi-reflect_2.13-1.0.0-M5 for more information.

View File

@ -1,11 +0,0 @@
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,20 +0,0 @@
/*
* Copyright 2019-2020 Septimal Mind Ltd
* Copyright 2020 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
The Apache 2.0 license file can be located in the licenses directory.

View File

@ -0,0 +1,2 @@
Copyright 2017-2020 John A. De Goes and the ZIO Contributors

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) 2014-2021 Lightbend Inc. <https://www.lightbend.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2019-2021 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -0,0 +1 @@
Copyright 2021-2023 John A. De Goes and the ZIO Contributors

View File

@ -1,60 +0,0 @@
/*
* Copyright 2017-2021 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2018-2021 John A. De Goes and the ZIO Contributors
* Copyright 2017-2021 Łukasz Biały, Paul Chiusano, Michael Pilquist,
* Oleg Pyzhcov, Fabio Labella, Alexandru Nedelcu, Pavel Chlupacek.
*
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2019-2021 John A. De Goes and the ZIO Contributors
* Copyright 2013-2021 Miles Sabin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Copyright 2018-2021 John A. De Goes and the ZIO Contributors
Copyright 2019-2021 John A. De Goes and the ZIO Contributors
Copyright 2020-2021 John A. De Goes and the ZIO Contributors
Copyright 2021 John A. De Goes and the ZIO Contributors

View File

@ -0,0 +1,3 @@
Copyright 2013-2021 Miles Sabin
Copyright 2017-2020 John A. De Goes and the ZIO Contributors

View File

@ -162,28 +162,33 @@ Copyright notices related to this dependency can be found in the directory `comm
'izumi-reflect-thirdparty-boopickle-shaded_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `dev.zio.izumi-reflect-thirdparty-boopickle-shaded_2.13-1.1.3`.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.izumi-reflect-thirdparty-boopickle-shaded_2.13-2.2.5`.
'izumi-reflect_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `dev.zio.izumi-reflect_2.13-1.1.3`.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.izumi-reflect_2.13-2.2.5`.
'zio-internal-macros_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio-internal-macros_2.13-2.0.10`.
'zio-interop-cats_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio-interop-cats_2.13-3.2.9.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio-interop-cats_2.13-23.0.0.2`.
'zio-stacktracer_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio-stacktracer_2.13-1.0.12`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio-stacktracer_2.13-2.0.10`.
'zio_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio_2.13-1.0.12`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio_2.13-2.0.10`.
'circe-core_2.13', licensed under the Apache 2.0, is distributed with the project-manager.

View File

@ -1,61 +0,0 @@
/*
* Copyright 2019-2020 Septimal Mind Ltd
* Copyright 2020 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2013-2020 Miles Sabin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Copyright 2017-2020 John A. De Goes and the ZIO Contributors
/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2017-2018 Łukasz Biały, Paul Chiusano, Michael Pilquist,
* Oleg Pyzhcov, Fabio Labella, Alexandru Nedelcu, Pavel Chlupacek.
*
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-----------------------
See dev.zio.izumi-reflect_2.13-1.0.0-M5 for more information.

View File

@ -1,11 +0,0 @@
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,20 +0,0 @@
/*
* Copyright 2019-2020 Septimal Mind Ltd
* Copyright 2020 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
The Apache 2.0 license file can be located in the licenses directory.

View File

@ -0,0 +1,2 @@
Copyright 2017-2020 John A. De Goes and the ZIO Contributors

View File

@ -1 +1,3 @@
Copyright (C) 2014-2021 Lightbend Inc. <https://www.lightbend.com>
Copyright 2017-2019 John A. De Goes and the ZIO Contributors

View File

@ -1,31 +0,0 @@
/*
* Copyright 2017-2019 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2021 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,17 +0,0 @@
/*
* Copyright (C) 2014-2021 Lightbend Inc. <https://www.lightbend.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Copyright 2019-2021 John A. De Goes and the ZIO Contributors

View File

@ -0,0 +1 @@
Copyright 2021-2023 John A. De Goes and the ZIO Contributors

View File

@ -1,60 +0,0 @@
/*
* Copyright 2017-2021 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2018-2021 John A. De Goes and the ZIO Contributors
* Copyright 2017-2021 Łukasz Biały, Paul Chiusano, Michael Pilquist,
* Oleg Pyzhcov, Fabio Labella, Alexandru Nedelcu, Pavel Chlupacek.
*
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2019-2021 John A. De Goes and the ZIO Contributors
* Copyright 2013-2021 Miles Sabin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Copyright 2018-2021 John A. De Goes and the ZIO Contributors
Copyright 2019-2021 John A. De Goes and the ZIO Contributors
Copyright 2020-2021 John A. De Goes and the ZIO Contributors
Copyright 2021 John A. De Goes and the ZIO Contributors

View File

@ -0,0 +1,3 @@
Copyright 2013-2021 Miles Sabin
Copyright 2017-2020 John A. De Goes and the ZIO Contributors

View File

@ -105,11 +105,8 @@ class MainModule(serverConfig: LanguageServerConfig, logLevel: LogLevel) {
)
log.trace("Created ActorSystem [{}].", system)
private val zioRuntime = {
val r = new effect.ExecutionContextRuntime(system.dispatcher)
r.init()
r
}
private val zioRuntime =
new effect.ExecutionContextRuntime(system.dispatcher)
private val zioExec = effect.ZioExec(zioRuntime)
log.trace("Created ZIO executor [{}].", zioExec)

View File

@ -2,7 +2,6 @@ package org.enso.languageserver.effect
import org.enso.languageserver.effect
import zio._
import zio.blocking.blocking
import java.util.concurrent.{ExecutionException, TimeoutException}
@ -18,7 +17,7 @@ trait Exec[-F[_, _]] {
* @param op effect to execute
* @return a future containing either a failure or a result
*/
def exec[E, A](op: F[E, A]): Future[Either[E, A]]
def exec[E, A](op: F[E, A])(implicit trace: Trace): Future[Either[E, A]]
/** Execute Zio effect with timeout.
*
@ -29,13 +28,13 @@ trait Exec[-F[_, _]] {
def execTimed[E, A](
timeout: FiniteDuration,
op: F[E, A]
): Future[Either[E, A]]
)(implicit trace: Trace): Future[Either[E, A]]
/** Execute long running task in background.
*
* @param op effect to execute
*/
def exec_[E, A](op: F[E, A]): Unit
def exec_[E <: Throwable, A](op: F[E, A])(implicit trace: Trace): Unit
}
/** Executor of Zio effects.
@ -47,55 +46,66 @@ case class ZioExec(runtime: effect.Runtime) extends Exec[ZioExec.IO] {
/** Execute Zio effect.
*
* @param op effect to execute
* @param trace object prevents the library from messing up the user's execution trace
* @return a future containing either a failure or a result
*/
override def exec[E, A](op: ZIO[ZEnv, E, A]): Future[Either[E, A]] = {
val promise = Promise[Either[E, A]]()
runtime.instance.unsafeRunAsync(op) {
_.fold(
ZioExec.completeFailure(promise, _),
ZioExec.completeSuccess(promise, _)
override def exec[E, A](
op: ZIO[ZAny, E, A]
)(implicit trace: Trace): Future[Either[E, A]] =
zio.Unsafe.unsafe { implicit unsafe =>
val promise = Promise[Either[E, A]]()
runtime.instance.unsafe.fork(
op.foldCause(
ZioExec.completeFailure(promise, _),
ZioExec.completeSuccess(promise, _)
)
)
promise.future
}
promise.future
}
/** Execute Zio effect with timeout.
*
* @param timeout execution timeout
* @param op effect to execute
* @param trace object prevents the library from messing up the user's execution trace
* @return a future. On timeout future is failed with `TimeoutException`.
* Otherwise future contains either a failure or a result.
*/
override def execTimed[E, A](
timeout: FiniteDuration,
op: ZIO[ZEnv, E, A]
): Future[Either[E, A]] = {
val promise = Promise[Either[E, A]]()
runtime.instance.unsafeRunAsync(
op.disconnect.timeout(zio.duration.Duration.fromScala(timeout))
) {
_.fold(
ZioExec.completeFailure(promise, _),
_.fold(promise.failure(ZioExec.timeoutFailure))(a =>
promise.success(Right(a))
)
op: ZIO[ZAny, E, A]
)(implicit trace: Trace): Future[Either[E, A]] =
zio.Unsafe.unsafe { implicit unsafe =>
val promise = Promise[Either[E, A]]()
runtime.instance.unsafe.fork(
op.disconnect
.timeout(zio.Duration.fromScala(timeout))
.foldCause[Unit](
ZioExec.completeFailure(promise, _),
_.fold(promise.failure(ZioExec.timeoutFailure))(a =>
promise.success(Right(a))
)
)
)
promise.future
}
promise.future
}
/** Execute long running task in background.
*
* @param op effect to execute
* @param trace object prevents the library from messing up the user's execution trace
*/
override def exec_[E, A](op: ZIO[ZEnv, E, A]): Unit =
runtime.instance.unsafeRunAsync_(blocking(op))
override def exec_[E <: Throwable, A](
op: ZIO[ZAny, E, A]
)(implicit trace: Trace): Unit =
zio.Unsafe.unsafe { implicit unsafe =>
runtime.instance.unsafe.fork(ZIO.blocking(op))
}
}
object ZioExec {
type IO[+E, +A] = ZIO[ZEnv, E, A]
type IO[+E, +A] = ZIO[ZAny, E, A]
object ZioExecutionException extends ExecutionException

View File

@ -6,7 +6,7 @@ import scala.concurrent.ExecutionContext
trait Runtime {
/** @return the runtime instance */
def instance: zio.Runtime[zio.ZEnv]
def instance: zio.Runtime[zio.ZAny]
/** Initialize the runtime. */
def init(): Unit
@ -21,11 +21,12 @@ object Runtime {
*/
def fromExecutionContext(
ec: ExecutionContext
): zio.Runtime[zio.ZEnv] =
zio.Runtime.unsafeFromLayer(
zio.ZEnv.live,
zio.internal.Platform.fromExecutionContext(ec)
)
): zio.Runtime[zio.ZAny] =
zio.Unsafe.unsafe { implicit unsafe =>
zio.Runtime.unsafe.fromLayer(
zio.Runtime.setExecutor(zio.Executor.fromExecutionContext(ec))
)
}
}
/** Runtime that executes effects in the provided execution context.
@ -34,12 +35,13 @@ object Runtime {
*/
final class ExecutionContextRuntime(ec: ExecutionContext) extends Runtime {
var instance: zio.Runtime[zio.ZEnv] = _
var instance: zio.Runtime[zio.ZAny] = _
/** Initialize the runtime. */
override def init(): Unit = {
if (instance eq null) {
instance = Runtime.fromExecutionContext(ec)
override def init(): Unit =
synchronized {
if (instance eq null) {
instance = Runtime.fromExecutionContext(ec)
}
}
}
}

View File

@ -1,9 +1,8 @@
package org.enso.languageserver
import zio._
import zio.blocking.Blocking
package object effect {
type BlockingIO[+E, +A] = ZIO[Blocking, E, A]
type BlockingIO[+E, +A] = ZIO[ZAny, E, A]
}

View File

@ -37,7 +37,8 @@ class FileManager(
private def findContentRoot(
id: UUID
): IO[FileSystemFailure, ContentRootWithFile] =
IO.fromFuture { ec => contentRootManager.findContentRoot(id)(ec) }
ZIO
.fromFuture { ec => contentRootManager.findContentRoot(id)(ec) }
.mapError { _ => ContentRootNotFound }
.absolve

View File

@ -3,7 +3,6 @@ package org.enso.languageserver.filemanager
import org.apache.commons.io.{FileExistsException, FileUtils}
import org.enso.languageserver.effect.BlockingIO
import zio._
import zio.blocking.effectBlocking
import java.io.{File, FileNotFoundException, RandomAccessFile}
import java.nio.ByteBuffer
@ -12,6 +11,7 @@ import java.nio.file.attribute.BasicFileAttributes
import java.security.MessageDigest
import scala.collection.mutable
import scala.util.Using
import zio.ZIO.attemptBlocking
/** File manipulation facility.
*/
@ -34,7 +34,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
file: File,
content: String
): BlockingIO[FileSystemFailure, Unit] =
effectBlocking(FileUtils.write(file, content, "UTF-8"))
attemptBlocking(FileUtils.write(file, content, "UTF-8"))
.mapError(errorHandling)
/** @inheritdoc */
@ -42,7 +42,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
file: File,
contents: Array[Byte]
): BlockingIO[FileSystemFailure, Unit] =
effectBlocking(FileUtils.writeByteArrayToFile(file, contents))
attemptBlocking(FileUtils.writeByteArrayToFile(file, contents))
.mapError(errorHandling)
/** Reads the contents of a textual file.
@ -51,14 +51,14 @@ class FileSystem extends FileSystemApi[BlockingIO] {
* @return either [[FileSystemFailure]] or the content of a file as a String
*/
override def read(file: File): BlockingIO[FileSystemFailure, String] =
effectBlocking(FileUtils.readFileToString(file, "UTF-8"))
attemptBlocking(FileUtils.readFileToString(file, "UTF-8"))
.mapError(errorHandling)
/** @inheritdoc */
override def readBinary(
file: File
): BlockingIO[FileSystemFailure, Array[Byte]] =
effectBlocking(FileUtils.readFileToByteArray(file))
attemptBlocking(FileUtils.readFileToByteArray(file))
.mapError(errorHandling)
/** Deletes the specified file or directory recursively.
@ -67,7 +67,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
* @return either [[FileSystemFailure]] or Unit
*/
def delete(file: File): BlockingIO[FileSystemFailure, Unit] =
effectBlocking {
attemptBlocking {
if (file.isDirectory) {
FileUtils.deleteDirectory(file)
} else {
@ -87,7 +87,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
} yield ()
private def createEmptyFile(file: File): BlockingIO[FileSystemFailure, Unit] =
effectBlocking(file.createNewFile(): Unit)
attemptBlocking(file.createNewFile(): Unit)
.mapError(errorHandling)
/** Creates a directory, including any necessary but nonexistent parent
@ -99,7 +99,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
override def createDirectory(
file: File
): BlockingIO[FileSystemFailure, Unit] =
effectBlocking(FileUtils.forceMkdir(file))
attemptBlocking(FileUtils.forceMkdir(file))
.mapError(errorHandling)
/** Copy a file or directory recursively.
@ -112,9 +112,9 @@ class FileSystem extends FileSystemApi[BlockingIO] {
*/
override def copy(from: File, to: File): BlockingIO[FileSystemFailure, Unit] =
if (from.isDirectory && to.isFile) {
IO.fail(FileExists)
ZIO.fail(FileExists)
} else {
effectBlocking {
attemptBlocking {
if (from.isFile && to.isDirectory) {
FileUtils.copyFileToDirectory(from, to)
} else if (from.isDirectory) {
@ -132,7 +132,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
* @return either [[FileSystemFailure]] or Unit
*/
override def move(from: File, to: File): BlockingIO[FileSystemFailure, Unit] =
effectBlocking {
attemptBlocking {
if (to.isDirectory) {
val createDestDir = false
FileUtils.moveToDirectory(from, to, createDestDir)
@ -149,7 +149,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
* @return either [[FileSystemFailure]] or file existence flag
*/
override def exists(file: File): BlockingIO[FileSystemFailure, Boolean] =
effectBlocking(Files.exists(file.toPath))
attemptBlocking(Files.exists(file.toPath))
.mapError(errorHandling)
/** List contents of a given path.
@ -160,7 +160,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
override def list(path: File): BlockingIO[FileSystemFailure, Vector[Entry]] =
if (path.exists) {
if (path.isDirectory) {
effectBlocking {
attemptBlocking {
FileSystem
.list(path.toPath)
.map {
@ -170,10 +170,10 @@ class FileSystem extends FileSystemApi[BlockingIO] {
}
}.mapError(errorHandling)
} else {
IO.fail(NotDirectory)
ZIO.fail(NotDirectory)
}
} else {
IO.fail(FileNotFound)
ZIO.fail(FileNotFound)
}
/** Returns tree of a given path.
@ -189,7 +189,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
val limit = FileSystem.Depth(depth)
if (path.exists && limit.canGoDeeper) {
if (path.isDirectory) {
effectBlocking {
attemptBlocking {
val directory = DirectoryEntry.empty(path.toPath)
FileSystem.readDirectoryEntry(
directory,
@ -201,10 +201,10 @@ class FileSystem extends FileSystemApi[BlockingIO] {
directory
}.mapError(errorHandling)
} else {
IO.fail(NotDirectory)
ZIO.fail(NotDirectory)
}
} else {
IO.fail(FileNotFound)
ZIO.fail(FileNotFound)
}
}
@ -217,13 +217,13 @@ class FileSystem extends FileSystemApi[BlockingIO] {
path: File
): BlockingIO[FileSystemFailure, Attributes] =
if (path.exists) {
effectBlocking {
attemptBlocking {
val attrs =
Files.readAttributes(path.toPath, classOf[BasicFileAttributes])
Attributes.fromBasicAttributes(path.toPath, attrs)
}.mapError(errorHandling)
} else {
IO.fail(FileNotFound)
ZIO.fail(FileNotFound)
}
/** Returns the digest of the file at the provided `path`
@ -233,7 +233,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
*/
override def digest(path: File): BlockingIO[FileSystemFailure, SHA3_224] = {
if (path.isFile) {
effectBlocking {
attemptBlocking {
val messageDigest = MessageDigest.getInstance("SHA3-224")
Using.resource(
Files.newInputStream(path.toPath, StandardOpenOption.READ)
@ -250,9 +250,9 @@ class FileSystem extends FileSystemApi[BlockingIO] {
}.mapError(errorHandling)
} else {
if (path.exists()) {
IO.fail(NotFile)
ZIO.fail(NotFile)
} else {
IO.fail(FileNotFound)
ZIO.fail(FileNotFound)
}
}
}
@ -267,7 +267,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
): BlockingIO[FileSystemFailure, SHA3_224] = {
val path = segment.path
if (path.isFile) {
effectBlocking {
attemptBlocking {
val messageDigest = MessageDigest.getInstance("SHA3-224")
Using.resource(
Files.newInputStream(path.toPath, StandardOpenOption.READ)
@ -300,9 +300,9 @@ class FileSystem extends FileSystemApi[BlockingIO] {
}.mapError(errorHandling)
} else {
if (path.exists()) {
IO.fail(NotFile)
ZIO.fail(NotFile)
} else {
IO.fail(FileNotFound)
ZIO.fail(FileNotFound)
}
}
}
@ -314,9 +314,9 @@ class FileSystem extends FileSystemApi[BlockingIO] {
bytes: Array[Byte]
): BlockingIO[FileSystemFailure, SHA3_224] = {
if (path.isDirectory) {
IO.fail(NotFile)
ZIO.fail(NotFile)
} else {
effectBlocking {
attemptBlocking {
Using.resource(new RandomAccessFile(path, "rw")) { file =>
Using.resource(file.getChannel) { chan =>
val lock = chan.lock()
@ -366,7 +366,7 @@ class FileSystem extends FileSystemApi[BlockingIO] {
): BlockingIO[FileSystemFailure, ReadBytesResult] = {
val path = segment.path
if (path.isFile) {
effectBlocking {
attemptBlocking {
Using.resource(
Files.newInputStream(path.toPath, StandardOpenOption.READ)
) { stream =>
@ -388,9 +388,9 @@ class FileSystem extends FileSystemApi[BlockingIO] {
}.mapError(errorHandling)
} else {
if (path.exists()) {
IO.fail(NotFile)
ZIO.fail(NotFile)
} else {
IO.fail(FileNotFound)
ZIO.fail(FileNotFound)
}
}
}

View File

@ -65,13 +65,13 @@ final class PathWatcher(
val result: BlockingIO[FileSystemFailure, Unit] =
for {
pathToWatch <- IO
pathToWatch <- ZIO
.fromFuture { _ => pathToWatchResult }
.mapError { _ => ContentRootNotFound }
.absolve
_ <- validatePath(pathToWatch)
watcher <- IO.fromEither(buildWatcher(pathToWatch))
_ <- IO.fromEither(startWatcher(watcher))
watcher <- ZIO.fromEither(buildWatcher(pathToWatch))
_ <- ZIO.fromEither(startWatcher(watcher))
} yield ()
exec
@ -148,7 +148,7 @@ final class PathWatcher(
private def validatePath(path: File): BlockingIO[FileSystemFailure, Unit] =
for {
pathExists <- fs.exists(path)
_ <- ZIO.when(!pathExists)(IO.fail(FileNotFound))
_ <- ZIO.when(!pathExists)(ZIO.fail(FileNotFound))
} yield ()
private def buildWatcher(

View File

@ -26,12 +26,13 @@ final class WatcherAdapter(
.build()
/** Start watcher. */
def start(): IO[Throwable, Unit] =
IO(watcher.watch())
def start(): IO[Throwable, Unit] = {
ZIO.attempt(watcher.watch())
}
/** Stop watcher. */
def stop(): IO[Throwable, Unit] =
IO(watcher.close())
ZIO.attempt(watcher.close())
/** A callback executed by `DirectoryWatcher` on file system event. */
override def onEvent(event: DirectoryChangeEvent): Unit = {

View File

@ -27,9 +27,9 @@ import org.enso.languageserver.vcsmanager.Git.{
}
import scala.jdk.CollectionConverters._
import zio.blocking.effectBlocking
import java.time.Instant
import zio.ZIO.attemptBlocking
private class Git(ensoDataDirectory: Option[Path], asyncInit: Boolean)
extends VcsApi[BlockingIO] {
@ -54,7 +54,7 @@ private class Git(ensoDataDirectory: Option[Path], asyncInit: Boolean)
}
override def init(root: Path): BlockingIO[VcsFailure, Unit] = {
effectBlocking {
attemptBlocking {
FileStoreAttributes.setBackground(asyncInit)
val rootFile = root.toFile
if (!rootFile.exists()) {
@ -130,7 +130,7 @@ private class Git(ensoDataDirectory: Option[Path], asyncInit: Boolean)
root: Path,
named: Option[String]
): BlockingIO[VcsFailure, RepoCommit] = {
effectBlocking {
attemptBlocking {
val repo = repository(root)
val commitName = named.getOrElse(Instant.now().toString)
@ -175,7 +175,7 @@ private class Git(ensoDataDirectory: Option[Path], asyncInit: Boolean)
root: Path,
commitId: Option[String]
): BlockingIO[VcsFailure, List[Path]] = {
effectBlocking {
attemptBlocking {
val repo = repository(root)
val jgit = new JGit(repo)
@ -250,7 +250,7 @@ private class Git(ensoDataDirectory: Option[Path], asyncInit: Boolean)
}
override def status(root: Path): BlockingIO[VcsFailure, RepoStatus] = {
effectBlocking {
attemptBlocking {
val repo = repository(root)
val jgit = new JGit(repo)
val statusCmd = jgit.status()
@ -283,7 +283,7 @@ private class Git(ensoDataDirectory: Option[Path], asyncInit: Boolean)
root: Path,
limit: Option[Int]
): BlockingIO[VcsFailure, List[RepoCommit]] = {
effectBlocking {
attemptBlocking {
val jgit = new JGit(repository(root))
val logCmd = jgit.log()
limit

View File

@ -13,7 +13,7 @@ import org.enso.languageserver.filemanager.{
Path
}
import org.enso.languageserver.util.UnhandledLogging
import zio.IO
import zio.{IO, ZIO}
import java.io.File
import java.util.UUID
@ -32,7 +32,8 @@ class VcsManager(
private def findContentRoot(
id: UUID
): IO[FileSystemFailure, ContentRootWithFile] =
IO.fromFuture { ec => contentRootManager.findContentRoot(id)(ec) }
ZIO
.fromFuture { ec => contentRootManager.findContentRoot(id)(ec) }
.mapError { _ => ContentRootNotFound }
.absolve

View File

@ -9,7 +9,7 @@ trait Effects {
protected def opTimeout: FiniteDuration = 3.seconds
implicit final class UnsafeRunZio[E, A](io: zio.ZIO[zio.ZEnv, E, A]) {
implicit final class UnsafeRunZio[E, A](io: zio.ZIO[zio.ZAny, E, A]) {
def unsafeRunSync(): Either[E, A] =
Await.result(ZioExec(new TestRuntime).exec(io), opTimeout)
}

View File

@ -4,7 +4,7 @@ package org.enso.languageserver.effect
final class TestRuntime extends Runtime {
/** @inheritdoc */
override def instance: zio.Runtime[zio.ZEnv] =
override def instance: zio.Runtime[zio.ZAny] =
zio.Runtime.default
/** @inheritdoc */

View File

@ -17,10 +17,9 @@ import org.enso.projectmanager.boot.configuration.{
import org.enso.version.VersionDescription
import pureconfig.ConfigSource
import pureconfig.generic.auto._
import zio.ZIO.effectTotal
import zio._
import zio.console._
import zio.Console.{printLine, printLineError, readLine}
import zio.interop.catz.core._
import zio.{ExitCode, Runtime, Scope, UIO, ZAny, ZIO, ZIOAppArgs, ZIOAppDefault}
import java.io.IOException
import java.nio.file.{FileAlreadyExistsException, Files, Path, Paths}
@ -31,7 +30,7 @@ import scala.concurrent.{Await, ExecutionContext, ExecutionContextExecutor}
/** Project manager runner containing the main method.
*/
object ProjectManager extends App with LazyLogging {
object ProjectManager extends ZIOAppDefault with LazyLogging {
/** A configuration of the project manager. */
lazy val config: ProjectManagerConfig =
@ -52,15 +51,21 @@ object ProjectManager extends App with LazyLogging {
)
/** ZIO runtime. */
implicit val runtime: Runtime[ZEnv] =
Runtime(environment, new ZioPlatform(computeExecutionContext))
implicit override lazy val runtime: Runtime[ZAny] =
zio.Unsafe.unsafe { implicit unsafe =>
zio.Runtime.unsafe.fromLayer(
zio.Runtime.setExecutor(
zio.Executor.fromExecutionContext(computeExecutionContext)
)
)
}
/** Main process starting up the server. */
def mainProcess(
private def mainProcess(
processConfig: MainProcessConfig
): ZIO[ZEnv, IOException, Unit] = {
): ZIO[ZAny, IOException, Unit] = {
val mainModule =
new MainModule[ZIO[ZEnv, +*, +*]](
new MainModule[ZIO[ZAny, +*, +*]](
config,
processConfig,
computeExecutionContext
@ -68,75 +73,80 @@ object ProjectManager extends App with LazyLogging {
for {
binding <- bindServer(mainModule)
_ <- logServerStartup()
_ <- getStrLn
_ <- effectTotal { logger.info("Stopping server...") }
_ <- effectTotal { binding.unbind() }
_ <- readLine
_ <- ZIO.succeed { logger.info("Stopping server...") }
_ <- ZIO.succeed { binding.unbind() }
_ <- killAllLanguageServer(mainModule)
_ <- waitTillAllShutdownHooksWillBeFired(mainModule)
_ <- effectTotal { mainModule.system.terminate() }
_ <- ZIO.succeed { mainModule.system.terminate() }
} yield ()
}
private def killAllLanguageServer(mainModule: MainModule[ZIO[ZEnv, +*, +*]]) =
private def killAllLanguageServer(mainModule: MainModule[ZIO[ZAny, +*, +*]]) =
mainModule.languageServerGateway
.killAllServers()
.foldM(
.foldZIO(
failure = th =>
effectTotal {
ZIO.succeed {
logger.error("An error occurred during killing lang servers.", th)
},
success = ZIO.succeed(_)
)
private def waitTillAllShutdownHooksWillBeFired(
mainModule: MainModule[ZIO[ZEnv, +*, +*]]
mainModule: MainModule[ZIO[ZAny, +*, +*]]
) =
mainModule.languageServerGateway
.waitTillAllHooksFired()
.foldM(
.foldZIO(
failure = th =>
effectTotal {
ZIO.succeed {
logger
.error("An error occurred during waiting for shutdown hooks.", th)
},
success = ZIO.succeed(_)
)
override def run(args: List[String]): ZIO[ZEnv, Nothing, ExitCode] = {
private def runArgs(
args: Seq[String]
): ZIO[Environment with ZIOAppArgs with Scope, Any, Any] = {
Cli.parse(args.toArray) match {
case Right(opts) =>
runOpts(opts).catchAll(th =>
effectTotal(
ZIO.succeed(
logger.error("An error occurred during the program startup", th)
) *>
ZIO.succeed(FailureExitCode)
)
case Left(error) =>
(putStrLn(error) *>
effectTotal(Cli.printHelp()) *>
(printLine(error) *>
ZIO.succeed(Cli.printHelp()) *>
ZIO.succeed(FailureExitCode)).catchAll(th =>
effectTotal(logger.error("Unexpected error", th)) *>
ZIO.succeed(logger.error("Unexpected error", th)) *>
ZIO.succeed(FailureExitCode)
)
}
}
override def run: ZIO[Environment with ZIOAppArgs with Scope, Any, Any] =
getArgs.flatMap(runArgs)
/** Parses and validates the command line arguments.
*
* @param options the command line arguments
*/
def parseOpts(
private def parseOpts(
options: CommandLine
): ZIO[ZEnv, Throwable, ProjectManagerOptions] = {
): ZIO[ZAny, Throwable, ProjectManagerOptions] = {
val parseProfilingPath = ZIO
.effect {
.attempt {
Option(options.getOptionValue(Cli.PROFILING_PATH))
.map(Paths.get(_).toAbsolutePath)
}
.flatMap {
case pathOpt @ Some(path) =>
ZIO.ifM(ZIO.effect(Files.isDirectory(path)))(
onTrue = putStrLnErr(
ZIO.ifZIO(ZIO.attempt(Files.isDirectory(path)))(
onTrue = printLineError(
s"Error: ${Cli.PROFILING_PATH} is a directory: $path"
) *>
ZIO.fail(new FileAlreadyExistsException(path.toString)),
@ -146,27 +156,31 @@ object ProjectManager extends App with LazyLogging {
ZIO.succeed(None)
}
.catchAll { err =>
putStrLnErr(s"Invalid ${Cli.PROFILING_PATH} argument.") *> ZIO.fail(err)
printLineError(s"Invalid ${Cli.PROFILING_PATH} argument.") *> ZIO.fail(
err
)
}
val parseProfilingTime = ZIO
.effect {
.attempt {
Option(options.getOptionValue(Cli.PROFILING_TIME))
.map(_.toInt.seconds)
}
.catchAll { err =>
putStrLnErr(s"Invalid ${Cli.PROFILING_TIME} argument.") *> ZIO.fail(err)
printLineError(s"Invalid ${Cli.PROFILING_TIME} argument.") *> ZIO.fail(
err
)
}
val parseProfilingEventsLogPath = ZIO
.effect {
.attempt {
Option(options.getOptionValue(Cli.PROFILING_EVENTS_LOG_PATH))
.map(Paths.get(_).toAbsolutePath)
}
.flatMap {
case pathOpt @ Some(path) =>
ZIO.ifM(ZIO.effect(Files.isDirectory(path)))(
onTrue = putStrLnErr(
ZIO.ifZIO(ZIO.attempt(Files.isDirectory(path)))(
onTrue = printLineError(
s"Error: ${Cli.PROFILING_EVENTS_LOG_PATH} is a directory: $path"
) *>
ZIO.fail(new FileAlreadyExistsException(path.toString)),
@ -176,7 +190,7 @@ object ProjectManager extends App with LazyLogging {
ZIO.succeed(None)
}
.catchAll { err =>
putStrLnErr(s"Invalid ${Cli.PROFILING_EVENTS_LOG_PATH} argument.") *>
printLineError(s"Invalid ${Cli.PROFILING_EVENTS_LOG_PATH} argument.") *>
ZIO.fail(err)
}
@ -194,9 +208,9 @@ object ProjectManager extends App with LazyLogging {
/** The main function of the application, which will be passed the command-line
* arguments to the program and has to return an `IO` with the errors fully handled.
*/
def runOpts(options: CommandLine): ZIO[ZEnv, Throwable, ExitCode] = {
private def runOpts(options: CommandLine): ZIO[ZAny, Throwable, ExitCode] = {
if (options.hasOption(Cli.HELP_OPTION)) {
ZIO.effectTotal(Cli.printHelp()) *>
ZIO.succeed(Cli.printHelp()) *>
ZIO.succeed(SuccessExitCode)
} else if (options.hasOption(Cli.VERSION_OPTION)) {
displayVersion(options.hasOption(Cli.JSON_OPTION))
@ -229,7 +243,7 @@ object ProjectManager extends App with LazyLogging {
verbosityLevel: Int,
logMasking: Boolean,
profilingLog: Option[Path]
): ZIO[Console, IOException, LogLevel] = {
): ZIO[ZAny, IOException, LogLevel] = {
val level = verbosityLevel match {
case 0 => LogLevel.Info
case 1 => LogLevel.Debug
@ -241,29 +255,29 @@ object ProjectManager extends App with LazyLogging {
val colorMode = ColorMode.Auto
ZIO
.effect {
.attempt {
Logging.setup(Some(level), None, colorMode, logMasking, profilingLog)
}
.catchAll { exception =>
putStrLnErr(s"Failed to setup the logger: $exception")
printLineError(s"Failed to setup the logger: $exception")
}
.as(level)
}
private def displayVersion(
useJson: Boolean
): ZIO[Console, IOException, ExitCode] = {
): ZIO[ZAny, IOException, ExitCode] = {
val versionDescription = VersionDescription.make(
"Enso Project Manager",
includeRuntimeJVMInfo = false,
enableNativeImageOSWorkaround = true
)
putStrLn(versionDescription.asString(useJson)) *>
printLine(versionDescription.asString(useJson)) *>
ZIO.succeed(SuccessExitCode)
}
private def logServerStartup(): UIO[Unit] =
effectTotal {
ZIO.succeed {
logger.info(
"Started server at {}:{}, press enter to kill server",
config.server.host,
@ -272,9 +286,9 @@ object ProjectManager extends App with LazyLogging {
}
private def bindServer(
module: MainModule[ZIO[ZEnv, +*, +*]]
module: MainModule[ZIO[ZAny, +*, +*]]
): UIO[Http.ServerBinding] =
effectTotal {
ZIO.succeed {
Await.result(
module.server.bind(config.server.host, config.server.port),
3.seconds

View File

@ -1,45 +0,0 @@
package org.enso.projectmanager.boot
import com.typesafe.scalalogging.LazyLogging
import zio.{Cause, Supervisor}
import zio.internal.stacktracer.Tracer
import zio.internal.stacktracer.impl.AkkaLineNumbersTracer
import zio.internal.tracing.TracingConfig
import zio.internal.{Executor, Platform, Tracing}
import scala.concurrent.ExecutionContext
/** An environment needed to execute ZIO actions.
*
* @param computeExecutionContext compute thread pool
*/
class ZioPlatform(computeExecutionContext: ExecutionContext)
extends Platform
with LazyLogging {
override def executor: Executor =
Executor.fromExecutionContext(2048)(computeExecutionContext)
override val tracing = Tracing(
Tracer.globallyCached(new AkkaLineNumbersTracer),
TracingConfig.enabled
)
override def fatal(t: Throwable): Boolean =
t.isInstanceOf[VirtualMachineError]
override def reportFatal(t: Throwable): Nothing = {
t.printStackTrace()
try {
System.exit(-1)
throw t
} catch { case _: Throwable => throw t }
}
override def reportFailure(cause: Cause[Any]): Unit =
if (cause.died)
logger.error(cause.prettyPrint)
override def supervisor: Supervisor[Any] =
Supervisor.none
}

View File

@ -1,6 +1,6 @@
package org.enso.projectmanager.control.effect
import zio.ZEnv
import zio.ZAny
import scala.concurrent.Future
@ -25,7 +25,7 @@ object Exec {
def apply[F[_, _]](implicit exec: Exec[F]): Exec[F] = exec
implicit def zioExec(implicit runtime: zio.Runtime[ZEnv]): ZioEnvExec =
implicit def zioExec(implicit runtime: zio.Runtime[ZAny]): ZioEnvExec =
new ZioEnvExec(runtime)
}

View File

@ -2,7 +2,7 @@ package org.enso.projectmanager.control.effect
import java.io.IOException
import zio.{ZEnv, ZIO}
import zio.{ZAny, ZIO}
import scala.concurrent.duration.FiniteDuration
@ -50,6 +50,6 @@ object Sync {
def apply[F[+_, +_]](implicit sync: Sync[F]): Sync[F] = sync
implicit val zioSync: Sync[ZIO[ZEnv, +*, +*]] = ZioSync
implicit val zioSync: Sync[ZIO[ZAny, +*, +*]] = ZioSync
}

View File

@ -16,14 +16,14 @@ class ZioAsync[R] extends Async[ZIO[R, +*, +*]] {
override def async[E, A](
register: (Either[E, A] => Unit) => Unit
): ZIO[R, E, A] =
ZIO.effectAsync[R, E, A] { callback =>
ZIO.async[R, E, A] { callback =>
register { result => callback(ZIO.fromEither(result)) }
}
/** @inheritdoc */
override def fromFuture[A](thunk: () => Future[A]): ZIO[R, Throwable, A] =
ZIO.effectAsync[R, Throwable, A] { cb =>
ZIO.async[R, Throwable, A] { cb =>
thunk().onComplete {
case Success(value) => cb(ZIO.succeed(value))
case Failure(exception) => cb(ZIO.fail(exception))

View File

@ -8,26 +8,27 @@ import scala.concurrent.{Future, Promise}
*
* @param runtime a ZIO runtime
*/
class ZioEnvExec(runtime: Runtime[ZEnv]) extends Exec[ZIO[ZEnv, *, *]] {
class ZioEnvExec(runtime: Runtime[ZAny]) extends Exec[ZIO[ZAny, *, *]] {
override def exec[E, A](op: ZIO[ZEnv, E, A]): Future[Either[E, A]] = {
val promise = Promise[Either[E, A]]()
runtime.unsafeRunAsync(op) {
_.fold(
{ cause =>
cause.failureOption match {
case Some(e) =>
promise.success(Left(e))
case None =>
val error = cause.defects.headOption
.getOrElse(new RuntimeException("ZIO failed"))
promise.failure(error)
}
},
r => promise.success(Right(r))
/** @inheritdoc */
override def exec[E, A](op: ZIO[ZAny, E, A]): Future[Either[E, A]] =
zio.Unsafe.unsafe { implicit unsafe =>
val promise = Promise[Either[E, A]]()
runtime.unsafe.fork(
op.foldCause(
{ cause =>
cause.failureOption match {
case Some(e) =>
promise.success(Left(e))
case None =>
val error = cause.defects.headOption
.getOrElse(new RuntimeException("ZIO failed"))
promise.failure(error)
}
},
r => promise.success(Right(r))
)
)
promise.future
}
promise.future
}
}

View File

@ -24,7 +24,7 @@ class ZioErrorChannel[R] extends ErrorChannel[ZIO[R, +*, +*]] {
override def recoverWith[E, A, B >: A, E1 >: E](fa: ZIO[R, E, A])(
recovery: PartialFunction[E, ZIO[R, E1, B]]
): ZIO[R, E1, B] =
fa.foldM(
fa.foldZIO(
failure = { error =>
if (recovery.isDefinedAt(error)) recovery(error)
else ZIO.fail(error)
@ -36,7 +36,7 @@ class ZioErrorChannel[R] extends ErrorChannel[ZIO[R, +*, +*]] {
override def fallbackTo[E, A, B >: A, E1](fa: ZIO[R, E, A])(
fallback: E => ZIO[R, E1, B]
): ZIO[R, E1, B] =
fa.foldM(
fa.foldZIO(
failure = { error => fallback(error) },
success = ZIO.succeed(_)
)
@ -59,7 +59,7 @@ class ZioErrorChannel[R] extends ErrorChannel[ZIO[R, +*, +*]] {
fa: ZIO[R, E, A]
)(cleanUp: PartialFunction[E, ZIO[R, Nothing, Unit]]): ZIO[R, E, A] =
fa.onError { cause =>
if (cause.failed) {
if (cause.isFailure) {
val failure = cause.failureOption.get
if (cleanUp.isDefinedAt(failure)) cleanUp(failure)
else ZIO.unit
@ -73,7 +73,7 @@ class ZioErrorChannel[R] extends ErrorChannel[ZIO[R, +*, +*]] {
fa: ZIO[R, E, A]
)(cleanUp: PartialFunction[Throwable, ZIO[R, Nothing, Unit]]): ZIO[R, E, A] =
fa.onError { cause =>
if (cause.died) {
if (cause.isDie) {
val throwable = cause.dieOption.get
if (cleanUp.isDefinedAt(throwable)) cleanUp(throwable)
else ZIO.unit

View File

@ -3,30 +3,30 @@ package org.enso.projectmanager.control.effect
import java.io.IOException
import zio._
import zio.blocking
import zio.duration.Duration
import zio.Duration
import scala.concurrent.duration.FiniteDuration
import zio.ZIO
/** Instance of [[Sync]] class for ZIO.
*/
object ZioSync extends Sync[ZIO[ZEnv, +*, +*]] {
object ZioSync extends Sync[ZIO[ZAny, +*, +*]] {
/** @inheritdoc */
override def effect[A](effect: => A): ZIO[ZEnv, Nothing, A] =
ZIO.effectTotal(effect)
override def effect[A](effect: => A): ZIO[ZAny, Nothing, A] =
ZIO.succeed(effect)
/** @inheritdoc */
override def blockingOp[A](effect: => A): ZIO[ZEnv, Throwable, A] =
blocking.effectBlocking(effect)
override def blockingOp[A](effect: => A): ZIO[ZAny, Throwable, A] =
ZIO.attemptBlocking(effect)
/** @inheritdoc */
override def blockingIO[A](effect: => A): ZIO[ZEnv, IOException, A] =
blocking.effectBlockingIO(effect)
override def blockingIO[A](effect: => A): ZIO[ZAny, IOException, A] =
ZIO.attemptBlockingIO(effect)
/** @inheritdoc */
override def timeoutFail[E, E1 >: E, A](fa: ZIO[ZEnv, E, A])(e: E1)(
override def timeoutFail[E, E1 >: E, A](fa: ZIO[ZAny, E, A])(e: E1)(
timeout: FiniteDuration
): ZIO[zio.ZEnv, E1, A] = fa.timeoutFail(e)(Duration.fromScala(timeout))
): ZIO[ZAny, E1, A] = fa.timeoutFail(e)(Duration.fromScala(timeout))
}

View File

@ -53,7 +53,7 @@ import org.scalatest.BeforeAndAfterAll
import pureconfig.ConfigSource
import pureconfig.generic.auto._
import zio.interop.catz.core._
import zio.{Runtime, Semaphore, ZEnv, ZIO}
import zio.{Runtime, Semaphore, ZAny, ZIO}
import scala.concurrent.duration._
import scala.concurrent.{Await, Future}
@ -95,13 +95,13 @@ class BaseServerSpec extends JsonRpcServerTestKit with BeforeAndAfterAll {
)
val testClock =
new ProgrammableClock[ZEnv](OffsetDateTime.now(ZoneOffset.UTC))
new ProgrammableClock[ZAny](OffsetDateTime.now(ZoneOffset.UTC))
def getGeneratedUUID: UUID = {
Await.result(Future(gen.takeFirst())(system.dispatcher), 3.seconds.dilated)
}
lazy val gen = new ObservableGenerator[ZEnv]()
lazy val gen = new ObservableGenerator[ZAny]()
val testProjectsRoot = Files.createTempDirectory(null).toFile
sys.addShutdownHook(FileUtils.deleteQuietly(testProjectsRoot))
@ -131,7 +131,9 @@ class BaseServerSpec extends JsonRpcServerTestKit with BeforeAndAfterAll {
lazy val fileSystem = new BlockingFileSystem(5.seconds)
lazy val storageSemaphore =
Runtime.default.unsafeRun(Semaphore.make(1))
zio.Unsafe.unsafe { implicit unsafe =>
Runtime.default.unsafe.run(Semaphore.make(1)).getOrThrow()
}
lazy val projectRepository =
new ProjectFileRepository(
@ -141,7 +143,7 @@ class BaseServerSpec extends JsonRpcServerTestKit with BeforeAndAfterAll {
gen
)
lazy val projectValidator = new MonadicProjectValidator[ZIO[ZEnv, *, *]]()
lazy val projectValidator = new MonadicProjectValidator[ZIO[ZAny, *, *]]()
val distributionConfiguration =
TestDistributionConfiguration(
@ -169,10 +171,10 @@ class BaseServerSpec extends JsonRpcServerTestKit with BeforeAndAfterAll {
)
lazy val shutdownHookActivator =
system.actorOf(ShutdownHookActivator.props[ZIO[ZEnv, +*, +*]]())
system.actorOf(ShutdownHookActivator.props[ZIO[ZAny, +*, +*]]())
lazy val languageServerGateway =
new LanguageServerGatewayImpl[ZIO[ZEnv, +*, +*]](
new LanguageServerGatewayImpl[ZIO[ZAny, +*, +*]](
languageServerRegistry,
shutdownHookActivator,
system,
@ -180,22 +182,22 @@ class BaseServerSpec extends JsonRpcServerTestKit with BeforeAndAfterAll {
)
lazy val projectCreationService =
new ProjectCreationService[ZIO[ZEnv, +*, +*]](
new ProjectCreationService[ZIO[ZAny, +*, +*]](
distributionConfiguration,
loggingService
)
lazy val globalConfigService = new GlobalConfigService[ZIO[ZEnv, +*, +*]](
lazy val globalConfigService = new GlobalConfigService[ZIO[ZAny, +*, +*]](
distributionConfiguration
)
lazy val projectService =
new ProjectService[ZIO[ZEnv, +*, +*]](
new ProjectService[ZIO[ZAny, +*, +*]](
projectValidator,
projectRepository,
projectCreationService,
globalConfigService,
new Slf4jLogging[ZIO[ZEnv, +*, +*]],
new Slf4jLogging[ZIO[ZAny, +*, +*]],
testClock,
gen,
languageServerGateway,
@ -203,12 +205,12 @@ class BaseServerSpec extends JsonRpcServerTestKit with BeforeAndAfterAll {
)
lazy val runtimeVersionManagementService =
new RuntimeVersionManagementService[ZIO[ZEnv, +*, +*]](
new RuntimeVersionManagementService[ZIO[ZAny, +*, +*]](
distributionConfiguration
)
override def clientControllerFactory: ClientControllerFactory = {
new ManagerClientControllerFactory[ZIO[ZEnv, +*, +*]](
new ManagerClientControllerFactory[ZIO[ZAny, +*, +*]](
system = system,
projectService = projectService,
globalConfigService = globalConfigService,
@ -295,7 +297,9 @@ class BaseServerSpec extends JsonRpcServerTestKit with BeforeAndAfterAll {
version,
forceInstallBroken = false
)
Runtime.default.unsafeRun(installAction)
zio.Unsafe.unsafe { implicit unsafe =>
Runtime.default.unsafe.run(installAction)
}
}
def uninstallEngine(version: SemVer): Unit = {
@ -304,7 +308,9 @@ class BaseServerSpec extends JsonRpcServerTestKit with BeforeAndAfterAll {
blackhole,
version
)
Runtime.default.unsafeRun(action)
zio.Unsafe.unsafe { implicit unsafe =>
Runtime.default.unsafe.run(action)
}
}
def uninstallRuntime(graalVMVersion: GraalVMVersion): Unit = {

View File

@ -33,7 +33,12 @@ abstract class ProjectOpenSpecBase
engineVersion = defaultVersion,
missingComponentAction = MissingComponentAction.Fail
)
ordinaryProject = Runtime.default.unsafeRun(ordinaryAction).id
ordinaryProject = zio.Unsafe.unsafe { implicit unsafe =>
Runtime.default.unsafe
.run(ordinaryAction)
.getOrElse(cause => throw new Exception(cause.prettyPrint))
.id
}
val brokenName = "Projbroken"
val brokenAction = projectService.createUserProject(
progressTracker = blackhole,
@ -42,7 +47,12 @@ abstract class ProjectOpenSpecBase
engineVersion = defaultVersion,
missingComponentAction = MissingComponentAction.Fail
)
brokenProject = Runtime.default.unsafeRun(brokenAction).id
brokenProject = zio.Unsafe.unsafe { implicit unsafe =>
Runtime.default.unsafe
.run(brokenAction)
.getOrElse(cause => throw new Exception(cause.prettyPrint))
.id
}
// TODO [RW] this hack should not be necessary with #1273
val projectDir = new File(userProjectDir, brokenName)

View File

@ -5,15 +5,15 @@ import zio.{IO, ZIO}
class NopLogging[R] extends Logging[ZIO[R, +*, +*]] {
override def debug(msg: String): IO[Nothing, Unit] = IO.unit
override def debug(msg: String): IO[Nothing, Unit] = ZIO.unit
override def debug(msg: String, args: AnyRef*): IO[Nothing, Unit] = IO.unit
override def debug(msg: String, args: AnyRef*): IO[Nothing, Unit] = ZIO.unit
override def info(msg: String): IO[Nothing, Unit] = IO.unit
override def info(msg: String): IO[Nothing, Unit] = ZIO.unit
override def info(msg: String, args: AnyRef*): IO[Nothing, Unit] = IO.unit
override def info(msg: String, args: AnyRef*): IO[Nothing, Unit] = ZIO.unit
override def error(msg: String): IO[Nothing, Unit] = IO.unit
override def error(msg: String): IO[Nothing, Unit] = ZIO.unit
override def error(msg: String, args: AnyRef*): IO[Nothing, Unit] = IO.unit
override def error(msg: String, args: AnyRef*): IO[Nothing, Unit] = ZIO.unit
}

View File

@ -10,7 +10,7 @@ class ObservableGenerator[R] extends Generator[ZIO[R, +*, +*]] {
private var buffer = Vector.empty[UUID]
override def randomUUID(): IO[Nothing, UUID] =
IO.succeed {
ZIO.succeed {
val uuid = UUID.randomUUID()
this.synchronized {
buffer = buffer :+ uuid

View File

@ -11,10 +11,10 @@ class ProgrammableClock[R](initialNow: OffsetDateTime)
@volatile
var currentTime = initialNow.withOffsetSameInstant(ZoneOffset.UTC)
override def now(): IO[Nothing, OffsetDateTime] = IO.succeed(currentTime)
override def now(): IO[Nothing, OffsetDateTime] = ZIO.succeed(currentTime)
override def nowInUtc(): IO[Nothing, OffsetDateTime] =
IO.succeed(currentTime)
ZIO.succeed(currentTime)
def moveTimeForward(seconds: Long = 1): Unit =
currentTime = currentTime.plusSeconds(seconds)

View File

@ -1 +1 @@
sbt.version=1.7.1
sbt.version=1.8.2

View File

@ -1,60 +0,0 @@
/*
* Copyright 2019-2020 Septimal Mind Ltd
* Copyright 2020 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2013-2020 Miles Sabin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Copyright 2017-2020 John A. De Goes and the ZIO Contributors
/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2017-2018 Łukasz Biały, Paul Chiusano, Michael Pilquist,
* Oleg Pyzhcov, Fabio Labella, Alexandru Nedelcu, Pavel Chlupacek.
*
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-----------------------
See dev.zio.izumi-reflect_2.13-1.0.0-M5 for more information.

View File

@ -0,0 +1 @@
Copyright 2019-2020 Septimal Mind Ltd

View File

@ -1 +0,0 @@
The Apache 2.0 license file can be located in the licenses directory.

View File

@ -1,11 +0,0 @@
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1 @@
Copyright 2019-2020 Septimal Mind Ltd

View File

@ -0,0 +1 @@
Copyright 2017-2020 John A. De Goes and the ZIO Contributors

View File

@ -0,0 +1 @@
Copyright 2021-2023 John A. De Goes and the ZIO Contributors

View File

@ -1,4 +0,0 @@
Copyright 2018-2021 John A. De Goes and the ZIO Contributors
Copyright 2019-2021 John A. De Goes and the ZIO Contributors
Copyright 2020-2021 John A. De Goes and the ZIO Contributors
Copyright 2021 John A. De Goes and the ZIO Contributors

View File

@ -1,3 +0,0 @@
Copyright 2013-2021 Miles Sabin
Copyright 2017-2021 John A. De Goes and the ZIO Contributors
Copyright 2017-2021 Łukasz Biały, Paul Chiusano, Michael Pilquist,

View File

@ -0,0 +1,6 @@
Copyright 2017-2023 John A. De Goes and the ZIO Contributors
Copyright 2018-2023 John A. De Goes and the ZIO Contributors
Copyright 2019-2023 John A. De Goes and the ZIO Contributors
Copyright 2020-2023 John A. De Goes and the ZIO Contributors
Copyright 2021-2023 John A. De Goes and the ZIO Contributors
Copyright 2022-2023 John A. De Goes and the ZIO Contributors

View File

@ -0,0 +1,2 @@
Copyright 2013-2021 Miles Sabin
Copyright 2017-2020 John A. De Goes and the ZIO Contributors

View File

@ -1,3 +1,3 @@
5F7F10B5303656FC01C4D26138CF2035606E7A272ADFD5419121097F009BE008
7C1A29901335B64467B939EFDE5AC11ECC703ECF503DAEE810B20EF9F48827EE
7520855014B1EA606329CFE36E11F4D56759A574DCFCC9F0DF26118104236E5F
703351A5878198A8B8742CB0B36FAA59C9877C59242A447AB89BF11437BEB70D
0

View File

@ -1,60 +0,0 @@
/*
* Copyright 2019-2020 Septimal Mind Ltd
* Copyright 2020 John A. De Goes and the ZIO Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2013-2020 Miles Sabin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Copyright 2017-2020 John A. De Goes and the ZIO Contributors
/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2017-2018 Łukasz Biały, Paul Chiusano, Michael Pilquist,
* Oleg Pyzhcov, Fabio Labella, Alexandru Nedelcu, Pavel Chlupacek.
*
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-----------------------
See dev.zio.izumi-reflect_2.13-1.0.0-M5 for more information.

View File

@ -0,0 +1 @@
Copyright 2019-2020 Septimal Mind Ltd

View File

@ -1 +0,0 @@
The Apache 2.0 license file can be located in the licenses directory.

View File

@ -1,11 +0,0 @@
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1 @@
Copyright 2019-2020 Septimal Mind Ltd

View File

@ -0,0 +1 @@
Copyright 2017-2020 John A. De Goes and the ZIO Contributors

View File

@ -0,0 +1,3 @@
Copyright 2017-2022 John A. De Goes and the ZIO Contributors
Copyright 2019-2021 John A. De Goes and the ZIO Contributors
Copyright 2021 John A. De Goes and the ZIO Contributors

View File

@ -1,2 +1,2 @@
Copyright (C) 2014-2021 Lightbend Inc. <https://www.lightbend.com>
Copyright 2019-2021 John A. De Goes and the ZIO Contributors
Copyright 2017-2019 John A. De Goes and the ZIO Contributors

View File

@ -1,2 +0,0 @@
Copyright 2017-2019 John A. De Goes and the ZIO Contributors
Copyright 2021 John A. De Goes and the ZIO Contributors

View File

@ -1 +0,0 @@
Copyright 2019-2021 John A. De Goes and the ZIO Contributors

View File

@ -0,0 +1 @@
Copyright 2021-2023 John A. De Goes and the ZIO Contributors

View File

@ -1,4 +0,0 @@
Copyright 2018-2021 John A. De Goes and the ZIO Contributors
Copyright 2019-2021 John A. De Goes and the ZIO Contributors
Copyright 2020-2021 John A. De Goes and the ZIO Contributors
Copyright 2021 John A. De Goes and the ZIO Contributors

View File

@ -1,3 +0,0 @@
Copyright 2013-2021 Miles Sabin
Copyright 2017-2021 John A. De Goes and the ZIO Contributors
Copyright 2017-2021 Łukasz Biały, Paul Chiusano, Michael Pilquist,

View File

@ -0,0 +1,6 @@
Copyright 2017-2023 John A. De Goes and the ZIO Contributors
Copyright 2018-2023 John A. De Goes and the ZIO Contributors
Copyright 2019-2023 John A. De Goes and the ZIO Contributors
Copyright 2020-2023 John A. De Goes and the ZIO Contributors
Copyright 2021-2023 John A. De Goes and the ZIO Contributors
Copyright 2022-2023 John A. De Goes and the ZIO Contributors

View File

@ -0,0 +1,2 @@
Copyright 2013-2021 Miles Sabin
Copyright 2017-2020 John A. De Goes and the ZIO Contributors

View File

@ -1,3 +1,3 @@
27E62459A95B059D0BA10416285FF20C38FEB28E12343177457C5A7912BB22CD
5D78EC2970BDDC32CF6BBDFA72CEFF618C97C893886687DC96CFB2919995861F
051DD0405F1257AEDF413F8EBA828011987B66D25A96E3E0396182347B2D6A9C
27E3A8F62F0326C873215CCBFDFCAA59D274563640980CF9933531BE696CBEE3
0