Skip to content

Commit 6b14388

Browse files
authored
Merge pull request #87 from kcl-lang/feat-kcl-lib-090-beta
feat: bump kcl lib version to v0.9.0-beta.1
2 parents 1a621a8 + fe6723b commit 6b14388

File tree

37 files changed

+10397
-12674
lines changed

37 files changed

+10397
-12674
lines changed

.github/workflows/nodejs-test.yaml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ jobs:
4646
cache: pnpm
4747
cache-dependency-path: "nodejs/pnpm-lock.yaml"
4848

49-
- name: Corepack
50-
run: corepack enable
51-
5249
- name: Install dependencies
53-
run: pnpm install --frozen-lockfile
50+
run: pnpm install --no-save --frozen-lockfile
5451

5552
- name: Check format
5653
run: pnpm exec prettier --check .
@@ -113,10 +110,8 @@ jobs:
113110
node-version: '18'
114111
cache: pnpm
115112
cache-dependency-path: "nodejs/pnpm-lock.yaml"
116-
- name: Corepack
117-
run: corepack enable
118113
- name: Install dependencies
119-
run: pnpm install --frozen-lockfile
114+
run: pnpm install --no-save --frozen-lockfile
120115
- name: Build
121116
shell: bash
122117
working-directory: .
@@ -156,10 +151,8 @@ jobs:
156151
node-version: '18'
157152
cache: pnpm
158153
cache-dependency-path: "nodejs/pnpm-lock.yaml"
159-
- name: Corepack
160-
run: corepack enable
161154
- name: Install dependencies
162-
run: pnpm install --frozen-lockfile
155+
run: pnpm install --no-save --frozen-lockfile
163156
- name: Build
164157
shell: bash
165158
run: ${{ matrix.settings.build }}
@@ -208,10 +201,8 @@ jobs:
208201
node-version: '18'
209202
cache: pnpm
210203
cache-dependency-path: "nodejs/pnpm-lock.yaml"
211-
- name: Corepack
212-
run: corepack enable
213204
- name: Install dependencies
214-
run: pnpm install --frozen-lockfile
205+
run: pnpm install --no-save --frozen-lockfile
215206
- name: Build
216207
run: ${{ matrix.settings.build }}
217208
shell: bash
@@ -243,10 +234,9 @@ jobs:
243234
node-version: "18"
244235
cache: pnpm
245236
cache-dependency-path: "nodejs/pnpm-lock.yaml"
246-
- name: Corepack
247-
run: corepack enable
237+
248238
- name: Install dependencies
249-
run: pnpm install --frozen-lockfile
239+
run: pnpm install --no-save --frozen-lockfile
250240

251241
- name: Download all artifacts
252242
uses: actions/download-artifact@v3

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kcl-lang"
3-
version = "0.9.0-alpha.2"
3+
version = "0.9.0-beta.1"
44
edition = "2021"
55
readme = "README.md"
66
documentation = "kcl-lang.io"
@@ -11,4 +11,4 @@ license = "Apache-2.0"
1111

1212
[dependencies]
1313
anyhow = "1"
14-
kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.2" }
14+
kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-beta.1" }

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ fn main() -> Result<()> {
2929
}
3030
```
3131

32+
More Rust APIs can be found [here](https://github.com/kcl-lang/kcl). If you want to use the sub crate of KCL Rust core, you can run the following command.
33+
34+
```shell
35+
# Take the kclvm-runtime as an example.
36+
cargo add --git https://github.com/kcl-lang/kcl kclvm-runtime
37+
```
38+
3239
### Go
3340

3441
```shell

install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"runtime"
99
)
1010

11-
const KCLVM_VERSION = "v0.9.0-alpha.2"
11+
const KCLVM_VERSION = "v0.9.0-beta.1"
1212

1313
func findPath(name string) string {
1414
if path, err := exec.LookPath(name); err == nil {

java/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ serde_json = "1"
1515
indexmap = "2.2.5"
1616
anyhow = "1"
1717
serde = { version = "1", features = ["derive"] }
18-
kcl-lang = {path = "../"}
1918
once_cell = "1.19.0"
2019
lazy_static = "1.4.0"
2120

22-
kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.2" }
23-
kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.2" }
24-
kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.2" }
21+
kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-beta.1" }
22+
kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-beta.1" }
23+
kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-beta.1" }

java/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
extern crate anyhow;
22
extern crate jni;
3-
extern crate kcl_lang;
43
extern crate kclvm_api;
54
extern crate kclvm_parser;
65
extern crate kclvm_sema;
@@ -12,7 +11,7 @@ use anyhow::Result;
1211
use jni::objects::{JByteArray, JClass, JObject};
1312
use jni::sys::jbyteArray;
1413
use jni::JNIEnv;
15-
use kcl_lang::call;
14+
use kclvm_api::call;
1615
use kclvm_api::gpyrpc::LoadPackageArgs;
1716
use kclvm_api::service::KclvmServiceImpl;
1817
use kclvm_parser::KCLModuleCache;

java/src/main/java/com/kcl/api/API.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ public OverrideFile_Result overrideFile(OverrideFile_Args args) throws Exception
210210
}
211211

212212
@Override
213-
public GetSchemaType_Result getFullSchemaType(GetFullSchemaType_Args args) throws Exception {
214-
return GetSchemaType_Result.parseFrom(call("KclvmService.GetSchemaType", args.toByteArray()));
213+
public GetSchemaTypeMapping_Result getSchemaTypeMapping(GetSchemaTypeMapping_Args args) throws Exception {
214+
return GetSchemaTypeMapping_Result.parseFrom(call("KclvmService.GetSchemaTypeMapping", args.toByteArray()));
215215
}
216216

217217
@Override
@@ -254,6 +254,11 @@ public Test_Result test(Test_Args args) throws Exception {
254254
return Test_Result.parseFrom(call("KclvmService.Test", args.toByteArray()));
255255
}
256256

257+
@Override
258+
public UpdateDependencies_Result updateDependencies(UpdateDependencies_Args args) throws Exception {
259+
return UpdateDependencies_Result.parseFrom(call("KclvmService.UpdateDependencies", args.toByteArray()));
260+
}
261+
257262
private byte[] call(String name, byte[] args) throws Exception {
258263
byte[] result = callNative(name.getBytes(), args);
259264
if (result != null && startsWith(result, "ERROR")) {

java/src/main/java/com/kcl/api/Service.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public interface Service {
2525
ListVariables_Result listVariables(ListVariables_Args args) throws Exception;
2626

2727
// Service for getting the full schema type list
28-
GetSchemaType_Result getFullSchemaType(GetFullSchemaType_Args args) throws Exception;
28+
GetSchemaTypeMapping_Result getSchemaTypeMapping(GetSchemaTypeMapping_Args args) throws Exception;
2929

3030
// Service for formatting a code source
3131
FormatCode_Result formatCode(FormatCode_Args args) throws Exception;
@@ -50,4 +50,7 @@ public interface Service {
5050

5151
// Service for the testing tool
5252
Test_Result test(Test_Args args) throws Exception;
53+
54+
// Service for the dependency updating
55+
UpdateDependencies_Result updateDependencies(UpdateDependencies_Args args) throws Exception;
5356
}

0 commit comments

Comments
 (0)