diff --git a/.github/workflows/dotnet-test.yaml b/.github/workflows/dotnet-test.yaml index cbaa2f1..25e93aa 100644 --- a/.github/workflows/dotnet-test.yaml +++ b/.github/workflows/dotnet-test.yaml @@ -176,4 +176,4 @@ jobs: if: "startsWith(github.ref, 'refs/tags/')" run: | cd dotnet/KclLib/bin/Release - dotnet nuget push KclLib.0.10.0-beta.1.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json + dotnet nuget push KclLib.0.10.0-beta.2.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json diff --git a/Cargo.toml b/Cargo.toml index d9065fc..ef5f50f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lang" -version = "0.10.0-beta.1" +version = "0.10.0-beta.2" edition = "2021" readme = "README.md" documentation = "kcl-lang.io" @@ -11,4 +11,4 @@ license = "Apache-2.0" [dependencies] anyhow = "1" -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } diff --git a/README.md b/README.md index 1e4d438..b4f17f9 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ This way you'll be able to import the above dependency to use the SDK. com.kcl kcl-lib - 0.10.0-beta.1-SNAPSHOT + 0.10.0-beta.2-SNAPSHOT ``` @@ -187,7 +187,7 @@ This way you'll be able to import the above dependency to use the SDK. com.kcl kcl-lib - 0.10.0-beta.1-SNAPSHOT + 0.10.0-beta.2-SNAPSHOT ``` @@ -221,7 +221,7 @@ For CMake, you can use FetchContent to add KCL C++ Lib to your project. FetchContent_Declare( kcl-lib GIT_REPOSITORY https://github.com/kcl-lang/lib.git - GIT_TAG v0.10.0-beta.1 + GIT_TAG v0.10.0-beta.2 SOURCE_SUBDIR cpp ) FetchContent_MakeAvailable(kcl-lib) diff --git a/c/Cargo.toml b/c/Cargo.toml index defff8d..74cb1f7 100644 --- a/c/Cargo.toml +++ b/c/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lib-c" -version = "0.10.0-beta.1" +version = "0.10.0-beta.2" edition = "2021" publish = false @@ -12,4 +12,4 @@ doc = false cbindgen = "0.26.0" [dependencies] -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } diff --git a/cpp/Cargo.toml b/cpp/Cargo.toml index 2196563..b5bfeda 100644 --- a/cpp/Cargo.toml +++ b/cpp/Cargo.toml @@ -2,7 +2,7 @@ name = "kcl-lib-cpp" publish = false edition = "2021" -version = "0.10.0-beta.1" +version = "0.10.0-beta.2" [lib] crate-type = ["staticlib"] @@ -10,7 +10,7 @@ crate-type = ["staticlib"] [dependencies] anyhow = "1.0" cxx = "1.0" -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } [build-dependencies] cxx-build = "1.0" diff --git a/cpp/README.md b/cpp/README.md index 3e95a8a..5f12ca6 100644 --- a/cpp/README.md +++ b/cpp/README.md @@ -12,7 +12,7 @@ You can use FetchContent to add KCL C++ Lib to your project. FetchContent_Declare( kcl-lib GIT_REPOSITORY https://github.com/kcl-lang/lib.git - GIT_TAG v0.10.0-beta.1 + GIT_TAG v0.10.0-beta.2 SOURCE_SUBDIR cpp ) FetchContent_MakeAvailable(kcl-lib) @@ -24,7 +24,7 @@ Or you can download the source code and add it to your project. mkdir third_party cd third_party git clone https://github.com/kcl-lang/lib.git -git checkout v0.10.0-beta.1 +git checkout v0.10.0-beta.2 ``` ```shell diff --git a/dotnet/Cargo.toml b/dotnet/Cargo.toml index 088cd48..d324ddf 100644 --- a/dotnet/Cargo.toml +++ b/dotnet/Cargo.toml @@ -8,4 +8,4 @@ crate-type = ["cdylib"] doc = false [dependencies] -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } diff --git a/dotnet/KclLib.Tests/APITest.cs b/dotnet/KclLib.Tests/APITest.cs index 560467a..c9a2328 100644 --- a/dotnet/KclLib.Tests/APITest.cs +++ b/dotnet/KclLib.Tests/APITest.cs @@ -146,7 +146,7 @@ public void TestListVariablesAPI() var path = Path.Combine(parentDirectory, "test_data", "schema.k"); args.Files.Add(path); var result = api.ListVariables(args); - Assert.AreEqual("AppConfig {replicas = 2}", result.Variables["app"].Variables[0].Value, result.ToString()); + Assert.AreEqual("AppConfig {\n replicas = 2\n}", result.Variables["app"].Variables[0].Value, result.ToString()); } [TestMethod] diff --git a/dotnet/KclLib.Tests/test_data/override_file/main.bak b/dotnet/KclLib.Tests/test_data/override_file/main.bak index 75191e4..f720fad 100644 --- a/dotnet/KclLib.Tests/test_data/override_file/main.bak +++ b/dotnet/KclLib.Tests/test_data/override_file/main.bak @@ -1,5 +1,4 @@ a = 1 - b = { "a": 1 "b": 2 diff --git a/dotnet/KclLib/KclLib.csproj b/dotnet/KclLib/KclLib.csproj index 82db99b..6c3707f 100644 --- a/dotnet/KclLib/KclLib.csproj +++ b/dotnet/KclLib/KclLib.csproj @@ -11,7 +11,7 @@ KclLib KclLib - 0.10.0-beta.1 + 0.10.0-beta.2 true snupkg https://github.com/kcl-lang diff --git a/dotnet/KclLib/README.md b/dotnet/KclLib/README.md index a39fab5..4ef6b97 100644 --- a/dotnet/KclLib/README.md +++ b/dotnet/KclLib/README.md @@ -271,7 +271,6 @@ The content of `main.k` is ```python a = 1 - b = { "a": 1 "b": 2 diff --git a/dotnet/examples/exec-program/exec-program.csproj b/dotnet/examples/exec-program/exec-program.csproj index a533803..0bb117f 100644 --- a/dotnet/examples/exec-program/exec-program.csproj +++ b/dotnet/examples/exec-program/exec-program.csproj @@ -9,7 +9,7 @@ - + diff --git a/go/install/install.go b/go/install/install.go index 39ca0e4..a909612 100644 --- a/go/install/install.go +++ b/go/install/install.go @@ -10,7 +10,7 @@ import ( lib "kcl-lang.io/lib/go/lib" ) -const KCLVM_VERSION = "v0.10.0-beta.1" +const KCLVM_VERSION = "v0.10.0-beta.2" func findPath(name string) string { if path, err := exec.LookPath(name); err == nil { diff --git a/go/lib/darwin-amd64/libkclvm_cli_cdylib.dylib b/go/lib/darwin-amd64/libkclvm_cli_cdylib.dylib index 03af1f5..04ff7c1 100755 Binary files a/go/lib/darwin-amd64/libkclvm_cli_cdylib.dylib and b/go/lib/darwin-amd64/libkclvm_cli_cdylib.dylib differ diff --git a/go/lib/darwin-arm64/libkclvm_cli_cdylib.dylib b/go/lib/darwin-arm64/libkclvm_cli_cdylib.dylib index 17805bf..eb21f70 100755 Binary files a/go/lib/darwin-arm64/libkclvm_cli_cdylib.dylib and b/go/lib/darwin-arm64/libkclvm_cli_cdylib.dylib differ diff --git a/go/lib/linux-amd64/libkclvm_cli_cdylib.so b/go/lib/linux-amd64/libkclvm_cli_cdylib.so index 3e88225..54cc452 100755 Binary files a/go/lib/linux-amd64/libkclvm_cli_cdylib.so and b/go/lib/linux-amd64/libkclvm_cli_cdylib.so differ diff --git a/go/lib/linux-arm64/libkclvm_cli_cdylib.so b/go/lib/linux-arm64/libkclvm_cli_cdylib.so index 4a9353f..f1508ba 100755 Binary files a/go/lib/linux-arm64/libkclvm_cli_cdylib.so and b/go/lib/linux-arm64/libkclvm_cli_cdylib.so differ diff --git a/go/lib/windows-amd64/kclvm_cli_cdylib.dll b/go/lib/windows-amd64/kclvm_cli_cdylib.dll index 1f607e6..8cd329f 100644 Binary files a/go/lib/windows-amd64/kclvm_cli_cdylib.dll and b/go/lib/windows-amd64/kclvm_cli_cdylib.dll differ diff --git a/go/lib/windows-arm64/kclvm_cli_cdylib.dll b/go/lib/windows-arm64/kclvm_cli_cdylib.dll index 1f607e6..8cd329f 100644 Binary files a/go/lib/windows-arm64/kclvm_cli_cdylib.dll and b/go/lib/windows-arm64/kclvm_cli_cdylib.dll differ diff --git a/java/Cargo.toml b/java/Cargo.toml index bdfd684..b130721 100644 --- a/java/Cargo.toml +++ b/java/Cargo.toml @@ -18,6 +18,6 @@ serde = { version = "1", features = ["derive"] } once_cell = "1.19.0" lazy_static = "1.4.0" -kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } -kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } +kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } diff --git a/java/README.md b/java/README.md index e30aacf..8618d45 100644 --- a/java/README.md +++ b/java/README.md @@ -26,7 +26,7 @@ This way you'll be able to import the above dependency to use the SDK. com.kcl kcl-lib - 0.10.0-beta.1-SNAPSHOT + 0.10.0-beta.2-SNAPSHOT ``` @@ -276,7 +276,6 @@ The content of `main.k` is ```python a = 1 - b = { "a": 1 "b": 2 diff --git a/java/pom.xml b/java/pom.xml index 0234633..b050f1c 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -5,7 +5,7 @@ com.kcl kcl-lib - 0.10.0-beta.1-SNAPSHOT + 0.10.0-beta.2-SNAPSHOT KCL Arifact Library for Java KCL is an open-source constraint-based record and functional language mainly diff --git a/java/src/test/java/com/kcl/ListVariablesTest.java b/java/src/test/java/com/kcl/ListVariablesTest.java index 0c5bbff..d458ac8 100644 --- a/java/src/test/java/com/kcl/ListVariablesTest.java +++ b/java/src/test/java/com/kcl/ListVariablesTest.java @@ -19,14 +19,15 @@ public void testListVariables() throws Exception { // Define the variables to test and their expected results String[][] testCases = { { "a", "1", "", "=" }, { "a1", "2", "", "=" }, { "a3", "3m", "", "=" }, { "b1", "True", "", "=" }, { "b2", "False", "", "=" }, { "s1", "\"Hello\"", "", "=" }, - { "array1", "[1, 2, 3]", "", "=" }, { "dict1", "{\"a\": 1, \"b\": 2}", "", "=" }, - { "dict1.a", "1", "", ":" }, { "dict1.b", "2", "", ":" }, { "dict2.b.c", "2", "", ":" }, - { "dict2.b.d", "3", "", ":" }, { "sha.name", "\"Hello\"", "", ":" }, - { "sha.ids", "[1, 2, 3]", "", ":" }, { "sha.data.a.b", "{\"c\": 2}", "", ":" }, - { "sha.data.a.b.c", "2", "", ":" }, { "shb.a.name", "\"HelloB\"", "", ":" }, - { "shb.a.ids", "[4, 5, 6]", "", ":" }, { "shb.a.data.d.e", "{\"f\": 3}", "", ":" }, - { "uconfa.name", "\"b\"", "", "=" }, { "c.a", "{name: \"Hello\"}", "", ":" }, - { "c1", "C {}", "C", "=" }, { "c2", "a.b.C {}", "a.b.C", "=" } }; + { "array1", "[\n 1\n 2\n 3\n]", "", "=" }, + { "dict1", "{\n \"a\": 1\n \"b\": 2\n}", "", "=" }, { "dict1.a", "1", "", ":" }, + { "dict1.b", "2", "", ":" }, { "dict2.b.c", "2", "", ":" }, { "dict2.b.d", "3", "", ":" }, + { "sha.name", "\"Hello\"", "", ":" }, { "sha.ids", "[\n 1\n 2\n 3\n]", "", ":" }, + { "sha.data.a.b", "{\n \"c\": 2\n}", "", ":" }, { "sha.data.a.b.c", "2", "", ":" }, + { "shb.a.name", "\"HelloB\"", "", ":" }, { "shb.a.ids", "[\n 4\n 5\n 6\n]", "", ":" }, + { "shb.a.data.d.e", "{\n \"f\": 3\n}", "", ":" }, { "uconfa.name", "\"b\"", "", "=" }, + { "c.a", "{\n name: \"Hello\"\n}", "", ":" }, { "c1", "C {}", "C", "=" }, + { "c2", "a.b.C {}", "a.b.C", "=" } }; for (String[] testCase : testCases) { String spec = testCase[0]; diff --git a/kotlin/Cargo.toml b/kotlin/Cargo.toml index bdfd684..b130721 100644 --- a/kotlin/Cargo.toml +++ b/kotlin/Cargo.toml @@ -18,6 +18,6 @@ serde = { version = "1", features = ["derive"] } once_cell = "1.19.0" lazy_static = "1.4.0" -kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } -kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } +kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } diff --git a/kotlin/README.md b/kotlin/README.md index 47c9921..37181c8 100644 --- a/kotlin/README.md +++ b/kotlin/README.md @@ -26,7 +26,7 @@ This way you'll be able to import the above dependency to use the SDK. com.kcl kcl-lib-kotlin - 0.10.0-beta.1-SNAPSHOT + 0.10.0-beta.2-SNAPSHOT ``` @@ -267,7 +267,6 @@ The content of `main.k` is ```python a = 1 - b = { "a": 1 "b": 2 diff --git a/kotlin/pom.xml b/kotlin/pom.xml index 0dd0cbc..08f1f56 100644 --- a/kotlin/pom.xml +++ b/kotlin/pom.xml @@ -5,7 +5,7 @@ com.kcl kcl-lib-kotlin - 0.10.0-beta.1-SNAPSHOT + 0.10.0-beta.2-SNAPSHOT KCL Arifact Library for Kotlin KCL is an open-source constraint-based record and functional language mainly diff --git a/kotlin/src/test/kotlin/com/kcl/ListVariablesTest.kt b/kotlin/src/test/kotlin/com/kcl/ListVariablesTest.kt index 96b4641..f42b233 100644 --- a/kotlin/src/test/kotlin/com/kcl/ListVariablesTest.kt +++ b/kotlin/src/test/kotlin/com/kcl/ListVariablesTest.kt @@ -15,6 +15,6 @@ class ListVariablesTest { val args = listVariablesArgs { files += TEST_FILE } val api = API() val result = api.listVariables(args) - assertEquals(result.variablesMap["app"]?.variablesList?.get(0)?.value, "AppConfig {replicas: 2}") + assertEquals(result.variablesMap["app"]?.variablesList?.get(0)?.value, "AppConfig {\n replicas: 2\n}") } } diff --git a/kotlin/src/test_data/override_file/main.k.bk b/kotlin/src/test_data/override_file/main.k.bk index 75191e4..f720fad 100644 --- a/kotlin/src/test_data/override_file/main.k.bk +++ b/kotlin/src/test_data/override_file/main.k.bk @@ -1,5 +1,4 @@ a = 1 - b = { "a": 1 "b": 2 diff --git a/lua/Cargo.toml b/lua/Cargo.toml index 101593e..af6c4ce 100644 --- a/lua/Cargo.toml +++ b/lua/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lib-lua" -version = "0.10.0-beta.1" +version = "0.10.0-beta.2" edition = "2021" publish = false @@ -16,4 +16,4 @@ mlua = { version = "0.9", features = [ "module", "macros", ], default-features = false, optional = true } -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } diff --git a/nodejs/Cargo.toml b/nodejs/Cargo.toml index 4120dec..715ee04 100644 --- a/nodejs/Cargo.toml +++ b/nodejs/Cargo.toml @@ -7,7 +7,7 @@ version = "0.0.0" crate-type = ["cdylib"] [dependencies] -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix napi = { version = "2.12.2", default-features = false, features = ["napi4"] } napi-derive = "2.12.2" diff --git a/nodejs/__test__/list_variables.spec.mjs b/nodejs/__test__/list_variables.spec.mjs index 3fe2b3d..78ef127 100644 --- a/nodejs/__test__/list_variables.spec.mjs +++ b/nodejs/__test__/list_variables.spec.mjs @@ -4,5 +4,5 @@ import { listVariables, ListVariablesArgs } from '../index.js' test('listVariables', (t) => { const result = listVariables(new ListVariablesArgs(['__test__/test_data/schema.k'], [])) - t.is(result.variables['app'][0].value, 'AppConfig {replicas: 2}') + t.is(result.variables['app'][0].value, 'AppConfig {\n replicas: 2\n}') }) diff --git a/nodejs/examples/exec-program/package.json b/nodejs/examples/exec-program/package.json index 36df83d..7beef22 100644 --- a/nodejs/examples/exec-program/package.json +++ b/nodejs/examples/exec-program/package.json @@ -12,6 +12,6 @@ "dist/" ], "dependencies": { - "kcl-lib": "0.10.0-beta.1" + "kcl-lib": "0.10.0-beta.2" } } diff --git a/nodejs/npm/darwin-arm64/package-lock.json b/nodejs/npm/darwin-arm64/package-lock.json index 78de2ff..4780e4b 100644 --- a/nodejs/npm/darwin-arm64/package-lock.json +++ b/nodejs/npm/darwin-arm64/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kcl-lang/lib-darwin-arm64", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@kcl-lang/lib-darwin-arm64", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "cpu": [ "arm64" ], diff --git a/nodejs/npm/darwin-arm64/package.json b/nodejs/npm/darwin-arm64/package.json index 76e8b5b..7b11bb5 100644 --- a/nodejs/npm/darwin-arm64/package.json +++ b/nodejs/npm/darwin-arm64/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-darwin-arm64", "repository": "https://github.com/kcl-lang/lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "os": [ "darwin" ], diff --git a/nodejs/npm/darwin-x64/package.json b/nodejs/npm/darwin-x64/package.json index 7d7dfca..e7bc1d5 100644 --- a/nodejs/npm/darwin-x64/package.json +++ b/nodejs/npm/darwin-x64/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-darwin-x64", "repository": "https://github.com/kcl-lang/lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "os": [ "darwin" ], diff --git a/nodejs/npm/linux-arm64-gnu/package.json b/nodejs/npm/linux-arm64-gnu/package.json index 4a90335..4273c0f 100644 --- a/nodejs/npm/linux-arm64-gnu/package.json +++ b/nodejs/npm/linux-arm64-gnu/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-linux-arm64-gnu", "repository": "https://github.com/kcl-lang/lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "os": [ "linux" ], diff --git a/nodejs/npm/linux-x64-gnu/package.json b/nodejs/npm/linux-x64-gnu/package.json index 50480fa..a31c70d 100644 --- a/nodejs/npm/linux-x64-gnu/package.json +++ b/nodejs/npm/linux-x64-gnu/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-linux-x64-gnu", "repository": "https://github.com/kcl-lang/lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "os": [ "linux" ], diff --git a/nodejs/npm/win32-arm64-msvc/package.json b/nodejs/npm/win32-arm64-msvc/package.json index 420fcb8..9bad0ab 100644 --- a/nodejs/npm/win32-arm64-msvc/package.json +++ b/nodejs/npm/win32-arm64-msvc/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-win32-arm64-msvc", "repository": "https://github.com/kcl-lang/lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "os": [ "win32" ], diff --git a/nodejs/npm/win32-x64-msvc/package.json b/nodejs/npm/win32-x64-msvc/package.json index a291aab..4054975 100644 --- a/nodejs/npm/win32-x64-msvc/package.json +++ b/nodejs/npm/win32-x64-msvc/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-win32-x64-msvc", "repository": "https://github.com/kcl-lang/lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "os": [ "win32" ], diff --git a/nodejs/package.json b/nodejs/package.json index 03e99e6..36836df 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "kcl-lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "repository": "https://github.com/kcl-lang/lib", "license": "Apache-2.0", "main": "index.js", diff --git a/python/Cargo.toml b/python/Cargo.toml index bd57f77..963a775 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-python-lib" -version = "0.10.0-beta.1" +version = "0.10.0-beta.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -8,5 +8,5 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } pyo3 = "0.20.1" diff --git a/python/README.md b/python/README.md index fd1e971..42689ae 100644 --- a/python/README.md +++ b/python/README.md @@ -227,7 +227,6 @@ import kcl_lib.api as api args = api.ListVariables_Args(files=[TEST_FILE]) api = api.API() result = api.list_variables(args) -assert result.variables["app"].variables[0].value == "AppConfig {replicas: 2}" ```

@@ -311,7 +310,6 @@ The content of `main.k` is ```python a = 1 - b = { "a": 1 "b": 2 diff --git a/python/kcl_lib/api/service.py b/python/kcl_lib/api/service.py index 6f276e8..9bfce08 100644 --- a/python/kcl_lib/api/service.py +++ b/python/kcl_lib/api/service.py @@ -293,7 +293,6 @@ def list_variables(self, args: ListVariables_Args) -> ListVariables_Result: args = api.ListVariables_Args(files=[TEST_FILE]) api = api.API() result = api.list_variables(args) - assert result.variables["app"].variables[0].value == "AppConfig {replicas: 2}" ``` """ return self.call("KclvmService.ListVariables", args) diff --git a/python/tests/api_test.py b/python/tests/api_test.py index 3062893..de514f6 100644 --- a/python/tests/api_test.py +++ b/python/tests/api_test.py @@ -63,7 +63,8 @@ def test_load_package_api(): # Usage api = api.API() result = api.load_package(args) - assert list(result.symbols.values())[0].ty.schema_name == "AppConfig" + symbols = list(result.symbols.values()) + assert len([s for s in symbols if s.ty.schema_name == "AppConfig"]) > 0 def test_list_variables_api(): @@ -75,7 +76,9 @@ def test_list_variables_api(): # Usage api = api.API() result = api.list_variables(args) - assert result.variables["app"].variables[0].value == "AppConfig {replicas: 2}" + assert ( + result.variables["app"].variables[0].value == "AppConfig {\n replicas: 2\n}" + ) def test_list_options_api(): diff --git a/python/tests/test_data/override_file/main.bak b/python/tests/test_data/override_file/main.bak index 75191e4..f720fad 100644 --- a/python/tests/test_data/override_file/main.bak +++ b/python/tests/test_data/override_file/main.bak @@ -1,5 +1,4 @@ a = 1 - b = { "a": 1 "b": 2 diff --git a/spec/spec.proto b/spec/spec.proto index 6f33a06..85ac4bb 100644 --- a/spec/spec.proto +++ b/spec/spec.proto @@ -106,10 +106,10 @@ service KclvmService { /// { /// "jsonrpc": "2.0", /// "result": { - /// "version": "0.10.0-beta.1", + /// "version": "0.10.0-beta.2", /// "checksum": "c020ab3eb4b9179219d6837a57f5d323", /// "git_sha": "1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399", - /// "version_info": "Version: 0.10.0-beta.1-c020ab3eb4b9179219d6837a57f5d323\nPlatform: aarch64-apple-darwin\nGitCommit: 1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399" + /// "version_info": "Version: 0.10.0-beta.2-c020ab3eb4b9179219d6837a57f5d323\nPlatform: aarch64-apple-darwin\nGitCommit: 1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399" /// }, /// "id": 1 /// } diff --git a/swift/Cargo.toml b/swift/Cargo.toml index defff8d..74cb1f7 100644 --- a/swift/Cargo.toml +++ b/swift/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lib-c" -version = "0.10.0-beta.1" +version = "0.10.0-beta.2" edition = "2021" publish = false @@ -12,4 +12,4 @@ doc = false cbindgen = "0.26.0" [dependencies] -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.10.0-beta.2" } diff --git a/wasm/examples/node/package-lock.json b/wasm/examples/node/package-lock.json index e49b6c5..e7a2762 100644 --- a/wasm/examples/node/package-lock.json +++ b/wasm/examples/node/package-lock.json @@ -8,7 +8,7 @@ "name": "run-kcl-wasm", "version": "1.0.0", "dependencies": { - "@kcl-lang/wasm-lib": "0.10.0-beta.1" + "@kcl-lang/wasm-lib": "0.10.0-beta.2" } }, "node_modules/.pnpm/@protobufjs+aspromise@1.1.2/node_modules/@protobufjs/aspromise": { @@ -117,8 +117,8 @@ "license": "MIT" }, "node_modules/@kcl-lang/wasm-lib": { - "version": "0.10.0-beta.1", - "resolved": "https://registry.npmjs.org/@kcl-lang/wasm-lib/-/wasm-lib-0.10.0-beta.1.tgz", + "version": "0.10.0-beta.2", + "resolved": "https://registry.npmjs.org/@kcl-lang/wasm-lib/-/wasm-lib-0.10.0-beta.2.tgz", "integrity": "sha512-+ExBvutGtt2MBJNUQv+gLArOeM2eGq/meJG+nd8jBn5W4zQpF/V/gq2fcsHgydNU5dHu6ilBI0mgbO1L3Gsu3w==", "bundleDependencies": [ "wasi-js" diff --git a/wasm/examples/node/package.json b/wasm/examples/node/package.json index 890b580..687aa08 100644 --- a/wasm/examples/node/package.json +++ b/wasm/examples/node/package.json @@ -12,6 +12,6 @@ "dist/" ], "dependencies": { - "@kcl-lang/wasm-lib": "0.10.0-beta.1" + "@kcl-lang/wasm-lib": "0.10.0-beta.2" } } diff --git a/wasm/kcl.wasm b/wasm/kcl.wasm index f0d7396..77e7cae 100644 Binary files a/wasm/kcl.wasm and b/wasm/kcl.wasm differ diff --git a/wasm/package-lock.json b/wasm/package-lock.json index 8487b46..7e3e69e 100644 --- a/wasm/package-lock.json +++ b/wasm/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kcl-lang/wasm-lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@kcl-lang/wasm-lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "bundleDependencies": [ "wasi-js" ], diff --git a/wasm/package.json b/wasm/package.json index e68dc6e..9041b41 100644 --- a/wasm/package.json +++ b/wasm/package.json @@ -1,6 +1,6 @@ { "name": "@kcl-lang/wasm-lib", - "version": "0.10.0-beta.1", + "version": "0.10.0-beta.2", "description": "KCL WASM module", "files": [ "kcl.wasm",