kcl-lib 0.8.7__tar.gz → 0.9.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of kcl-lib might be problematic. Click here for more details.

Files changed (85) hide show
  1. kcl_lib-0.9.0a1/.devcontainer/Dockerfile +24 -0
  2. kcl_lib-0.9.0a1/.devcontainer/devcontainer.json +8 -0
  3. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/.github/workflows/java-test.yaml +51 -88
  4. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/.github/workflows/nodejs-test.yaml +7 -3
  5. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/Cargo.toml +2 -2
  6. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/PKG-INFO +1 -1
  7. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/README.md +1 -1
  8. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/install.go +1 -1
  9. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/darwin-amd64/libkclvm_cli_cdylib.dylib +0 -0
  10. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/darwin-arm64/libkclvm_cli_cdylib.dylib +0 -0
  11. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/windows-amd64/kclvm_cli_cdylib.dll +0 -0
  12. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/windows-amd64/kclvm_cli_cdylib.lib +0 -0
  13. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/windows-arm64/kclvm_cli_cdylib.dll +0 -0
  14. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/windows-arm64/kclvm_cli_cdylib.lib +0 -0
  15. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/Cargo.lock +77 -76
  16. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/Cargo.toml +1 -1
  17. kcl_lib-0.9.0a1/util.go +41 -0
  18. kcl_lib-0.8.7/util.go +0 -29
  19. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/.github/workflows/cla.yml +0 -0
  20. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/.github/workflows/go-test.yaml +0 -0
  21. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/.github/workflows/python-test.yaml +0 -0
  22. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/.github/workflows/rust-test.yaml +0 -0
  23. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/.gitignore +0 -0
  24. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/go.mod +0 -0
  25. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/install_lib_unix.go +0 -0
  26. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/install_lib_windows.go +0 -0
  27. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kcl_lib/__init__.py +0 -0
  28. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kcl_lib/api/__init__.py +0 -0
  29. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kcl_lib/api/service.py +0 -0
  30. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kcl_lib/api/spec_pb2.py +0 -0
  31. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kclvm_cli_shared_lib_darwin_amd64.go +0 -0
  32. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kclvm_cli_shared_lib_darwin_arm64.go +0 -0
  33. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kclvm_cli_shared_lib_linux_amd64.go +0 -0
  34. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kclvm_cli_shared_lib_linux_arm64.go +0 -0
  35. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kclvm_cli_shared_lib_windows_amd64.go +0 -0
  36. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/kclvm_cli_shared_lib_windows_arm64.go +0 -0
  37. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/darwin-amd64/dummy.go +0 -0
  38. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/darwin-amd64/kclvm_cli +0 -0
  39. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/darwin-arm64/dummy.go +0 -0
  40. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/darwin-arm64/kclvm_cli +0 -0
  41. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/dummy.go +0 -0
  42. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/linux-amd64/dummy.go +0 -0
  43. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/linux-amd64/kclvm_cli +0 -0
  44. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/linux-arm64/dummy.go +0 -0
  45. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/linux-arm64/kclvm_cli +0 -0
  46. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/windows-amd64/dummy.go +0 -0
  47. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/windows-amd64/kclvm_cli.exe +0 -0
  48. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/windows-arm64/dummy.go +0 -0
  49. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/lib/windows-arm64/kclvm_cli.exe +0 -0
  50. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/pyproject.toml +0 -0
  51. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/.gitignore +0 -0
  52. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/Makefile +0 -0
  53. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/README.md +0 -0
  54. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/kcl_lib/__init__.py +0 -0
  55. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/kcl_lib/api/__init__.py +0 -0
  56. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/kcl_lib/api/service.py +0 -0
  57. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/kcl_lib/api/spec_pb2.py +0 -0
  58. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/src/lib.rs +0 -0
  59. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/tests/exec_test.py +0 -0
  60. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/python/tests/test_data/schema.k +0 -0
  61. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/spec/gpyrpc/Makefile +0 -0
  62. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/spec/gpyrpc/spec.proto +0 -0
  63. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/src/README.md +0 -0
  64. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/src/lib.rs +0 -0
  65. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/compile_recursive/kcl1/main.k +0 -0
  66. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/compile_recursive/kcl2/main.k +0 -0
  67. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/compile_recursive/main.k +0 -0
  68. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/get_schema_ty/aaa/kcl.mod +0 -0
  69. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/get_schema_ty/aaa/main.k +0 -0
  70. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/get_schema_ty/bbb/kcl.mod +0 -0
  71. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/get_schema_ty/bbb/main.k +0 -0
  72. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/get_schema_ty/ccc/kcl.mod +0 -0
  73. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/get_schema_ty/ccc/main.k +0 -0
  74. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/hello.k +0 -0
  75. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/hello_import.k +0 -0
  76. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/hello_with_print.k +0 -0
  77. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/rename/main.bak +0 -0
  78. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/rename_doc/main.bak +0 -0
  79. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/settings/kcl.yaml +0 -0
  80. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/test-lint-import.k +0 -0
  81. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/test-lint.k +0 -0
  82. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/test.k +0 -0
  83. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/testing/module/kcl.mod +0 -0
  84. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/testing/module/pkg/func.k +0 -0
  85. {kcl_lib-0.8.7 → kcl_lib-0.9.0a1}/testdata/testing/module/pkg/func_test.k +0 -0
@@ -0,0 +1,24 @@
1
+ FROM centos:7
2
+
3
+ RUN yum -y update && \
4
+ yum install gcc gcc-c++ glibc-static -y
5
+
6
+ RUN yum -y install wget
7
+
8
+ RUN yum -y install git
9
+
10
+ RUN yum -y install python3
11
+
12
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
13
+
14
+ ENV PATH="/root/.cargo/bin:${PATH}"
15
+
16
+ RUN yum -y install java-1.8.0-openjdk-devel
17
+
18
+ RUN wget https://repo.huaweicloud.com/apache/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz && \
19
+ tar -xzf apache-maven-*.tar.gz && \
20
+ mkdir -p /opt/maven && \
21
+ mv apache-maven-* /opt/maven && \
22
+ ln -s /opt/maven/apache-maven-3.9.6/bin/mvn /usr/bin/mvn
23
+
24
+ CMD ["tail", "-f", "/dev/null"]
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "kcl",
3
+ "dockerFile": "./Dockerfile",
4
+ "forwardPorts": [3000, 5000],
5
+ "settings": {
6
+ "terminal.integrated.shell.linux": "/bin/bash"
7
+ },
8
+ }
@@ -15,7 +15,7 @@ on:
15
15
  workflow_dispatch:
16
16
 
17
17
  jobs:
18
- test:
18
+ test-and-build:
19
19
  permissions:
20
20
  actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
21
21
  contents: read # for actions/checkout to fetch code
@@ -87,91 +87,19 @@ jobs:
87
87
  name: kcl-lib-${{ matrix.classifier }}
88
88
  path: |
89
89
  java/target/classes/native
90
-
91
- build-on-centos:
92
- name: Build on CentOS 7
90
+
91
+ add-centos7-jni:
93
92
  runs-on: ubuntu-latest
94
93
  container:
95
- image: "centos:7"
96
-
97
- steps:
98
- - name: Checkout
99
- uses: actions/checkout@v3
100
-
101
- - name: Prepare build environment
102
- run: |
103
- yum makecache
104
- yum install -y wget
105
- yum install -y make
106
- yum install -y epel-release
107
- yum install -y llvm clang llvm-devel
108
- yum install gcc gcc-c++ glibc-static -y
109
- cat /etc/os-release
110
-
111
- - name: Install Python 3
112
- run: |
113
- yum install -y python3 python3-devel python3-pip
114
-
115
- - name: Install Rust
116
- run: |
117
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
118
- mv $HOME/.cargo/bin/* /usr/bin/
119
- rustc --version
120
- cargo --version
121
-
122
- - name: Install Java and Maven
123
- run: |
124
- yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
125
- wget https://repo.huaweicloud.com/apache/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
126
- tar -xzf apache-maven-*.tar.gz
127
- mkdir p /opt/maven
128
- mv apache-maven-* /opt/maven
129
- ln -s /opt/maven/apache-maven-3.9.6/bin/mvn /usr/bin/mvn
130
- mvn --version
131
-
132
- - name: Verify installed versions
133
- run: |
134
- gcc --version
135
- llvm-config --version
136
- python3 --version
137
- rustc --version
138
- mvn --version
139
- cat /etc/os-release
140
-
141
- - name: 'Test'
142
- shell: bash
143
- working-directory: java
144
- run: make test
145
-
146
- - name: 'Build and Deploy'
147
- shell: bash
148
- working-directory: java
149
- run: mvn clean package -DskipTests=true -Djni.classifier=linux-x86_64 -Dcargo-build.profile=release
150
-
151
- - name: 'Upload artifact'
152
- uses: actions/upload-artifact@v3
153
- with:
154
- name: kcl-lib-linux-x86_64
155
- path: java/target/classes/native
156
-
157
-
158
- deploy:
159
- runs-on: ubuntu-latest
94
+ image: "kcllang/kcl-java-builder-centos7:0.1.0"
95
+
160
96
  permissions:
161
97
  contents: read
162
98
  packages: write
163
- if: "startsWith(github.ref, 'refs/tags/')"
164
- needs: [ test, build-on-centos ]
99
+ needs: [ test-and-build ]
165
100
  steps:
166
- - uses: actions/checkout@v4
167
-
168
- - name: Set up JDK 8
169
- uses: actions/setup-java@v4
170
- with:
171
- distribution: 'temurin'
172
- java-version: '8'
173
- server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
174
- settings-path: ${{ github.workspace }} # location for the settings.xml file
101
+ - name: Checkout
102
+ uses: actions/checkout@v3
175
103
 
176
104
  - name: Download windows x86_64 lib
177
105
  uses: actions/download-artifact@v3
@@ -179,12 +107,6 @@ jobs:
179
107
  name: kcl-lib-windows-x86_64
180
108
  path: java/native
181
109
 
182
- - name: Download linux x86_64 lib
183
- uses: actions/download-artifact@v3
184
- with:
185
- name: kcl-lib-linux-x86_64
186
- path: java/native
187
-
188
110
  - name: Download linux aarch_64 lib
189
111
  uses: actions/download-artifact@v3
190
112
  with:
@@ -206,7 +128,7 @@ jobs:
206
128
  - name: Package Java artifact
207
129
  working-directory: java
208
130
  run: |
209
- mvn clean package -DskipTests=true
131
+ rustup default stable && mvn package -DskipTests=true
210
132
 
211
133
  - name: Upload artifact
212
134
  uses: actions/upload-artifact@v3
@@ -214,11 +136,52 @@ jobs:
214
136
  name: kcl-lib
215
137
  path: java/target/*.jar
216
138
 
139
+ deploy:
140
+ runs-on: ubuntu-latest
141
+
142
+ permissions:
143
+ contents: read
144
+ packages: write
145
+ if: "startsWith(github.ref, 'refs/tags/')"
146
+ needs: [ add-centos7-jni ]
147
+ steps:
148
+ - name: Checkout
149
+ uses: actions/checkout@v3
150
+
151
+ - name: Set up JDK 8
152
+ uses: actions/setup-java@v4
153
+ with:
154
+ distribution: 'temurin'
155
+ java-version: '8'
156
+ server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
157
+ settings-path: ${{ github.workspace }} # location for the settings.xml file
158
+
159
+ - name: Download Artifact
160
+ uses: actions/download-artifact@v3
161
+ with:
162
+ name: kcl-lib
163
+ path: java/target/
164
+
217
165
  - name: Deploy to Github Packages
166
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
167
+ working-directory: java
168
+ run: |
169
+ mvn package deploy \
170
+ -DskipTests=true \
171
+ -DskipCompile=true \
172
+ -Dcargo-build.profile=release \
173
+ -DserverId=github \
174
+ -s $GITHUB_WORKSPACE/settings.xml
175
+ env:
176
+ GITHUB_TOKEN: ${{ github.token }}
177
+
178
+ - name: Release to Github Packages
179
+ if: "startsWith(github.ref, 'refs/tags/')"
218
180
  working-directory: java
219
181
  run: |
220
- mvn clean package deploy \
182
+ mvn package deploy \
221
183
  -DskipTests=true \
184
+ -DskipCompile=true \
222
185
  -Dcargo-build.profile=release \
223
186
  -DserverId=github \
224
187
  -s $GITHUB_WORKSPACE/settings.xml
@@ -66,7 +66,6 @@ jobs:
66
66
 
67
67
  linux:
68
68
  runs-on: ubuntu-latest
69
- if: "startsWith(github.ref, 'refs/tags/')"
70
69
  strategy:
71
70
  matrix:
72
71
  settings:
@@ -129,7 +128,6 @@ jobs:
129
128
 
130
129
  windows:
131
130
  runs-on: windows-latest
132
- if: "startsWith(github.ref, 'refs/tags/')"
133
131
  strategy:
134
132
  matrix:
135
133
  settings:
@@ -172,7 +170,6 @@ jobs:
172
170
 
173
171
  macos:
174
172
  runs-on: macos-latest
175
- if: "startsWith(github.ref, 'refs/tags/')"
176
173
  strategy:
177
174
  matrix:
178
175
  settings:
@@ -262,6 +259,13 @@ jobs:
262
259
  run: ls -R ./npm
263
260
  shell: bash
264
261
 
262
+ - name: Publish Dry Run
263
+ if: "startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-')"
264
+ # Since this command will not exit with non-zero code when file missing,
265
+ # we need to check the output manually.
266
+ run: |
267
+ npm publish --access public --provenance --dry-run
268
+
265
269
  - name: Publish
266
270
  if: "startsWith(github.ref, 'refs/tags/')"
267
271
  run: |
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "kcl-lang"
3
- version = "0.8.7"
3
+ version = "0.9.0-alpha.1"
4
4
  edition = "2021"
5
5
  readme = "README.md"
6
6
  documentation = "kcl-lang.io"
@@ -11,4 +11,4 @@ license = "Apache-2.0"
11
11
 
12
12
  [dependencies]
13
13
  anyhow = "1"
14
- kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.8.7" }
14
+ kclvm-api = { git = "https://github.com/kcl-lang/kcl", version = "0.9.0-alpha.1" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kcl_lib
3
- Version: 0.8.7
3
+ Version: 0.9.0a1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -76,7 +76,7 @@ This way you'll be able to import the above dependency to use the SDK.
76
76
  <dependency>
77
77
  <groupId>com.kcl</groupId>
78
78
  <artifactId>kcl-lib</artifactId>
79
- <version>0.8.7</version>
79
+ <version>0.9.0-alpha.1</version>
80
80
  </dependency>
81
81
  ```
82
82
 
@@ -8,7 +8,7 @@ import (
8
8
  "runtime"
9
9
  )
10
10
 
11
- const KCLVM_VERSION = "v0.8.7"
11
+ const KCLVM_VERSION = "v0.9.0-alpha.1"
12
12
 
13
13
  func findPath(name string) string {
14
14
  if path, err := exec.LookPath(name); err == nil {
@@ -154,7 +154,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
154
154
  dependencies = [
155
155
  "proc-macro2",
156
156
  "quote",
157
- "syn 2.0.61",
157
+ "syn 2.0.63",
158
158
  ]
159
159
 
160
160
  [[package]]
@@ -577,7 +577,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
577
577
  dependencies = [
578
578
  "proc-macro2",
579
579
  "quote",
580
- "syn 2.0.61",
580
+ "syn 2.0.63",
581
581
  ]
582
582
 
583
583
  [[package]]
@@ -820,7 +820,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
820
820
  dependencies = [
821
821
  "proc-macro2",
822
822
  "quote",
823
- "syn 2.0.61",
823
+ "syn 2.0.63",
824
824
  ]
825
825
 
826
826
  [[package]]
@@ -1188,7 +1188,7 @@ dependencies = [
1188
1188
 
1189
1189
  [[package]]
1190
1190
  name = "kcl-lang"
1191
- version = "0.8.7"
1191
+ version = "0.9.0-alpha.1"
1192
1192
  dependencies = [
1193
1193
  "anyhow",
1194
1194
  "kclvm-api",
@@ -1196,8 +1196,8 @@ dependencies = [
1196
1196
 
1197
1197
  [[package]]
1198
1198
  name = "kcl-language-server"
1199
- version = "0.8.7"
1200
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1199
+ version = "0.9.0-alpha.1"
1200
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1201
1201
  dependencies = [
1202
1202
  "anyhow",
1203
1203
  "chrono",
@@ -1240,7 +1240,7 @@ dependencies = [
1240
1240
 
1241
1241
  [[package]]
1242
1242
  name = "kcl-python-lib"
1243
- version = "0.8.7"
1243
+ version = "0.9.0-alpha.1"
1244
1244
  dependencies = [
1245
1245
  "kcl-lang",
1246
1246
  "pyo3",
@@ -1248,8 +1248,8 @@ dependencies = [
1248
1248
 
1249
1249
  [[package]]
1250
1250
  name = "kclvm-api"
1251
- version = "0.8.7"
1252
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1251
+ version = "0.9.0-alpha.1"
1252
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1253
1253
  dependencies = [
1254
1254
  "anyhow",
1255
1255
  "futures",
@@ -1287,8 +1287,8 @@ dependencies = [
1287
1287
 
1288
1288
  [[package]]
1289
1289
  name = "kclvm-ast"
1290
- version = "0.8.7"
1291
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1290
+ version = "0.9.0-alpha.1"
1291
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1292
1292
  dependencies = [
1293
1293
  "compiler_base_span",
1294
1294
  "kclvm-error",
@@ -1302,8 +1302,8 @@ dependencies = [
1302
1302
 
1303
1303
  [[package]]
1304
1304
  name = "kclvm-ast-pretty"
1305
- version = "0.8.7"
1306
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1305
+ version = "0.9.0-alpha.1"
1306
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1307
1307
  dependencies = [
1308
1308
  "compiler_base_macros",
1309
1309
  "compiler_base_session",
@@ -1316,8 +1316,8 @@ dependencies = [
1316
1316
 
1317
1317
  [[package]]
1318
1318
  name = "kclvm-compiler"
1319
- version = "0.8.7"
1320
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1319
+ version = "0.9.0-alpha.1"
1320
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1321
1321
  dependencies = [
1322
1322
  "ahash",
1323
1323
  "bit-set",
@@ -1336,8 +1336,8 @@ dependencies = [
1336
1336
 
1337
1337
  [[package]]
1338
1338
  name = "kclvm-config"
1339
- version = "0.8.7"
1340
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1339
+ version = "0.9.0-alpha.1"
1340
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1341
1341
  dependencies = [
1342
1342
  "ahash",
1343
1343
  "anyhow",
@@ -1360,8 +1360,8 @@ dependencies = [
1360
1360
 
1361
1361
  [[package]]
1362
1362
  name = "kclvm-driver"
1363
- version = "0.8.7"
1364
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1363
+ version = "0.9.0-alpha.1"
1364
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1365
1365
  dependencies = [
1366
1366
  "anyhow",
1367
1367
  "glob",
@@ -1378,8 +1378,8 @@ dependencies = [
1378
1378
 
1379
1379
  [[package]]
1380
1380
  name = "kclvm-error"
1381
- version = "0.8.7"
1382
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1381
+ version = "0.9.0-alpha.1"
1382
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1383
1383
  dependencies = [
1384
1384
  "annotate-snippets",
1385
1385
  "anyhow",
@@ -1391,6 +1391,7 @@ dependencies = [
1391
1391
  "indexmap 1.9.3",
1392
1392
  "kclvm-runtime",
1393
1393
  "kclvm-span",
1394
+ "kclvm-utils",
1394
1395
  "serde_json",
1395
1396
  "termize",
1396
1397
  "tracing",
@@ -1398,8 +1399,8 @@ dependencies = [
1398
1399
 
1399
1400
  [[package]]
1400
1401
  name = "kclvm-evaluator"
1401
- version = "0.8.7"
1402
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1402
+ version = "0.9.0-alpha.1"
1403
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1403
1404
  dependencies = [
1404
1405
  "anyhow",
1405
1406
  "generational-arena",
@@ -1412,8 +1413,8 @@ dependencies = [
1412
1413
 
1413
1414
  [[package]]
1414
1415
  name = "kclvm-lexer"
1415
- version = "0.8.7"
1416
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1416
+ version = "0.9.0-alpha.1"
1417
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1417
1418
  dependencies = [
1418
1419
  "kclvm-error",
1419
1420
  "rustc_lexer",
@@ -1422,8 +1423,8 @@ dependencies = [
1422
1423
 
1423
1424
  [[package]]
1424
1425
  name = "kclvm-loader"
1425
- version = "0.8.7"
1426
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1426
+ version = "0.9.0-alpha.1"
1427
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1427
1428
  dependencies = [
1428
1429
  "anyhow",
1429
1430
  "indexmap 1.9.3",
@@ -1438,8 +1439,8 @@ dependencies = [
1438
1439
 
1439
1440
  [[package]]
1440
1441
  name = "kclvm-macros"
1441
- version = "0.8.7"
1442
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1442
+ version = "0.9.0-alpha.1"
1443
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1443
1444
  dependencies = [
1444
1445
  "proc-macro2",
1445
1446
  "quote",
@@ -1449,8 +1450,8 @@ dependencies = [
1449
1450
 
1450
1451
  [[package]]
1451
1452
  name = "kclvm-parser"
1452
- version = "0.8.7"
1453
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1453
+ version = "0.9.0-alpha.1"
1454
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1454
1455
  dependencies = [
1455
1456
  "anyhow",
1456
1457
  "bstr",
@@ -1480,8 +1481,8 @@ dependencies = [
1480
1481
 
1481
1482
  [[package]]
1482
1483
  name = "kclvm-query"
1483
- version = "0.8.7"
1484
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1484
+ version = "0.9.0-alpha.1"
1485
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1485
1486
  dependencies = [
1486
1487
  "anyhow",
1487
1488
  "compiler_base_macros",
@@ -1497,8 +1498,8 @@ dependencies = [
1497
1498
 
1498
1499
  [[package]]
1499
1500
  name = "kclvm-runner"
1500
- version = "0.8.7"
1501
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1501
+ version = "0.9.0-alpha.1"
1502
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1502
1503
  dependencies = [
1503
1504
  "anyhow",
1504
1505
  "cc",
@@ -1532,8 +1533,8 @@ dependencies = [
1532
1533
 
1533
1534
  [[package]]
1534
1535
  name = "kclvm-runtime"
1535
- version = "0.8.7"
1536
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1536
+ version = "0.9.0-alpha.1"
1537
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1537
1538
  dependencies = [
1538
1539
  "ahash",
1539
1540
  "base64",
@@ -1565,8 +1566,8 @@ dependencies = [
1565
1566
 
1566
1567
  [[package]]
1567
1568
  name = "kclvm-sema"
1568
- version = "0.8.7"
1569
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1569
+ version = "0.9.0-alpha.1"
1570
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1570
1571
  dependencies = [
1571
1572
  "ahash",
1572
1573
  "anyhow",
@@ -1598,8 +1599,8 @@ dependencies = [
1598
1599
 
1599
1600
  [[package]]
1600
1601
  name = "kclvm-span"
1601
- version = "0.8.7"
1602
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1602
+ version = "0.9.0-alpha.1"
1603
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1603
1604
  dependencies = [
1604
1605
  "compiler_base_span",
1605
1606
  "kclvm-macros",
@@ -1609,8 +1610,8 @@ dependencies = [
1609
1610
 
1610
1611
  [[package]]
1611
1612
  name = "kclvm-tools"
1612
- version = "0.8.7"
1613
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1613
+ version = "0.9.0-alpha.1"
1614
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1614
1615
  dependencies = [
1615
1616
  "anyhow",
1616
1617
  "compiler_base_session",
@@ -1640,8 +1641,8 @@ dependencies = [
1640
1641
 
1641
1642
  [[package]]
1642
1643
  name = "kclvm-utils"
1643
- version = "0.8.7"
1644
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1644
+ version = "0.9.0-alpha.1"
1645
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1645
1646
  dependencies = [
1646
1647
  "anyhow",
1647
1648
  "fslock",
@@ -1650,8 +1651,8 @@ dependencies = [
1650
1651
 
1651
1652
  [[package]]
1652
1653
  name = "kclvm-version"
1653
- version = "0.8.7"
1654
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1654
+ version = "0.9.0-alpha.1"
1655
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1655
1656
  dependencies = [
1656
1657
  "vergen",
1657
1658
  ]
@@ -1659,7 +1660,7 @@ dependencies = [
1659
1660
  [[package]]
1660
1661
  name = "kclvm_runtime_internal_macros"
1661
1662
  version = "0.5.0"
1662
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
1663
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
1663
1664
  dependencies = [
1664
1665
  "proc-macro2",
1665
1666
  "quote",
@@ -2104,7 +2105,7 @@ dependencies = [
2104
2105
  "pest_meta",
2105
2106
  "proc-macro2",
2106
2107
  "quote",
2107
- "syn 2.0.61",
2108
+ "syn 2.0.63",
2108
2109
  ]
2109
2110
 
2110
2111
  [[package]]
@@ -2240,11 +2241,11 @@ dependencies = [
2240
2241
  [[package]]
2241
2242
  name = "proc_macro_crate"
2242
2243
  version = "0.1.0"
2243
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
2244
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
2244
2245
  dependencies = [
2245
2246
  "proc-macro2",
2246
2247
  "quote",
2247
- "syn 2.0.61",
2248
+ "syn 2.0.63",
2248
2249
  ]
2249
2250
 
2250
2251
  [[package]]
@@ -2304,7 +2305,7 @@ dependencies = [
2304
2305
  [[package]]
2305
2306
  name = "prost-wkt"
2306
2307
  version = "0.4.1"
2307
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
2308
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
2308
2309
  dependencies = [
2309
2310
  "chrono",
2310
2311
  "inventory",
@@ -2318,7 +2319,7 @@ dependencies = [
2318
2319
  [[package]]
2319
2320
  name = "prost-wkt-build"
2320
2321
  version = "0.4.1"
2321
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
2322
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
2322
2323
  dependencies = [
2323
2324
  "heck 0.4.1",
2324
2325
  "prost",
@@ -2330,7 +2331,7 @@ dependencies = [
2330
2331
  [[package]]
2331
2332
  name = "prost-wkt-types"
2332
2333
  version = "0.4.1"
2333
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
2334
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
2334
2335
  dependencies = [
2335
2336
  "chrono",
2336
2337
  "prost",
@@ -2442,7 +2443,7 @@ dependencies = [
2442
2443
  "proc-macro2",
2443
2444
  "pyo3-macros-backend",
2444
2445
  "quote",
2445
- "syn 2.0.61",
2446
+ "syn 2.0.63",
2446
2447
  ]
2447
2448
 
2448
2449
  [[package]]
@@ -2455,7 +2456,7 @@ dependencies = [
2455
2456
  "proc-macro2",
2456
2457
  "pyo3-build-config",
2457
2458
  "quote",
2458
- "syn 2.0.61",
2459
+ "syn 2.0.63",
2459
2460
  ]
2460
2461
 
2461
2462
  [[package]]
@@ -2908,7 +2909,7 @@ checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865"
2908
2909
  dependencies = [
2909
2910
  "proc-macro2",
2910
2911
  "quote",
2911
- "syn 2.0.61",
2912
+ "syn 2.0.63",
2912
2913
  ]
2913
2914
 
2914
2915
  [[package]]
@@ -2930,13 +2931,13 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
2930
2931
  dependencies = [
2931
2932
  "proc-macro2",
2932
2933
  "quote",
2933
- "syn 2.0.61",
2934
+ "syn 2.0.63",
2934
2935
  ]
2935
2936
 
2936
2937
  [[package]]
2937
2938
  name = "serde_yaml"
2938
2939
  version = "0.9.34+deprecated"
2939
- source = "git+https://github.com/kcl-lang/kcl#57852c34d3114738782b94751938db4d661b27c8"
2940
+ source = "git+https://github.com/kcl-lang/kcl#2345a816c88e5c75f9854ab2087805fe41494607"
2940
2941
  dependencies = [
2941
2942
  "indexmap 2.2.6",
2942
2943
  "itoa",
@@ -3149,9 +3150,9 @@ dependencies = [
3149
3150
 
3150
3151
  [[package]]
3151
3152
  name = "syn"
3152
- version = "2.0.61"
3153
+ version = "2.0.63"
3153
3154
  source = "registry+https://github.com/rust-lang/crates.io-index"
3154
- checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9"
3155
+ checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704"
3155
3156
  dependencies = [
3156
3157
  "proc-macro2",
3157
3158
  "quote",
@@ -3224,7 +3225,7 @@ checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524"
3224
3225
  dependencies = [
3225
3226
  "proc-macro2",
3226
3227
  "quote",
3227
- "syn 2.0.61",
3228
+ "syn 2.0.63",
3228
3229
  ]
3229
3230
 
3230
3231
  [[package]]
@@ -3368,7 +3369,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
3368
3369
  dependencies = [
3369
3370
  "proc-macro2",
3370
3371
  "quote",
3371
- "syn 2.0.61",
3372
+ "syn 2.0.63",
3372
3373
  ]
3373
3374
 
3374
3375
  [[package]]
@@ -3437,7 +3438,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
3437
3438
  dependencies = [
3438
3439
  "proc-macro2",
3439
3440
  "quote",
3440
- "syn 2.0.61",
3441
+ "syn 2.0.63",
3441
3442
  ]
3442
3443
 
3443
3444
  [[package]]
@@ -3485,7 +3486,7 @@ checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1"
3485
3486
  dependencies = [
3486
3487
  "proc-macro2",
3487
3488
  "quote",
3488
- "syn 2.0.61",
3489
+ "syn 2.0.63",
3489
3490
  ]
3490
3491
 
3491
3492
  [[package]]
@@ -3528,9 +3529,9 @@ dependencies = [
3528
3529
 
3529
3530
  [[package]]
3530
3531
  name = "unic-langid"
3531
- version = "0.9.4"
3532
+ version = "0.9.5"
3532
3533
  source = "registry+https://github.com/rust-lang/crates.io-index"
3533
- checksum = "238722e6d794ed130f91f4ea33e01fcff4f188d92337a21297892521c72df516"
3534
+ checksum = "23dd9d1e72a73b25e07123a80776aae3e7b0ec461ef94f9151eed6ec88005a44"
3534
3535
  dependencies = [
3535
3536
  "unic-langid-impl",
3536
3537
  "unic-langid-macros",
@@ -3538,18 +3539,18 @@ dependencies = [
3538
3539
 
3539
3540
  [[package]]
3540
3541
  name = "unic-langid-impl"
3541
- version = "0.9.4"
3542
+ version = "0.9.5"
3542
3543
  source = "registry+https://github.com/rust-lang/crates.io-index"
3543
- checksum = "4bd55a2063fdea4ef1f8633243a7b0524cbeef1905ae04c31a1c9b9775c55bc6"
3544
+ checksum = "0a5422c1f65949306c99240b81de9f3f15929f5a8bfe05bb44b034cc8bf593e5"
3544
3545
  dependencies = [
3545
3546
  "tinystr",
3546
3547
  ]
3547
3548
 
3548
3549
  [[package]]
3549
3550
  name = "unic-langid-macros"
3550
- version = "0.9.4"
3551
+ version = "0.9.5"
3551
3552
  source = "registry+https://github.com/rust-lang/crates.io-index"
3552
- checksum = "5c854cefb82ff2816410ce606acbad1b3af065140907b29be9229040752b83ec"
3553
+ checksum = "0da1cd2c042d3c7569a1008806b02039e7a4a2bdf8f8e96bd3c792434a0e275e"
3553
3554
  dependencies = [
3554
3555
  "proc-macro-hack",
3555
3556
  "tinystr",
@@ -3559,13 +3560,13 @@ dependencies = [
3559
3560
 
3560
3561
  [[package]]
3561
3562
  name = "unic-langid-macros-impl"
3562
- version = "0.9.4"
3563
+ version = "0.9.5"
3563
3564
  source = "registry+https://github.com/rust-lang/crates.io-index"
3564
- checksum = "fea2a4c80deb4fb3ca51f66b5e2dd91e3642bbce52234bcf22e41668281208e4"
3565
+ checksum = "1ed7f4237ba393424195053097c1516bd4590dc82b84f2f97c5c69e12704555b"
3565
3566
  dependencies = [
3566
3567
  "proc-macro-hack",
3567
3568
  "quote",
3568
- "syn 2.0.61",
3569
+ "syn 2.0.63",
3569
3570
  "unic-langid-impl",
3570
3571
  ]
3571
3572
 
@@ -3748,7 +3749,7 @@ dependencies = [
3748
3749
  "once_cell",
3749
3750
  "proc-macro2",
3750
3751
  "quote",
3751
- "syn 2.0.61",
3752
+ "syn 2.0.63",
3752
3753
  "wasm-bindgen-shared",
3753
3754
  ]
3754
3755
 
@@ -3770,7 +3771,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
3770
3771
  dependencies = [
3771
3772
  "proc-macro2",
3772
3773
  "quote",
3773
- "syn 2.0.61",
3774
+ "syn 2.0.63",
3774
3775
  "wasm-bindgen-backend",
3775
3776
  "wasm-bindgen-shared",
3776
3777
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "kcl-python-lib"
3
- version = "0.8.7"
3
+ version = "0.9.0-alpha.1"
4
4
  edition = "2021"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -0,0 +1,41 @@
1
+ package lib
2
+
3
+ import (
4
+ "fmt"
5
+ "os"
6
+ "path/filepath"
7
+ )
8
+
9
+ func writeLib(libDir, libFullName string, content []byte, versionMatched bool) error {
10
+ libFullPath := filepath.Join(libDir, libFullName)
11
+ _, err := os.Stat(libFullPath)
12
+ if !os.IsNotExist(err) && versionMatched {
13
+ return err
14
+ }
15
+ if err := os.MkdirAll(libDir, 0777); err != nil {
16
+ return err
17
+ }
18
+ for pass := 0; ; pass++ {
19
+ tmpFullPath := fmt.Sprintf("%s~%d", libFullPath, pass)
20
+ tmpFile, err := os.OpenFile(tmpFullPath, os.O_CREATE|os.O_RDWR|os.O_EXCL, 0755)
21
+ if err != nil {
22
+ if os.IsExist(err) {
23
+ continue
24
+ }
25
+ return err
26
+ }
27
+ defer func() {
28
+ tmpFile.Close()
29
+ _ = os.Remove(tmpFullPath)
30
+ }()
31
+
32
+ if _, err = tmpFile.Write(content); err != nil {
33
+ return err
34
+ }
35
+ if err := os.Rename(tmpFullPath, libFullPath); err != nil {
36
+ return err
37
+ }
38
+ break
39
+ }
40
+ return nil
41
+ }
kcl_lib-0.8.7/util.go DELETED
@@ -1,29 +0,0 @@
1
- package lib
2
-
3
- import (
4
- "os"
5
- "path/filepath"
6
- )
7
-
8
- func writeLib(libDir, libFullName string, content []byte, versionMatched bool) error {
9
- libFullPath := filepath.Join(libDir, libFullName)
10
- _, err := os.Stat(libFullPath)
11
- if os.IsNotExist(err) || !versionMatched {
12
- err = os.MkdirAll(libDir, 0777)
13
- if err != nil {
14
- return err
15
- }
16
- libFile, err := os.Create(libFullPath)
17
- defer func() {
18
- libFile.Close()
19
- }()
20
- if err != nil {
21
- return err
22
- }
23
- _, err = libFile.Write(content)
24
- if err != nil {
25
- return err
26
- }
27
- }
28
- return err
29
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes