|
| 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 | +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 | + |
| 107 | + |
| 108 | +For string literals, added hover highlights. |
| 109 | + |
| 110 | + |
| 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) |
0 commit comments