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

feat: bump kcl lib version to v0.9.0-beta.1 #87

Merged
merged 2 commits into from
May 28, 2024
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
22 changes: 6 additions & 16 deletions .github/workflows/nodejs-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@ jobs:
cache: pnpm
cache-dependency-path: "nodejs/pnpm-lock.yaml"

- name: Corepack
run: corepack enable

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-save --frozen-lockfile

- name: Check format
run: pnpm exec prettier --check .
Expand Down Expand Up @@ -113,10 +110,8 @@ jobs:
node-version: '18'
cache: pnpm
cache-dependency-path: "nodejs/pnpm-lock.yaml"
- name: Corepack
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-save --frozen-lockfile
- name: Build
shell: bash
working-directory: .
Expand Down Expand Up @@ -156,10 +151,8 @@ jobs:
node-version: '18'
cache: pnpm
cache-dependency-path: "nodejs/pnpm-lock.yaml"
- name: Corepack
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-save --frozen-lockfile
- name: Build
shell: bash
run: ${{ matrix.settings.build }}
Expand Down Expand Up @@ -208,10 +201,8 @@ jobs:
node-version: '18'
cache: pnpm
cache-dependency-path: "nodejs/pnpm-lock.yaml"
- name: Corepack
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-save --frozen-lockfile
- name: Build
run: ${{ matrix.settings.build }}
shell: bash
Expand Down Expand Up @@ -243,10 +234,9 @@ jobs:
node-version: "18"
cache: pnpm
cache-dependency-path: "nodejs/pnpm-lock.yaml"
- name: Corepack
run: corepack enable

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-save --frozen-lockfile

- name: Download all artifacts
uses: actions/download-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kcl-lang"
version = "0.9.0-alpha.2"
version = "0.9.0-beta.1"
edition = "2021"
readme = "README.md"
documentation = "kcl-lang.io"
Expand All @@ -11,4 +11,4 @@ license = "Apache-2.0"

[dependencies]
anyhow = "1"
kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.2" }
kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-beta.1" }
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ fn main() -> Result<()> {
}
```

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.

```shell
# Take the kclvm-runtime as an example.
cargo add --git https://github.com/kcl-lang/kcl kclvm-runtime
```

### Go

```shell
Expand Down
2 changes: 1 addition & 1 deletion install.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"runtime"
)

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

func findPath(name string) string {
if path, err := exec.LookPath(name); err == nil {
Expand Down
7 changes: 3 additions & 4 deletions java/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ serde_json = "1"
indexmap = "2.2.5"
anyhow = "1"
serde = { version = "1", features = ["derive"] }
kcl-lang = {path = "../"}
once_cell = "1.19.0"
lazy_static = "1.4.0"

kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.2" }
kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.2" }
kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.2" }
kclvm-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-beta.1" }
kclvm-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-beta.1" }
kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-beta.1" }
3 changes: 1 addition & 2 deletions java/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
extern crate anyhow;
extern crate jni;
extern crate kcl_lang;
extern crate kclvm_api;
extern crate kclvm_parser;
extern crate kclvm_sema;
Expand All @@ -12,7 +11,7 @@ use anyhow::Result;
use jni::objects::{JByteArray, JClass, JObject};
use jni::sys::jbyteArray;
use jni::JNIEnv;
use kcl_lang::call;
use kclvm_api::call;
use kclvm_api::gpyrpc::LoadPackageArgs;
use kclvm_api::service::KclvmServiceImpl;
use kclvm_parser::KCLModuleCache;
Expand Down
9 changes: 7 additions & 2 deletions java/src/main/java/com/kcl/api/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ public OverrideFile_Result overrideFile(OverrideFile_Args args) throws Exception
}

@Override
public GetSchemaType_Result getFullSchemaType(GetFullSchemaType_Args args) throws Exception {
return GetSchemaType_Result.parseFrom(call("KclvmService.GetSchemaType", args.toByteArray()));
public GetSchemaTypeMapping_Result getSchemaTypeMapping(GetSchemaTypeMapping_Args args) throws Exception {
return GetSchemaTypeMapping_Result.parseFrom(call("KclvmService.GetSchemaTypeMapping", args.toByteArray()));
}

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

@Override
public UpdateDependencies_Result updateDependencies(UpdateDependencies_Args args) throws Exception {
return UpdateDependencies_Result.parseFrom(call("KclvmService.UpdateDependencies", args.toByteArray()));
}

private byte[] call(String name, byte[] args) throws Exception {
byte[] result = callNative(name.getBytes(), args);
if (result != null && startsWith(result, "ERROR")) {
Expand Down
5 changes: 4 additions & 1 deletion java/src/main/java/com/kcl/api/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface Service {
ListVariables_Result listVariables(ListVariables_Args args) throws Exception;

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

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

// Service for the testing tool
Test_Result test(Test_Args args) throws Exception;

// Service for the dependency updating
UpdateDependencies_Result updateDependencies(UpdateDependencies_Args args) throws Exception;
}
Loading
Loading