Skip to content

Commit d9efc8e

Browse files
committed
docs: polish kcl v0.7.0 release blogs
Signed-off-by: peefy <xpf6677@163.com>
1 parent e0e808a commit d9efc8e

File tree

2 files changed

+96
-116
lines changed
  • blog/2023-11-30-kcl-0.7.0-release
  • i18n/zh-CN/docusaurus-plugin-content-blog/2023-11-30-kcl-0.7.0-release

2 files changed

+96
-116
lines changed

β€Žblog/2023-11-30-kcl-0.7.0-release/index.mdβ€Ž

Lines changed: 27 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
slug: 2023-09-15-kcl-0.7.0-release
2+
slug: 2023-11-30-kcl-0.7.0-release
33
title: KCL v0.7.0 Release Blog
44
authors:
55
name: KCL Team
@@ -39,7 +39,7 @@ The new KCL CLI will continue to use `kcl` as the command prefix, and currently
3939

4040
We have tried to add repair suggestions in some error messages. If you are frustrated by the KCL compilation failure, you may wish to listen to the compiler's suggestions.
4141

42-
```
42+
```python
4343
import sub as s1
4444

4545
The_first_kcl_program = s.The_first_kcl_program
@@ -57,11 +57,11 @@ KCL cannot find the third-party library used in the package? Try `kcl mod add`,
5757

5858
#### Removed indentation check in some code blocks
5959

60-
In some code blocks, whether the indentation is aligned has become less important.
60+
In some code blocks, whether the indentation is aligned has become less important.
6161

6262
If your code is written like this
6363

64-
```
64+
```python
6565
schema TestIndent:
6666
name: str
6767
msg: str
@@ -82,40 +82,32 @@ In the past, you may have encountered a lot of red errors, but now this is not a
8282

8383
In the new version of KCL, we have added type annotations for lambda expressions, and you can write lambda with type annotations in the new version of KCL.
8484

85-
```
86-
import sub as s
85+
```python
86+
schema Test:
87+
name: str
8788

88-
identity: (s.Test) -> s.Test = lambda res: s.Test {
89-
res {
90-
name = "world"
91-
}
89+
identity: (Test) -> bool = lambda res: Test -> bool {
90+
res.name == "hello"
9291
}
9392

94-
c = identity(s.Test{name="hello"})
93+
c = identity(Test { name = "hello" })
9594
```
9695

9796
### πŸ„ API Updates
9897

9998
- New KCL unit test API: _[https://github.com/kcl-lang/kcl/pull/904](https://github.com/kcl-lang/kcl/pull/904)_
100-
10199
- KCL schema parsing API enhancement version `GetFullSchemaType` supports obtaining KCL package related information with third-party libraries. _[https://github.com/kcl-lang/kcl/pull/906](https://github.com/kcl-lang/kcl/pull/906)_
102-
103100
- New KCL symbol renaming API: _[https://github.com/kcl-lang/kcl/pull/890](https://github.com/kcl-lang/kcl/pull/890)_
104101

105-
### 🐞 Error Fixes
102+
### 🐞 Other Updates and Bug Fixes
106103

104+
- KCL command-line tool supports compiling input file wildcards e.g., `kcl path/to/*.k`
107105
- Fix the type inference error of dictionary types https://github.com/kcl-lang/kcl/pull/900
108-
109106
- Fix the check of Schema parameters https://github.com/kcl-lang/kcl/pull/877/files
110-
111107
- Fix the problem that the compilation cache of KCL programs with third-party libraries is invalid https://github.com/kcl-lang/kcl/pull/841
112-
113108
- In the error message, complete the missing lambda type information https://github.com/kcl-lang/kcl/pull/771
114-
115109
- Fix the problem of singular and plural in diagnostic information https://github.com/kcl-lang/kcl/pull/769
116-
117110
- Fix the problem that the type check is invalid in the assignment statement with type annotation https://github.com/kcl-lang/kcl/pull/757
118-
119111
- Add a check to prohibit duplicate import statements https://github.com/kcl-lang/kcl/pull/727
120112

121113
## IDE & Toolchain Updates
@@ -150,23 +142,28 @@ And for the **model design**, we have also added a quick generation of docstring
150142

151143
![gen-docstring](/img/blog/2023-11-08-biweekly-newsletter/docstring-gen.gif)
152144

153-
#### KCL IDE other updates and error fixes
145+
#### Performance
154146

147+
- KCL has designed and restructured a new semantic model, as well as an API that supports nearest symbol search and symbol semantic information query.
148+
- The migration of IDE completion, jump, and hover functions to new semantic models significantly reduces the difficulty and code volume of IDE development.
149+
- The KCL compiler supports syntax incremental parsing and semantic incremental checking, which improves the performance of KCL compilation, construction, and IDE plugin usage in most scenarios by **5-10 times**.
150+
151+
#### KCL IDE other updates and bug fixes
152+
153+
- KCL IDE extension for IntelliJ 2023.2+
155154
- Fix the problem that the language service virtual file system related bug: the file dimension change will cause the language service to crash and must be restarted to recover, which has now been fixed.
156155
- Support import statement completion of external package dependencies introduced by package management tools
157156
- Fix the display position of the function parameter undefined type error
158157

159158
### Test Tool Updates
160159

161-
Are you worried that your KCL program is written incorrectly? Why not come and test it? This update provides a new KCL test tool.
160+
Are you worried that your KCL program is written incorrectly? Why not come and test it? This update provides a new KCL test tool.
162161

163162
The new KCL test tool supports writing unit tests using KCL lambda and executing tests using the tool.
164163

165164
You can write your test cases through lambda expressions in the file with the suffix `_test.k`.
166165

167-
```
168-
import manifests
169-
166+
```python
170167
import .app
171168

172169
# Convert the `App` model into Kubernetes Deployment and Service Manifests
@@ -195,7 +192,6 @@ If your test fails, `kcl test` will output error information to help you trouble
195192

196193
![test-failed](/img/blog/2023-11-30-kcl-0.7.0-release/test-failed.png)
197194

198-
199195
### KCL Package Management
200196

201197
The `update` command is added to the `kcl mod` command. The `update` command is used to automatically update local dependencies. `kcl mod update` will automatically download the missing third-party libraries for you. For details, please refer to: https://github.com/kcl-lang/kpm/pull/212
@@ -206,7 +202,7 @@ The KCL Import tool supports one-click generation of KCL configuration/models fr
206202

207203
If you have the following yaml file:
208204

209-
```
205+
```yaml
210206
apiVersion: apps/v1
211207
kind: Deployment
212208
metadata:
@@ -232,7 +228,7 @@ spec:
232228
233229
You can convert it to a KCL program through the command `kcl import test.yaml`.
234230

235-
```
231+
```python
236232
"""
237233
This file was generated by the KCL auto-gen tool. DO NOT EDIT.
238234
Editing this file might prove futile when you re-run the KCL auto-gen generate command.
@@ -280,7 +276,7 @@ More details: https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/adopt-f
280276

281277
## Community Integrations & Extensions Updates
282278

283-
### KCL Marketplace artifacthub.io
279+
### KCL Marketplace with ArtifactHub
284280

285281
Through the integration of artifacthub.io, we have built a KCL third-party library market, where you can share your KCL programs with us. You can also choose freely and find the KCL third-party library that suits you!
286282

@@ -302,7 +298,7 @@ Contributing to KCL Marketplace: https://kcl-lang.io/docs/user_docs/guides/packa
302298

303299
## Other Updates
304300

305-
The Full Update and Error Fix List of KCL v0.7.0 can be found at: https://github.com/kcl-lang/kcl/compare/v0.6.0...v0.7.0
301+
The full update and bugfix List of KCL v0.7.0 can be found at: https://github.com/kcl-lang/kcl/compare/v0.6.0...v0.7.0
306302

307303
## Document Updates
308304

@@ -316,29 +312,9 @@ The versioning semantic option is added to the [KCL website](https://kcl-lang.io
316312

317313
More details - https://kcl-lang.io/blog/2023-09-19-kcl-joining-cncf-sandbox/
318314

319-
### Thanks to the community for their contributions
320-
321-
- Thanks to @jakezhu9 for his contribution to the KCL Import tool Terraform Schema to KCL Schema conversion πŸ™Œ _[https://github.com/kcl-lang/kcl-go/pull/152](https://github.com/kcl-lang/kcl-go/pull/152)_
322-
323-
- Thanks to @jakezhu9 for his contribution to the KCL Import tool Terraform Schema to KCL Schema conversion _[https://github.com/kcl-lang/kpm/pull/194](https://github.com/kcl-lang/kpm/pull/194)_
324-
325-
- Thanks to @jakezhu9 for his contribution to the KCL Import tool Terraform Schema to KCL Schema conversion πŸ™Œ _[https://github.com/kcl-lang/tree-sitter-kcl/pull/1](https://github.com/kcl-lang/tree-sitter-kcl/pull/1)_
326-
327-
- Thanks to @jakezhu9 for his contribution to the KCL Import tool Terraform Schema to KCL Schema conversion πŸ™Œ _[https://github.com/kcl-lang/kcl/pull/794](https://github.com/kcl-lang/kcl/pull/794)_
328-
329-
- Thanks to @opsnull for his correction and contribution to the code examples in the KCL official website documentation πŸ™Œ _[https://github.com/kcl-lang/kcl-lang.io/pull/182](https://github.com/kcl-lang/kcl-lang.io/pull/182)_
330-
331-
- Thanks to @prahaladramji for his correction and optimization of the KCL IntelliJ plugin formatting function πŸ™Œ _[https://github.com/kcl-lang/intellij-kcl/pull/15](https://github.com/kcl-lang/intellij-kcl/pull/15)_
332-
333-
- Thanks to @jakezhu9 for his improvement of the KCL syntax parsing unit test, and unified some test cases to use the snaptest framework πŸ™Œ _[https://github.com/kcl-lang/kcl-go/pull/170](https://github.com/kcl-lang/kcl-go/pull/170)_
334-
335-
- Thanks to @liangyuanpeng for his contribution of the karmada model package to the KCL model πŸ™Œ _[https://github.com/kcl-lang/artifacthub/pull/48/files](https://github.com/kcl-lang/artifacthub/pull/48/files)_
336-
337-
- Thanks to @mrgleeco, @ghpu, @steeling, @prahaladramji, @zwpaper and others for their valuable feedback and discussion in the use of KCL and toolchain πŸ™Œ
338-
339315
## Next Steps
340316

341-
- We expect to release KCL v0.8.0 in February 2024. For more details, please refer to KCL 2024 Roadmap and KCL v0.8.0 Milestone. If you have more ideas and needs, please feel free to raise Issues or Discussions in the KCL Github repository, and welcome to join our community for discussion πŸ™Œ πŸ™Œ πŸ™Œ
317+
We expect to release KCL v0.8.0 in February 2024. For more details, please refer to KCL 2024 Roadmap and KCL v0.8.0 Milestone. If you have more ideas and needs, please feel free to raise Issues or Discussions in the KCL Github repository, and welcome to join our community for discussion πŸ™Œ πŸ™Œ πŸ™Œ
342318

343319
- KCL 2024 Roadmap: https://github.com/kcl-lang/kcl/issues/882
344320
- KCL v0.8.0 Milestone: https://github.com/kcl-lang/kcl/milestone/8
@@ -360,4 +336,3 @@ Thank all KCL users for their valuable feedback and suggestions during this vers
360336
- [Kusion Repo](https://github.com/KusionStack/kusion)
361337

362338
See the [community](https://github.com/kcl-lang/community) for ways to join us. πŸ‘πŸ‘πŸ‘
363-

0 commit comments

Comments
Β (0)