diff --git a/VERSION b/VERSION index 79a2734bb..5d4294b91 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0 \ No newline at end of file +0.5.1 \ No newline at end of file diff --git a/kclvm/Cargo.lock b/kclvm/Cargo.lock index 3b9ee0552..f87fa1694 100644 --- a/kclvm/Cargo.lock +++ b/kclvm/Cargo.lock @@ -321,7 +321,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23170228b96236b5a7299057ac284a321457700bc8c41a4476052f0f4ba5349d" dependencies = [ - "hashbrown", + "hashbrown 0.12.3", "stacker", ] @@ -371,7 +371,7 @@ checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "bitflags", "clap_lex 0.2.4", - "indexmap", + "indexmap 1.9.3", "textwrap 0.16.0", ] @@ -691,7 +691,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" dependencies = [ "cfg-if 1.0.0", - "hashbrown", + "hashbrown 0.12.3", "lock_api", "once_cell", "parking_lot_core 0.9.7", @@ -809,6 +809,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "erased-serde" version = "0.3.25" @@ -1103,6 +1109,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "heck" version = "0.3.3" @@ -1202,10 +1214,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "rustc-rayon 0.5.0", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "inkwell" version = "0.2.0" @@ -1376,7 +1398,7 @@ dependencies = [ "dashmap", "env_logger", "im-rc", - "indexmap", + "indexmap 1.9.3", "kclvm-ast", "kclvm-compiler", "kclvm-config", @@ -1412,7 +1434,7 @@ dependencies = [ "compiler_base_session", "fslock", "glob", - "indexmap", + "indexmap 1.9.3", "kclvm-api", "kclvm-ast", "kclvm-cmd", @@ -1441,7 +1463,7 @@ dependencies = [ "anyhow", "criterion 0.4.0", "futures", - "indexmap", + "indexmap 1.9.3", "jsonrpc-stdio-server", "kclvm-ast", "kclvm-ast-pretty", @@ -1464,7 +1486,7 @@ dependencies = [ "protoc-bin-vendored", "serde", "serde_json", - "serde_yaml 0.9.21", + "serde_yaml", "tempfile", "tokio", ] @@ -1488,7 +1510,7 @@ dependencies = [ "compiler_base_macros", "compiler_base_session", "fancy-regex", - "indexmap", + "indexmap 1.9.3", "kclvm-ast", "kclvm-error", "kclvm-parser", @@ -1521,7 +1543,7 @@ dependencies = [ "bit-set", "bitflags", "fancy-regex", - "indexmap", + "indexmap 1.9.3", "inkwell", "kclvm-ast", "kclvm-error", @@ -1543,7 +1565,7 @@ dependencies = [ "dirs", "fslock", "glob", - "indexmap", + "indexmap 1.9.3", "kclvm-ast", "kclvm-utils", "kclvm-version", @@ -1552,7 +1574,7 @@ dependencies = [ "rust-crypto", "serde", "serde_json", - "serde_yaml 0.8.26", + "serde_yaml", "toml", ] @@ -1582,7 +1604,7 @@ dependencies = [ "compiler_base_macros", "compiler_base_session", "compiler_base_span 0.0.2", - "indexmap", + "indexmap 1.9.3", "kclvm-runtime", "kclvm-span", "termize", @@ -1622,7 +1644,7 @@ dependencies = [ "either", "enquote", "expect-test", - "indexmap", + "indexmap 1.9.3", "insta", "kclvm-ast", "kclvm-config", @@ -1648,7 +1670,7 @@ dependencies = [ "anyhow", "compiler_base_macros", "compiler_base_session", - "indexmap", + "indexmap 1.9.3", "kclvm-ast", "kclvm-ast-pretty", "kclvm-error", @@ -1669,7 +1691,7 @@ dependencies = [ "criterion 0.3.6", "fslock", "glob", - "indexmap", + "indexmap 1.9.3", "kclvm-ast", "kclvm-compiler", "kclvm-config", @@ -1700,7 +1722,7 @@ dependencies = [ "bstr", "chrono", "fancy-regex", - "indexmap", + "indexmap 1.9.3", "itertools", "kclvm_runtime_internal_macros", "libc", @@ -1710,7 +1732,7 @@ dependencies = [ "regex", "serde", "serde_json", - "serde_yaml 0.8.26", + "serde_yaml", "sha1", "sha2 0.9.9", "unic-ucd-bidi", @@ -1732,7 +1754,7 @@ dependencies = [ "compiler_base_span 0.0.2", "criterion 0.3.6", "fancy-regex", - "indexmap", + "indexmap 1.9.3", "kclvm-ast", "kclvm-error", "kclvm-parser", @@ -1765,7 +1787,7 @@ dependencies = [ "compiler_base_session", "criterion 0.3.6", "fancy-regex", - "indexmap", + "indexmap 1.9.3", "kclvm-ast", "kclvm-ast-pretty", "kclvm-config", @@ -1781,7 +1803,7 @@ dependencies = [ "regex", "rustc_lexer", "serde_json", - "serde_yaml 0.9.21", + "serde_yaml", "walkdir", ] @@ -2165,7 +2187,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -2489,7 +2511,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cd60adecd0947e1dd41a3077713381aa0cdcba6dc8777300d7d5b83b9fbe84" dependencies = [ "fst", - "indexmap", + "indexmap 1.9.3", "ra_ap_paths", "ra_ap_stdx", "rustc-hash", @@ -2762,7 +2784,7 @@ dependencies = [ "bitflags", "cfg-if 0.1.10", "ena", - "indexmap", + "indexmap 1.9.3", "jobserver", "libc", "memmap2", @@ -2863,7 +2885,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b84d9f96071f3f3be0dc818eae3327625d8ebc95b58da37d6850724f31d3403" dependencies = [ "crossbeam-utils", - "indexmap", + "indexmap 1.9.3", "lock_api", "log", "oorandom", @@ -3005,23 +3027,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap", - "ryu", - "serde", - "yaml-rust", -] - -[[package]] -name = "serde_yaml" -version = "0.9.21" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap", + "indexmap 2.0.0", "itoa", "ryu", "serde", diff --git a/kclvm/api/Cargo.toml b/kclvm/api/Cargo.toml index 80cd16c3d..7b77f5c27 100644 --- a/kclvm/api/Cargo.toml +++ b/kclvm/api/Cargo.toml @@ -12,7 +12,7 @@ tempfile = "3.5.0" prost = "0.11.8" prost-types = "0.11.8" serde_json = "1.0" -serde_yaml = "0.9.2" +serde_yaml = "0.9.25" anyhow = "1.0.70" serde = { version = "1", features = ["derive"] } indexmap = "1.0" diff --git a/kclvm/config/Cargo.toml b/kclvm/config/Cargo.toml index 2471cbe70..8708909ca 100644 --- a/kclvm/config/Cargo.toml +++ b/kclvm/config/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] serde = { version = "1", features = ["derive"] } -serde_yaml = "0.8.7" +serde_yaml = "0.9.25" serde_json = "1.0" indexmap = "1.0" ahash = "0.7.2" diff --git a/kclvm/runner/src/custom_manifests_data/list.stdout.golden b/kclvm/runner/src/custom_manifests_data/list.stdout.golden index 1b3810d70..cf081cf3d 100644 --- a/kclvm/runner/src/custom_manifests_data/list.stdout.golden +++ b/kclvm/runner/src/custom_manifests_data/list.stdout.golden @@ -1,17 +1,17 @@ k1: - - 1 - - 2 +- 1 +- 2 k2: - - 3 - - 4 +- 3 +- 4 --- k3: - - 5 - - 6 +- 5 +- 6 k4: - - 7 - - 8 +- 7 +- 8 --- k5: - - 9 - - 10 +- 9 +- 10 diff --git a/kclvm/runtime/Cargo.toml b/kclvm/runtime/Cargo.toml index 53dabf8c3..8d5b65353 100644 --- a/kclvm/runtime/Cargo.toml +++ b/kclvm/runtime/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" kclvm_runtime_internal_macros = { path = "./internal_macros" } serde_json = {package = "serde_json", version = "= 1.0.86"} serde = { version = "1", features = ["derive"] } -serde_yaml = "0.8.23" +serde_yaml = "0.9.25" base64 = "0.13.0" libc = "0.2.112" diff --git a/kclvm/runtime/src/manifests/tests.rs b/kclvm/runtime/src/manifests/tests.rs index 86625bcdc..5a68e8902 100644 --- a/kclvm/runtime/src/manifests/tests.rs +++ b/kclvm/runtime/src/manifests/tests.rs @@ -17,7 +17,7 @@ fn test_kclvm_manifests_yaml_stream() { YamlEncodeOptions::default(), ), ( - "a:\n - 1\n - 2\n - 3\nb: s\n", + "a:\n- 1\n- 2\n- 3\nb: s\n", ValueRef::list(Some(&[&ValueRef::dict(Some(&[ ("a", &ValueRef::list_int(&[1, 2, 3])), ("b", &ValueRef::str("s")), @@ -36,7 +36,7 @@ fn test_kclvm_manifests_yaml_stream() { }, ), ( - "a: 1\nb: ~\n", + "a: 1\nb: null\n", ValueRef::list(Some(&[&ValueRef::dict(Some(&[ ("a", &ValueRef::int(1)), ("b", &ValueRef::none()), diff --git a/kclvm/runtime/src/manifests/yaml.rs b/kclvm/runtime/src/manifests/yaml.rs index 3ef949948..47ee12d63 100644 --- a/kclvm/runtime/src/manifests/yaml.rs +++ b/kclvm/runtime/src/manifests/yaml.rs @@ -39,7 +39,7 @@ mod test_manifests_yaml { YamlEncodeOptions::default(), ), ( - "a:\n - 1\n - 2\n - 3\nb: s\n", + "a:\n- 1\n- 2\n- 3\nb: s\n", ValueRef::list(Some(&[&ValueRef::dict(Some(&[ ("a", &ValueRef::list_int(&[1, 2, 3])), ("b", &ValueRef::str("s")), @@ -58,7 +58,7 @@ mod test_manifests_yaml { }, ), ( - "a: 1\nb: ~\n", + "a: 1\nb: null\n", ValueRef::list(Some(&[&ValueRef::dict(Some(&[ ("a", &ValueRef::int(1)), ("b", &ValueRef::none()), diff --git a/kclvm/runtime/src/value/val_yaml.rs b/kclvm/runtime/src/value/val_yaml.rs index 81eaf8896..70e149841 100644 --- a/kclvm/runtime/src/value/val_yaml.rs +++ b/kclvm/runtime/src/value/val_yaml.rs @@ -156,7 +156,7 @@ mod test_value_yaml { ), ( "a:\n- 1\n -2\n-3", - "while parsing a block mapping, did not find expected key at line 4 column 1", + "could not find expected ':' at line 5 column 1, while scanning a simple key at line 4 column 1", ), ]; for (yaml_str, expected) in cases { @@ -192,7 +192,7 @@ mod test_value_yaml { ), ( "b:3\n---\na:\n- 1\n -2\n-3", - "while parsing a block mapping, did not find expected key at line 6 column 1", + "could not find expected ':' at line 7 column 1, while scanning a simple key at line 6 column 1", ), ]; for (yaml_str, expected) in cases { @@ -214,7 +214,7 @@ mod test_value_yaml { ("a", &ValueRef::list_int(&[1, 2, 3])), ("b", &ValueRef::str("s")), ])), - "a:\n - 1\n - 2\n - 3\nb: s\n", + "a:\n- 1\n- 2\n- 3\nb: s\n", ), ]; for (value, expected) in cases { @@ -271,7 +271,7 @@ mod test_value_yaml { ("b", &ValueRef::list_int(&[1, 2, 3])), ("a", &ValueRef::str("s")), ])), - "a: s\nb:\n - 1\n - 2\n - 3\n", + "a: s\nb:\n- 1\n- 2\n- 3\n", YamlEncodeOptions { sort_keys: true, ignore_private: false, diff --git a/kclvm/tools/Cargo.toml b/kclvm/tools/Cargo.toml index 647076325..6884cc55a 100644 --- a/kclvm/tools/Cargo.toml +++ b/kclvm/tools/Cargo.toml @@ -25,7 +25,7 @@ kclvm-runtime = {path = "../runtime"} kclvm-driver = {path = "../driver"} serde_json = "1.0.85" -serde_yaml = "0.9.13" +serde_yaml = "0.9.25" once_cell = "1.15.0" regex = "1.3" diff --git a/test/grammar/builtins/default/bin/stdout.golden b/test/grammar/builtins/default/bin/stdout.golden index 70d34a975..d95ec88af 100644 --- a/test/grammar/builtins/default/bin/stdout.golden +++ b/test/grammar/builtins/default/bin/stdout.golden @@ -1,2 +1,2 @@ -a: 0b1010 -b: 0b10100 \ No newline at end of file +a: '0b1010' +b: '0b10100' diff --git a/test/grammar/builtins/default/oct/stdout.golden b/test/grammar/builtins/default/oct/stdout.golden index 637b22f33..e15ca4f32 100644 --- a/test/grammar/builtins/default/oct/stdout.golden +++ b/test/grammar/builtins/default/oct/stdout.golden @@ -1,3 +1,3 @@ -a: 0o12 -b: 0o24 -c: 0o17 +a: '0o12' +b: '0o24' +c: '0o17' diff --git a/test/grammar/schema/union/binary_union/binary_union_5/stdout.golden b/test/grammar/schema/union/binary_union/binary_union_5/stdout.golden index 87fe725dd..6ac69ff7b 100644 --- a/test/grammar/schema/union/binary_union/binary_union_5/stdout.golden +++ b/test/grammar/schema/union/binary_union/binary_union_5/stdout.golden @@ -1,2 +1,2 @@ -data1: 0b10101111 -data2: 0b11111111 +data1: '0b10101111' +data2: '0b11111111'