diff --git a/.github/workflows/build-test-macos-arm64.yml b/.github/workflows/build-test-macos-arm64.yml index 0eb694759..ed1de2490 100644 --- a/.github/workflows/build-test-macos-arm64.yml +++ b/.github/workflows/build-test-macos-arm64.yml @@ -49,9 +49,13 @@ jobs: run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/opt/homebrew/opt/llvm@12/bin/ && make test-grammar-evaluator shell: bash + - name: Release + run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/opt/homebrew/opt/llvm@12/bin/ && make release + shell: bash + - uses: actions/upload-artifact@v4 if: "contains(matrix.os, 'macos-13-xlarge')" with: name: kcl-darwin-arm64 if-no-files-found: error - path: _build/dist/Darwin/kclvm + path: _build/kclvm-Darwin-latest.tar.gz diff --git a/kclvm/api/src/service/service_impl.rs b/kclvm/api/src/service/service_impl.rs index 57ca1f325..d8f250b80 100644 --- a/kclvm/api/src/service/service_impl.rs +++ b/kclvm/api/src/service/service_impl.rs @@ -428,7 +428,9 @@ impl KclvmServiceImpl { }); } - /// Execute KCL file with args. **Note that it is not thread safe.** + /// Execute KCL file with arguments and return the JSON/YAML result. + /// + /// **Note that it is not thread safe when the llvm feature is enabled.** /// /// # Examples /// @@ -517,7 +519,9 @@ impl KclvmServiceImpl { }) } - /// Execute the KCL artifact with args. **Note that it is not thread safe.** + /// Execute the KCL artifact with arguments and return the JSON/YAML result. + /// + /// ***Note that it is not thread safe when the llvm feature is enabled.* /// /// # Examples /// @@ -584,17 +588,17 @@ impl KclvmServiceImpl { /// age = 18 /// } /// ``` - pub fn override_file(&self, args: &OverrideFileArgs) -> Result { - override_file(&args.file, &args.specs, &args.import_paths) - .map_err(|err| err.to_string()) - .map(|result| OverrideFileResult { + pub fn override_file(&self, args: &OverrideFileArgs) -> anyhow::Result { + override_file(&args.file, &args.specs, &args.import_paths).map(|result| { + OverrideFileResult { result: result.result, parse_errors: result .parse_errors .into_iter() .map(|e| e.into_error()) .collect(), - }) + } + }) } /// Service for getting the schema mapping.