diff --git a/.github/workflows/dotnet-test.yaml b/.github/workflows/dotnet-test.yaml index 143f031..73da544 100644 --- a/.github/workflows/dotnet-test.yaml +++ b/.github/workflows/dotnet-test.yaml @@ -175,4 +175,4 @@ jobs: if: "startsWith(github.ref, 'refs/tags/')" run: | cd dotnet/KclLib/bin/Release - dotnet nuget push KclLib.0.9.1.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json + dotnet nuget push KclLib.0.9.2.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json diff --git a/Cargo.toml b/Cargo.toml index e21f4ee..820dd13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lang" -version = "0.9.1" +version = "0.9.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.9.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.2" } diff --git a/README.md b/README.md index e47809d..359beec 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.9.1-SNAPSHOT + 0.9.2-SNAPSHOT ``` diff --git a/c/Cargo.toml b/c/Cargo.toml index 5b964ad..0d6db29 100644 --- a/c/Cargo.toml +++ b/c/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lib-c" -version = "0.9.1" +version = "0.9.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.9.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.2" } diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3b86d1b..7e07923 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(kcl-lib VERSION 0.9.1 LANGUAGES CXX) +project(kcl-lib VERSION 0.9.2 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/cpp/Cargo.toml b/cpp/Cargo.toml index 759db82..bd41fe6 100644 --- a/cpp/Cargo.toml +++ b/cpp/Cargo.toml @@ -2,7 +2,7 @@ name = "kcl-lib-cpp" publish = false edition = "2021" -version = "0.9.1" +version = "0.9.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.9.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.2" } [build-dependencies] cxx-build = "1.0" diff --git a/cpp/README.md b/cpp/README.md index 9f6c53d..f67bd88 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.9.1 + GIT_TAG v0.9.2 SOURCE_SUBDIR cpp ) FetchContent_MakeAvailable(kcl-lib) diff --git a/dotnet/Cargo.toml b/dotnet/Cargo.toml index 75da3f0..c83b31e 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.9.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.2" } diff --git a/dotnet/KclLib/KclLib.csproj b/dotnet/KclLib/KclLib.csproj index 672b05b..f6a40d8 100644 --- a/dotnet/KclLib/KclLib.csproj +++ b/dotnet/KclLib/KclLib.csproj @@ -11,7 +11,7 @@ KclLib KclLib - 0.9.1 + 0.9.2 true snupkg https://github.com/kcl-lang diff --git a/dotnet/KclLib/README.md b/dotnet/KclLib/README.md index f7643c8..a39fab5 100644 --- a/dotnet/KclLib/README.md +++ b/dotnet/KclLib/README.md @@ -65,38 +65,6 @@ var result = new API().ExecProgram(execArgs);

-### ParseProgram - -Parse KCL program with entry files and return the AST JSON string. - -
Example -

- -The content of `schema.k` is - -```python -schema AppConfig: - replicas: int - -app: AppConfig { - replicas: 2 -} -``` - -C# Code - -```csharp -using KclLib.API; - -var path = "schema.k" -var args = new ParseProgram_Args(); -args.Paths.Add(path); -var result = new API().ParseProgram(args); -``` - -

-
- ### ParseFile Parse KCL single file to Module AST JSON string with import dependencies and parse errors. diff --git a/dotnet/examples/exec-program/exec-program.csproj b/dotnet/examples/exec-program/exec-program.csproj index 4191d2b..d21a715 100644 --- a/dotnet/examples/exec-program/exec-program.csproj +++ b/dotnet/examples/exec-program/exec-program.csproj @@ -9,7 +9,7 @@
- + diff --git a/install.go b/install.go index 4704c86..56c31f1 100644 --- a/install.go +++ b/install.go @@ -8,7 +8,7 @@ import ( "runtime" ) -const KCLVM_VERSION = "v0.9.1" +const KCLVM_VERSION = "v0.9.2" func findPath(name string) string { if path, err := exec.LookPath(name); err == nil { diff --git a/java/Cargo.toml b/java/Cargo.toml index 0457f55..5edac5f 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.9.1" } -kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.9.1" } -kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.1" } +kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.9.2" } +kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.9.2" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.2" } diff --git a/java/README.md b/java/README.md index 2e26b8f..80e9d1a 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.9.1-SNAPSHOT + 0.9.2-SNAPSHOT ``` @@ -107,42 +107,6 @@ ExecProgram_Result result = apiInstance.execProgram(args);

-### parseProgram - -Parse KCL program with entry files and return the AST JSON string. - -
Example -

- -The content of `schema.k` is - -```python -schema AppConfig: - replicas: int - -app: AppConfig { - replicas: 2 -} -``` - -Java Code - -```java -import com.kcl.api.*; -import com.kcl.ast.*; -import com.kcl.util.JsonUtil; - -API api = new API(); -ParseProgram_Result result = api.parseProgram( - ParseProgram_Args.newBuilder().addPaths("schema.k").build() -); -System.out.println(result.getAstJson()); -Program program = JsonUtil.deserializeProgram(result.getAstJson()); -``` - -

-
- ### parseFile Parse KCL single file to Module AST JSON string with import dependencies and parse errors. @@ -174,42 +138,6 @@ ParseFile_Result result = apiInstance.parseFile(args);

-### parseProgram - -Parse KCL program with entry files and return the AST JSON string. - -
Example -

- -The content of `schema.k` is - -```python -schema AppConfig: - replicas: int - -app: AppConfig { - replicas: 2 -} -``` - -Java Code - -```java -import com.kcl.api.*; -import com.kcl.ast.*; -import com.kcl.util.JsonUtil; - -API api = new API(); -ParseProgram_Result result = api.parseProgram( - ParseProgram_Args.newBuilder().addPaths("path/to/kcl.k").build() -); -System.out.println(result.getAstJson()); -Program program = JsonUtil.deserializeProgram(result.getAstJson()); -``` - -

-
- ### loadPackage loadPackage provides users with the ability to parse KCL program and semantic model information including symbols, types, definitions, etc. diff --git a/java/pom.xml b/java/pom.xml index 8ec46ae..47a77ae 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -5,7 +5,7 @@ com.kcl kcl-lib - 0.9.1-SNAPSHOT + 0.9.2-SNAPSHOT KCL Arifact Library for Java KCL is an open-source constraint-based record and functional language mainly diff --git a/java/src/main/java/com/kcl/ast/ConfigEntry.java b/java/src/main/java/com/kcl/ast/ConfigEntry.java index 8724288..46b9186 100644 --- a/java/src/main/java/com/kcl/ast/ConfigEntry.java +++ b/java/src/main/java/com/kcl/ast/ConfigEntry.java @@ -25,9 +25,6 @@ public class ConfigEntry { @JsonProperty("operation") private ConfigEntryOperation operation; - @JsonProperty("insert_index") - private int insertIndex; - public NodeRef getKey() { return key; } @@ -51,12 +48,4 @@ public ConfigEntryOperation getOperation() { public void setOperation(ConfigEntryOperation operation) { this.operation = operation; } - - public int getInsertIndex() { - return insertIndex; - } - - public void setInsertIndex(int insertIndex) { - this.insertIndex = insertIndex; - } } diff --git a/nodejs/Cargo.toml b/nodejs/Cargo.toml index 463d34a..6c80d58 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.9.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.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/README.md b/nodejs/README.md index 1a55884..67cb014 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -96,35 +96,6 @@ try {

-### parseProgram - -Parse KCL program with entry files and return the AST JSON string. - -
Example -

- -The content of `schema.k` is - -```python -schema AppConfig: - replicas: int - -app: AppConfig { - replicas: 2 -} -``` - -Node.js Code - -```ts -import { parseProgram, ParseProgramArgs } from "kcl-lib"; - -const result = parseProgram(new ParseProgramArgs(["schema.k"])); -``` - -

-
- ### parseFile Parse KCL single file to Module AST JSON string with import dependencies and parse errors. diff --git a/nodejs/examples/exec-program/package.json b/nodejs/examples/exec-program/package.json index 4060afe..fa599fa 100644 --- a/nodejs/examples/exec-program/package.json +++ b/nodejs/examples/exec-program/package.json @@ -12,6 +12,6 @@ "dist/" ], "dependencies": { - "kcl-lib": "0.9.1" + "kcl-lib": "0.9.2" } } diff --git a/nodejs/npm/darwin-arm64/package.json b/nodejs/npm/darwin-arm64/package.json index a174768..1d6d42e 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.9.1", + "version": "0.9.2", "os": [ "darwin" ], diff --git a/nodejs/npm/darwin-x64/package.json b/nodejs/npm/darwin-x64/package.json index a5cb4db..ae47ffb 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.9.1", + "version": "0.9.2", "os": [ "darwin" ], diff --git a/nodejs/npm/linux-arm64-gnu/package.json b/nodejs/npm/linux-arm64-gnu/package.json index 6e835da..b109c3b 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.9.1", + "version": "0.9.2", "os": [ "linux" ], diff --git a/nodejs/npm/linux-x64-gnu/package.json b/nodejs/npm/linux-x64-gnu/package.json index 8dfdebd..f74b811 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.9.1", + "version": "0.9.2", "os": [ "linux" ], diff --git a/nodejs/npm/win32-arm64-msvc/package.json b/nodejs/npm/win32-arm64-msvc/package.json index 0f38702..e0f8454 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.9.1", + "version": "0.9.2", "os": [ "win32" ], diff --git a/nodejs/npm/win32-x64-msvc/package.json b/nodejs/npm/win32-x64-msvc/package.json index 55dc0ce..a989c13 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.9.1", + "version": "0.9.2", "os": [ "win32" ], diff --git a/nodejs/package.json b/nodejs/package.json index 59da857..91378cc 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "kcl-lib", - "version": "0.9.1", + "version": "0.9.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 092e473..3dfa065 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-python-lib" -version = "0.9.1" +version = "0.9.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.9.1" } +kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.2" } pyo3 = "0.20.1" diff --git a/python/README.md b/python/README.md index dc24e82..fd1e971 100644 --- a/python/README.md +++ b/python/README.md @@ -103,39 +103,6 @@ except Exception as err:

-### parse_program - -Parse KCL program with entry files and return the AST JSON string. - -
Example -

- -The content of `schema.k` is - -```python -schema AppConfig: - replicas: int - -app: AppConfig { - replicas: 2 -} -``` - -Python Code - -```python -import kcl_lib.api as api - -args = api.ParseProgram_Args(paths=["schema.k"]) -api = api.API() -result = api.parse_program(args) -assert len(result.paths) == 1 -assert len(result.errors) == 0 -``` - -

-
- ### parse_file Parse KCL single file to Module AST JSON string with import dependencies and parse errors. @@ -159,11 +126,9 @@ Python Code ```python import kcl_lib.api as api -args = api.ParseProgram_Args(paths=[TEST_FILE]) +args = api.ParseParseFile_Args(path=TEST_FILE) api = api.API() -result = api.parse_program(args) -assert len(result.paths) == 1 -assert len(result.errors) == 0 +result = api.parse_file(args) ```

diff --git a/spec/gpyrpc/spec.proto b/spec/gpyrpc/spec.proto index 038dc6d..3a9b973 100644 --- a/spec/gpyrpc/spec.proto +++ b/spec/gpyrpc/spec.proto @@ -106,10 +106,10 @@ service KclvmService { /// { /// "jsonrpc": "2.0", /// "result": { - /// "version": "0.9.1", + /// "version": "0.9.2", /// "checksum": "c020ab3eb4b9179219d6837a57f5d323", /// "git_sha": "1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399", - /// "version_info": "Version: 0.9.1-c020ab3eb4b9179219d6837a57f5d323\nPlatform: aarch64-apple-darwin\nGitCommit: 1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399" + /// "version_info": "Version: 0.9.2-c020ab3eb4b9179219d6837a57f5d323\nPlatform: aarch64-apple-darwin\nGitCommit: 1a9a72942fffc9f62cb8f1ae4e1d5ca32aa1f399" /// }, /// "id": 1 /// } diff --git a/wasm/examples/node/package-lock.json b/wasm/examples/node/package-lock.json index a5a3760..6eb104b 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.9.1" + "@kcl-lang/wasm-lib": "0.9.2" } }, "node_modules/.pnpm/@protobufjs+aspromise@1.1.2/node_modules/@protobufjs/aspromise": { @@ -117,7 +117,7 @@ "license": "MIT" }, "node_modules/@kcl-lang/wasm-lib": { - "version": "0.9.1", + "version": "0.9.2", "resolved": "https://registry.npmjs.org/@kcl-lang/wasm-lib/-/wasm-lib-0.9.1.tgz", "integrity": "sha512-+ExBvutGtt2MBJNUQv+gLArOeM2eGq/meJG+nd8jBn5W4zQpF/V/gq2fcsHgydNU5dHu6ilBI0mgbO1L3Gsu3w==", "bundleDependencies": [ diff --git a/wasm/examples/node/package.json b/wasm/examples/node/package.json index fef0c52..0883bfb 100644 --- a/wasm/examples/node/package.json +++ b/wasm/examples/node/package.json @@ -12,6 +12,6 @@ "dist/" ], "dependencies": { - "@kcl-lang/wasm-lib": "0.9.1" + "@kcl-lang/wasm-lib": "0.9.2" } } diff --git a/wasm/package-lock.json b/wasm/package-lock.json index cc0c842..0bd99e8 100644 --- a/wasm/package-lock.json +++ b/wasm/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kcl-lang/wasm-lib", - "version": "0.9.1", + "version": "0.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@kcl-lang/wasm-lib", - "version": "0.9.1", + "version": "0.9.2", "bundleDependencies": [ "wasi-js" ],