|
| 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 | + |
| 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 | +Add `difflib` as a dependency by `kcl mod add difflib`. |
| 44 | + |
| 45 | +Through the `diff` method provided by the `difflib`, the configuration difference is output. |
| 46 | + |
| 47 | +```python |
| 48 | +import difflib |
| 49 | +import yaml |
| 50 | + |
| 51 | +data1 = { |
| 52 | + "Name": "John", |
| 53 | + "age": 30, |
| 54 | +} |
| 55 | +data2 = { |
| 56 | + "Name": "John", |
| 57 | + "age": 20, |
| 58 | +} |
| 59 | +diff = difflib.diff(yaml.encode(data1), yaml.encode(data2)) |
| 60 | +``` |
| 61 | + |
| 62 | +The expected output is the diff as below: |
| 63 | + |
| 64 | +``` |
| 65 | +data1: |
| 66 | + Name: John |
| 67 | + age: 30 |
| 68 | +data2: |
| 69 | + Name: John |
| 70 | + age: 20 |
| 71 | +diff: |2 |
| 72 | + Name: John |
| 73 | + + age: 20 |
| 74 | + - age: 30 |
| 75 | +``` |
| 76 | + |
| 77 | +**🏄 Language Updates** |
| 78 | + |
| 79 | +- KCL 0.9.0-beta.1 released. |
| 80 | +- 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. |
| 81 | +- Fixed the issue of doc parse parsing string literals as doc. |
| 82 | +- Fixed the issue of the resolver node type missing during the compilation process. |
| 83 | +- Added syntax error types to support quick recovery of IDE syntax errors. |
| 84 | +- Fixed the memory leak issue in the KCL runtime. |
| 85 | + |
| 86 | +**💻 IDE Updates** |
| 87 | + |
| 88 | +- Added support for quick fix of some compilation errors in the IDE. |
| 89 | +- Added support for some syntax IDE hover highlights. |
| 90 | + |
| 91 | +IDE hover highlights for some syntax. |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +For string literals, added hover highlights. |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | +- Added vscode extension to the devcontainer configuration. |
| 100 | +- Added config expression hover tips corresponding to the schema fields in the IDE. |
| 101 | +- Added support for identifying compilation units through the kcl.mod file in the IDE. |
| 102 | +- Fixed the document hover format error in the IDE. |
| 103 | +- Fixed the compilation error caused by the LSP panic in the IDE. |
| 104 | +- Optimized the log content of LSP input. |
| 105 | + |
| 106 | +**📬️ Toolchain Updates** |
| 107 | + |
| 108 | +- KCL testing tool supports fast eval mode. |
| 109 | +- Added `kcl clean` to support cleaning module caches. |
| 110 | +- Fixed the unexpected error in the YAML Stream format import process of the KCL import tool. |
| 111 | + |
| 112 | +- Package management tool updates. |
| 113 | +- Added support for renaming dependencies to prevent name conflicts through the `mod add --rename` parameter and the `kcl.mod` file. |
| 114 | +- Fixed the issue of missing dependencies in the `kcl.mod` file when adding a local file directory as a dependency. |
| 115 | +- Added support for adding git third-party dependencies through branch names. |
| 116 | +- Removed the invalid log output when updating dependencies. |
| 117 | +- Added API support for writing `kcl.mod` and `kcl.mod.lock` files. |
| 118 | +- Removed the process of requesting metadata when loading third-party dependencies. |
| 119 | +- When packaging and uploading KCL, diagnostic information is output for the case of local dependencies in the KCL package. |
| 120 | +- LFX term 1 task completed, the version management module mvp version merged into the main branch. |
| 121 | +- Supported specifying files to be packaged and skipped through the `include` and `exclude` fields in the `kcl.mod` file. |
| 122 | +- Removed the calculation checksum process of dependencies. |
| 123 | + |
| 124 | +**⛵️ API Updates** |
| 125 | + |
| 126 | +- Added `UpdateDependencies` API to support updating KCL third-party libraries. |
| 127 | +- Added API support for writing `kcl.mod` and `kcl.mod.lock` files. |
| 128 | +- OverrideFile API returns compilation error information. |
| 129 | +- OverrideFile API supports inserting configurations through operators ":" and "+=". |
| 130 | +- ListVariable API return values support parsing List and Dict structures. |
| 131 | +- Fixed the issue of configuration format error caused by the insertion of import statements in the OverrideFile API. |
| 132 | +- Refactored the API for obtaining schema types. |
| 133 | +- Fixed the issue of panic caused by the LSP handle_semantic_tokens_full and handle_document_symbol methods. |
| 134 | + |
| 135 | +**🔥 SDK Updates** |
| 136 | + |
| 137 | +- KCL SDK v0.9.0-beta.1 released, synchronously supporting API updates. |
| 138 | +- KCL go SDK supports importing KCL Schema through proto. |
| 139 | + |
| 140 | +**📂️ Documentation Updates** |
| 141 | + |
| 142 | +- Fixed typos in the development guide documentation and some environment configuration descriptions. |
| 143 | +- Added documentation for the `file.read_env` function. |
| 144 | +- The language document has been updated to include information about the "-" and "." symbols in schema property names. |
| 145 | +- Added some Q&A. |
| 146 | + |
| 147 | +**📺️ Ecosystem Integration** |
| 148 | + |
| 149 | +- Fixed the memory leak issue in the crossplane kcl function. |
| 150 | +- Added support for the KCL tree sitter schema, mixin, rule, and other syntax support and corresponding tests. |
| 151 | + |
| 152 | +## Resources |
| 153 | + |
| 154 | +❤️ See [here](https://github.com/kcl-lang/community) to join us! |
| 155 | + |
| 156 | +For more resources, please refer to |
| 157 | + |
| 158 | +- [KCL Website](https://kcl-lang.io/) |
| 159 | +- [KusionStack Website](https://kusionstack.io/) |
| 160 | +- [KCL v0.9.0 Milestone](https://github.com/kcl-lang/kcl/milestone/9) |
0 commit comments