Fixes #99: use impossible name for relay (#103)

This commit is contained in:
Dmitry Kurinskiy 2021-04-30 11:51:55 +03:00 committed by GitHub
parent 53ad29ab31
commit 231cd2a9d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,7 @@
## Aqua
[![release](https://github.com/fluencelabs/aqua/actions/workflows/release.yml/badge.svg)](https://github.com/fluencelabs/aqua/actions/workflows/release.yml)
Aqua is a new-gen language for distributed systems.
Aqua programs are executed on many peers, sequentially

View File

@ -8,7 +8,7 @@ case class BodyConfig(
errorHandlingService: String = "errorHandlingSrv",
errorFuncName: String = "error",
respFuncName: String = "response",
relayVarName: Option[String] = Some("relay"),
relayVarName: Option[String] = Some("-relay-"),
wrapWithXor: Boolean = true
) {

View File

@ -84,8 +84,8 @@ object Node {
implicit def nodeToCof(tree: Node): Cof =
Cofree(tree.tag, Eval.later(Chain.fromSeq(tree.ops.map(nodeToCof))))
val relay = LiteralModel("relay")
val relayV = VarModel("relay", ScalarType.string)
val relay = LiteralModel("-relay-")
val relayV = VarModel("-relay-", ScalarType.string)
val initPeer = LiteralModel.initPeerId
val emptyCall = Call(Nil, None)
val otherPeer = LiteralModel("other-peer")

View File

@ -33,7 +33,7 @@ class TransformSpec extends AnyFlatSpec with Matchers {
val expectedFC =
xor(
seq(
dataCall(bc, "relay", initPeer),
dataCall(bc, "-relay-", initPeer),
through(relayV),
call(1, otherPeer),
through(relayV),
@ -71,7 +71,7 @@ class TransformSpec extends AnyFlatSpec with Matchers {
val expectedFC =
xor(
seq(
dataCall(bc, "relay", initPeer),
dataCall(bc, "-relay-", initPeer),
call(0, initPeer),
through(relayV),
call(1, otherPeer),
@ -136,7 +136,7 @@ class TransformSpec extends AnyFlatSpec with Matchers {
res.equalsOrPrintDiff(
seq(
dataCall(bc, "relay", initPeer),
dataCall(bc, "-relay-", initPeer),
Node(
CallServiceTag(
LiteralModel("\"srv1\""),