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 ujson, upickle to 3.1.2 #2646

Merged
merged 4 commits into from
Jul 22, 2023
Merged
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
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ object Dependencies {
val slf4j = "org.slf4j" % "slf4j-api" % "2.0.7"
val shapeless = "com.chuusai" %% "shapeless" % "2.3.10"
val tla2tools = "org.lamport" % "tla2tools" % "1.7.0-SNAPSHOT"
val ujson = "com.lihaoyi" %% "ujson" % "2.0.0"
val upickle = "com.lihaoyi" %% "upickle" % "2.0.0"
val ujson = "com.lihaoyi" %% "ujson" % "3.1.2"
val upickle = "com.lihaoyi" %% "upickle" % "3.1.2"
val z3 = "tools.aqua" % "z3-turnkey" % "4.12.2"
val zio = "dev.zio" %% "zio" % zioVersion
// Keep up to sync with version in plugins.sbt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ object ItfCounterexampleWriter {
paramsToJson(rootModule).foreach(params => rootMap.put(PARAMS_FIELD, params))
rootMap.put(VARS_FIELD, varsToJson(rootModule))
rootMap.put(STATES_FIELD, ujson.Arr(mappedStates.zipWithIndex.map((stateToJson _).tupled): _*))
ujson.Obj(rootMap)
ujson.Obj.from(rootMap)
}

private def varsToJson(root: TlaModule): ujson.Value = {
Expand Down Expand Up @@ -136,10 +136,10 @@ object ItfCounterexampleWriter {
val (keyEs, valuesEs) = deinterleave(args)
val keys = keyEs.collect { case ValEx(TlaStr(s)) => s }
val values = valuesEs.map(exToJson)
ujson.Obj(mutable.LinkedHashMap(keys.zip(values): _*))
ujson.Obj.from(keys.zip(values))

case OperEx(VariantOper.variant, ValEx(TlaStr(tagName)), valueEx) =>
ujson.Obj(mutable.LinkedHashMap(TAG_FIELD -> ujson.Str(tagName), VALUE_FIELD -> exToJson(valueEx)))
ujson.Obj(TAG_FIELD -> ujson.Str(tagName), VALUE_FIELD -> exToJson(valueEx))

case OperEx(ApalacheOper.setAsFun, OperEx(TlaSetOper.enumSet, args @ _*)) =>
val keyValueArrays = args.collect { case OperEx(TlaFunOper.tuple, key, value) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "ConstInit",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand All @@ -258,9 +256,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "State0",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -294,9 +290,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "InvariantViolation",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -350,9 +344,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "ConstInit",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand All @@ -367,9 +359,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "State0",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -403,9 +393,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "State1",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -439,9 +427,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "State2",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -475,9 +461,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "InvariantViolation",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -531,9 +515,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "ConstInit",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand All @@ -548,9 +530,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "State0",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -604,9 +584,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "State1",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -660,9 +638,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "State2",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down Expand Up @@ -716,9 +692,7 @@ class TestCounterexampleWriter extends AnyFunSuite with TestCounterexampleWriter
| "type": "(() => Bool)",
| "kind": "TlaOperDecl",
| "name": "InvariantViolation",
| "formalParams": [
|
| ],
| "formalParams": [],
| "isRecursive": false,
| "body": {
| "type": "Bool",
Expand Down
Loading