Skip to content

Commit 7f5b310

Browse files
committed
fix: fix CR comments
Signed-off-by: zongz <[email protected]>
1 parent b95dcee commit 7f5b310

File tree

4 files changed

+267
-36
lines changed

4 files changed

+267
-36
lines changed

blog/2024-05-29-newsletter/index.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
---
2+
slug: 2024-05-29-newsletter
3+
title: KCL Newsletter (2024.05.01 - 2024.05.29)
4+
authors:
5+
name: KCL Team
6+
title: KCL Team
7+
tags: [KCL, Newsletter]
8+
image: /img/biweekly-newsletter.png
9+
---
10+
11+
![](/img/biweekly-newsletter.png)
12+
13+
[KCL](https://github.com/kcl-lang/kcl) is an open-source configuration and policy language hosted by the Cloud Native Computing Foundation (CNCF) as a Sandbox Project. Built on a foundation of constraints and functional programming principles, KCL enhances the process of writing complex configurations, particularly in cloud-native environments. By leveraging advanced programming language techniques, KCL promotes improved modularity, scalability, and stability in configuration management. It simplifies logic writing, offers easy-to-use automation APIs, and seamlessly integrates with existing systems.
14+
15+
This section will update the KCL language community's latest news, including features, website updates, and the latest community news, helping everyone better understand the KCL community!
16+
17+
**_KCL Website: [https://kcl-lang.io](https://kcl-lang.io)_**
18+
19+
## Special Thanks
20+
21+
Special thanks to all community contributors over the past two weeks. The following list is in no particular order:
22+
23+
- Congratulations to @AkashKumar7902 for completing the LFX 1 task, successfully merging the mvp version of the kpm version management module into the main branch 🙌
24+
- Thanks to @shashank-iitbhu for his continued contributions to the IDE Quick Fix feature 🙌
25+
- Thanks to @Wck-iipi for his continued contributions to the IDE hover feature 🙌
26+
- Thanks to @warjiang for his contributions to the devcontainer 🙌
27+
- Thanks to @shruti2522 for her continued contributions to the IDE hover feature 🙌
28+
- Thanks to @XiaoK29 for his continued contributions to the KCL go SDK code optimization 🙌
29+
- Thanks to @d4v1d03 for his continued contributions to the KCL documentation 🙌
30+
- Thanks to @officialasishkumar for his contributions to the package management tool third-party dependency renaming feature 🙌
31+
- Thanks to @Vishalk91-4, @Daksh-10 for their contributions to the KCL tree sitter syntax and parser generator 🙌
32+
- Thanks to @SamirMarin for his contributions to the Crossplane KCL function 🙌
33+
- Thanks to @officialasishkumar, @d4v1d03, @karlhepler, @Hai Wu, @ron18219, @olinux, @Alexander Fuchs, @Emmanuel Alap, @excalq, @leon-andria, @taylormonacelli, @dennybaa, @zhuxw, @aleeriz, @steeling, and others for their valuable feedback and suggestions while using KCL recently 🙌
34+
35+
## Overview
36+
37+
Thanks to all contributors for their outstanding work over the past two weeks (2024.05.15 - 2024.05.29). Here is an overview of the key content:
38+
39+
**📦️ Modules Updates**
40+
41+
- New module `difflib` added to support configuration comparison.
42+
43+
Through the `diff` method provided by the `difflib`, the configuration difference is output.
44+
45+
```python
46+
import difflib
47+
import yaml
48+
49+
data1 = {
50+
"firstName": "John",
51+
"lastName": "Doe",
52+
"age": 30,
53+
"address": {
54+
"streetAddress": "1234 Main St",
55+
"city": "New York",
56+
"state": "NY",
57+
"postalCode": "10001"
58+
},
59+
"phoneNumbers": [
60+
{
61+
"type": "home",
62+
"number": "212-555-1234"
63+
},
64+
{
65+
"type": "work",
66+
"number": "646-555-5678"
67+
}
68+
]
69+
}
70+
data2 = {
71+
"firstName": "John",
72+
"lastName": "Doe",
73+
"age": 30,
74+
"address": {
75+
"streetAddress": "1234 Main St",
76+
"city": "New York",
77+
"state": "NY",
78+
"postalCode": None
79+
},
80+
"phoneNumbers": [
81+
{
82+
"type": "work",
83+
"number": "646-555-5678"
84+
}
85+
]
86+
}
87+
diff = difflib.diff(yaml.encode(data1), yaml.encode(data2))
88+
```
89+
90+
**🏄 Language Updates**
91+
92+
- KCL 0.9.0-beta.1 released.
93+
- Enhanced the check process for non-empty attributes in the schema, optimized the diagnostic information when the check statement is invalid due to empty attributes.
94+
- Fixed the issue of doc parse parsing string literals as doc.
95+
- Fixed the issue of the resolver node type missing during the compilation process.
96+
- Added syntax error types to support quick recovery of IDE syntax errors.
97+
- Fixed the memory leak issue in the KCL runtime.
98+
99+
**💻 IDE Updates**
100+
101+
- Added support for quick fix of some compilation errors in the IDE.
102+
- Added support for some syntax IDE hover highlights.
103+
104+
IDE hover highlights for some syntax.
105+
106+
![hover](/img/blog/2024-05-29-biweekly-newsletter/hover.png)
107+
108+
For string literals, added hover highlights.
109+
110+
![hoverstrlit](/img/blog/2024-05-29-biweekly-newsletter/hoverstrlit.png)
111+
112+
- Added vscode extension to the devcontainer configuration.
113+
- Added config expression hover tips corresponding to the schema fields in the IDE.
114+
- Added support for identifying compilation units through the kcl.mod file in the IDE.
115+
- Fixed the document hover format error in the IDE.
116+
- Fixed the compilation error caused by the LSP panic in the IDE.
117+
- Optimized the log content of LSP input.
118+
119+
**📬️ Toolchain Updates**
120+
121+
- KCL testing tool supports fast eval mode.
122+
- Added `kcl clean` to support cleaning module caches.
123+
- Fixed the unexpected error in the YAML Stream format import process of the KCL import tool.
124+
125+
- Package management tool updates.
126+
- - Added support for renaming dependencies to prevent name conflicts through the `mod add --rename` parameter and the `kcl.mod` file.
127+
- - Fixed the issue of missing dependencies in the `kcl.mod` file when adding a local file directory as a dependency.
128+
- - Added support for adding git third-party dependencies through branch names.
129+
- - Removed the invalid log output when updating dependencies.
130+
- - Added API support for writing `kcl.mod` and `kcl.mod.lock` files.
131+
- - Removed the process of requesting metadata when loading third-party dependencies.
132+
- - When packaging and uploading KCL, diagnostic information is output for the case of local dependencies in the KCL package.
133+
- - LFX term 1 task completed, the version management module mvp version merged into the main branch.
134+
- - Supported specifying files to be packaged and skipped through the `include` and `exclude` fields in the `kcl.mod` file.
135+
- - Removed the calculation checksum process of dependencies.
136+
137+
**⛵️ API Updates**
138+
139+
- Added `UpdateDependencies` API to support updating KCL third-party libraries.
140+
- Added API support for writing `kcl.mod` and `kcl.mod.lock` files.
141+
- OverrideFile API returns compilation error information.
142+
- OverrideFile API supports inserting configurations through operators ":" and "+=".
143+
- ListVariable API return values support parsing List and Dict structures.
144+
- Fixed the issue of configuration format error caused by the insertion of import statements in the OverrideFile API.
145+
- Refactored the API for obtaining schema types.
146+
- Fixed the issue of panic caused by the LSP handle_semantic_tokens_full and handle_document_symbol methods.
147+
148+
**🔥 SDK Updates**
149+
150+
- KCL SDK v0.9.0-beta.1 released, synchronously supporting API updates.
151+
- KCL go SDK supports importing KCL Schema through proto.
152+
153+
**📂️ Documentation Updates**
154+
155+
- Fixed typos in the development guide documentation and some environment configuration descriptions.
156+
- Added documentation for the `file.read_env` function.
157+
- The language document has been updated to include information about the "-" and "." symbols in schema property names.
158+
- Added some Q&A.
159+
160+
**📺️ Ecosystem Integration**
161+
162+
- Fixed the memory leak issue in the crossplane kcl function.
163+
- Added support for the KCL tree sitter schema, mixin, rule, and other syntax support and corresponding tests.
164+
165+
## Resources
166+
167+
❤️ See [here](https://github.com/kcl-lang/community) to join us!
168+
169+
For more resources, please refer to
170+
171+
- [KCL Website](https://kcl-lang.io/)
172+
- [KusionStack Website](https://kusionstack.io/)
173+
- [KCL v0.9.0 Milestone](https://github.com/kcl-lang/kcl/milestone/9)

i18n/zh-CN/docusaurus-plugin-content-blog/2024-05-29-newsletter/index.md

Lines changed: 94 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ image: /img/biweekly-newsletter.png
1616

1717
**_KCL 官网:[https://kcl-lang.io](https://kcl-lang.io)_**
1818

19+
## 特别鸣谢
20+
21+
感谢过去两周所有的社区参与者,以下排名不分先后
22+
23+
- 恭喜 @AkashKumar7902 完成 LFX 1 期任务,kpm 版本管理模块的 mvp 版本成功合并入 main 分支 🙌
24+
- 感谢 @shashank-iitbhu 在 IDE Quick Fix 功能上做的持续贡献 🙌
25+
- 感谢 @Wck-iipi 在 IDE 悬停功能上做的持续贡献 🙌
26+
- 感谢 @warjiang 为 devcontainer 作出的贡献 🙌
27+
- 感谢 @shruti2522 为 IDE 悬停效果的优化作出的持续贡献 🙌
28+
- 感谢 @XiaoK29 为 KCL go SDK 的代码优化作出的持续贡献 🙌
29+
- 感谢 @d4v1d03 为 KCL 文档作出的持续贡献 🙌
30+
- 感谢 @officialasishkumar 在包管理工具三方依赖重命名功能的贡献 🙌
31+
- 感谢 @Vishalk91-4, @Daksh-10 对 KCL tree sitter 语法和解析器生成器的贡献 🙌
32+
- 感谢 @SamirMarin 对 Crossplane KCL 函数的贡献 🙌
33+
- 感谢 @officialasishkumar, @d4v1d03, @karlhepler, @Hai Wu, @ron18219, @olinux, @Alexander Fuchs, @Emmanuel Alap, @excalq, @leon-andria, @taylormonacelli, @dennybaa, @zhuxw, @aleeriz, @steeling 等在近段时间使用 KCL 过程中提供的宝贵建议与反馈 🙌
34+
1935
## 内容概述
2036

2137
感谢所有贡献者过去一段时间 (2024.05.15 - 2024.05.29) 的杰出工作,以下是重点内容概述
@@ -24,11 +40,58 @@ image: /img/biweekly-newsletter.png
2440

2541
- 新增 difflib 三方库,支持比较配置差异。
2642

43+
通过 `difflib` 三方库提供的 `diff` 方法,输出配置差异。
44+
45+
```python
46+
import difflib
47+
import yaml
48+
49+
data1 = {
50+
"firstName": "John",
51+
"lastName": "Doe",
52+
"age": 30,
53+
"address": {
54+
"streetAddress": "1234 Main St",
55+
"city": "New York",
56+
"state": "NY",
57+
"postalCode": "10001"
58+
},
59+
"phoneNumbers": [
60+
{
61+
"type": "home",
62+
"number": "212-555-1234"
63+
},
64+
{
65+
"type": "work",
66+
"number": "646-555-5678"
67+
}
68+
]
69+
}
70+
data2 = {
71+
"firstName": "John",
72+
"lastName": "Doe",
73+
"age": 30,
74+
"address": {
75+
"streetAddress": "1234 Main St",
76+
"city": "New York",
77+
"state": "NY",
78+
"postalCode": None
79+
},
80+
"phoneNumbers": [
81+
{
82+
"type": "work",
83+
"number": "646-555-5678"
84+
}
85+
]
86+
}
87+
diff = difflib.diff(yaml.encode(data1), yaml.encode(data2))
88+
```
89+
2790
**🏄 语言更新**
2891

2992
- kcl 0.9.0-beta.1 新版本发布。
3093
- 强化了 schema 结构中属性非空的检查过程,优化了在空属性导致的 check 语句失效时的诊断信息。
31-
- 修复了 doc parse 过程,将字符串字面值解析成 doc 的问题。
94+
- 修复了 doc parse 将字符串字面值解析成 doc 的问题。
3295
- 修复了编译过程中 resolver 节点类型丢失的问题。
3396
- 新增语法错误类型以支持 IDE 语法错误的快速恢复。
3497
- 修复了 KCL 运行时内存泄漏的问题。
@@ -37,6 +100,15 @@ image: /img/biweekly-newsletter.png
37100

38101
- IDE 增加对于部分编译错误的快速恢复。
39102
- 新增了部分语法 IDE 悬停高亮。
103+
104+
IDE 支持部分语法悬停高亮。
105+
106+
![hover](/img/blog/2024-05-29-biweekly-newsletter/hover.png)
107+
108+
对于字符串字面值,新增悬停高亮
109+
110+
![hoverstrlit](/img/blog/2024-05-29-biweekly-newsletter/hoverstrlit.png)
111+
40112
- Devcontainer 配置新增 vscode 扩展。
41113
- IDE 新增 config 表达式悬停提示对应 schema 字段。
42114
- IDE 支持通过 kcl.mod 文件识别编译单元。
@@ -47,22 +119,27 @@ image: /img/biweekly-newsletter.png
47119
**📬️ 工具链更新**
48120

49121
- KCL 测试工具支持 fast eval 模式。
50-
- kcl clean 支持清理缓存。
51-
- 包管理 kcl mod 支持对三方库重命名。
52-
- 包管理工具修复了添加本地文件目录作为依赖时,kcl.mod 文件依赖丢失的问题。
53-
- 包管理工具,支持通过分支名称添加 git 三方库。
54-
- 包管理工具,移除了在更新依赖时输出的无效日志。
55-
- 包管理工具新增 API 支持写入 kcl.mod 和 kcl.mod.lock 文件。
56-
- 包管理工具移除加载三方库是请求 metadata 过程。
57-
- 包管理工具在打包和上传时,针对本地依赖情况输出对应提示信息。
58-
- 包管理工具 LFX 1 期题目版本管理模块 mvp 版本开发完成。
59-
- 包管理工具,支持 kcl.mod 文件中通过 include 和 exclude 字段指定打包过程。
60-
- 包管理工具,移除本地计算三方库 checksum 过程。
122+
- 新增 `kcl clean` 支持清理 module 缓存。
123+
- KCL Import 工具修复 YAML Stream 格式导入过程非预期的错误
124+
125+
- 包管理工具更新
126+
- - kcl 支持通过 mod add --rename 参数和 kcl.mod 文件中重命名依赖防止名称冲突。
127+
- - 修复了添加本地文件目录作为依赖时,kcl.mod 文件依赖丢失的问题。
128+
- - 支持通过分支名称添加 git 三方库。
129+
- - 移除了在更新依赖时输出的无效日志。
130+
- - 新增 API 支持写入 kcl.mod 和 kcl.mod.lock 文件。
131+
- - 移除了加载三方库过程中请求 metadata 过程。
132+
- - 在打包和上传 KCL 三方库时,针对 KCL 包中存在本地依赖的情况,输出诊断信息。
133+
- - LFX 1 期题目完成,版本管理模块 mvp 版本合并入 main 分支。
134+
- - 支持 kcl.mod 文件中通过 include 和 exclude 字段指定需要打包和跳过的文件。
135+
- - 移除本地计算三方库 checksum 过程。
61136

62137
**⛵️ API 更新**
63138

139+
- 新增 UpdateDependencies API 支持更新 KCL 三方库。
140+
- 新增 API 支持写入 kcl.mod 和 kcl.mod.lock 文件。
64141
- OverrideFile API 返回值中新增编译错误信息。
65-
- OverrideFile API 支持通过运算符 ":" 和 "+="。
142+
- OverrideFile API 支持通过运算符 ":" 和 "+=" 插入配置
66143
- ListVariable API 返回值支持解析 List 和 Dict 结构。
67144
- 修复了 OverrideFile API 在插入 import 语句时导致的配置格式错乱的问题。
68145
- 重构了获取 schema type 相关的 API。
@@ -71,38 +148,19 @@ image: /img/biweekly-newsletter.png
71148
**🔥 SDK 更新**
72149

73150
- KCL SDK v0.9.0-beta.1 版本发布, 同步支持 API 更新。
74-
- KCL go SDK 调整了 yaml stream 的输出格式。
75151
- KCL go SDK 支持通过 proto 导入 KCL Schema。
76152

77153
**📂 文档更新**
78154

79155
- 修复了开发向导文档中的错误拼写与一些环境配置描述。
80156
- 新增关于 file.read_env 库函数的文档说明。
81-
- 语言文档中补充了关于schema属性名称中“-”,“.”等符号的说明。
157+
- 语言文档中补充了关于 schema 属性名称中“-”,“.”等符号的说明。
82158
- 新增了一些 Q&A。
83159

84-
**🎵 项目工程**
85-
86-
- KCL 集成测试去掉 stderr 期望输出的生成脚本,替换为 stderr.golden 文件。
87-
- IDE 新增 native tool chain 层以支持 IDE 对工具链的集成。
88-
- KCL API 新增 call_with_plugin_agent 支持调用 KCL API。
89-
- KCL go SDK 中进行了一些代码的优化,去掉了一些冗余的逻辑,调整了设置配置文件的加载方式。
90-
- KCL Cli 新增并行测试用例,以提升在并发场景下项目的稳定性。
91-
92-
## 特别鸣谢
93-
94-
感谢过去两周所有的社区参与者,以下排名不分先后
95-
96-
- 恭喜 @AkashKumar7902 完成 LFX 1 期任务,kpm 版本管理模块的 mvp 版本成功合并入 main 分支 🙌
97-
- 感谢 @shashank-iitbhu 在 IDE Quick Fix 功能上做的持续贡献 🙌
98-
- 感谢 @Wck-iipi 在 IDE 悬停功能上做的持续贡献 🙌
99-
- 感谢 @warjiang 为 devcontainer 作出的贡献 🙌
100-
- 感谢 @shruti2522 为 IDE 悬停效果的优化作出的持续贡献 🙌
101-
- 感谢 @XiaoK29 为 KCL go SDK 的代码优化作出的持续贡献 🙌
102-
- 感谢 @d4v1d03 为 KCL 文档作出的持续贡献 🙌
103-
- 感谢 @officialasishkumar 在包管理工具三方依赖重命名功能的贡献 🙌
160+
**📺 生态集成**
104161

105-
- 感谢 @officialasishkumar, @d4v1d03, @karlhepler, @Hai Wu, @Alexander Fuchs, @ron18219, @olinux, @Alexander Fuchs 等在近段时间使用 KCL 过程中提供的宝贵建议与反馈 🙌
162+
- 修复了 crossplane kcl function 导致的 pod 内存泄漏问题。
163+
- KCL tree sitter 新增 schema, mixin, rule 等语法支持和对应测试。
106164

107165
## 其他资源
108166

Loading
Loading

0 commit comments

Comments
 (0)