diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml
new file mode 100644
index 000000000..57336cfef
--- /dev/null
+++ b/.github/workflows/backport.yaml
@@ -0,0 +1,17 @@
+name: Backport merged pull request
+on:
+ pull_request_target:
+ types: [closed]
+permissions:
+ contents: write # so it can comment
+ pull-requests: write # so it can create pull requests
+jobs:
+ backport:
+ name: Backport pull request
+ runs-on: ubuntu-latest
+ # Don't run on closed unmerged pull requests
+ if: github.event.pull_request.merged
+ steps:
+ - uses: actions/checkout@v3
+ - name: Create backport pull requests
+ uses: korthout/backport-action@v1
diff --git a/.github/workflows/build-test-linux-arm64.yml b/.github/workflows/build-test-linux-arm64.yml
new file mode 100644
index 000000000..7f74d3fd6
--- /dev/null
+++ b/.github/workflows/build-test-linux-arm64.yml
@@ -0,0 +1,62 @@
+name: Build and Test on Linux ARCH64
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ build-and-test-arm64:
+ name: Build and Test on Linux ARM64
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v3
+ with:
+ submodules: "true"
+
+ - name: Set up Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.21
+
+ - name: Install prerequisites
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y git wget curl make python3 python3-pip clang-12 lld-12
+ sudo ln -sf /usr/bin/clang-12 /usr/bin/clang
+
+ - name: Install rust nightly toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: 1.76
+ override: true
+ components: clippy, rustfmt
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+ with:
+ platforms: linux/amd64,linux/arm64
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+
+ - name: Pull custom ARM64 Docker image
+ run: |
+ docker pull --platform linux/arm64 kcllang/kcl-builder-arm64
+
+ - name: Run custom ARM64 Docker image
+ run: |
+ docker run --rm --platform linux/arm64 \
+ -v ${{ github.workspace }}:/workspace -w /workspace \
+ kcllang/kcl-builder-arm64 \
+ make && make release
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: kcl-linux-arm64
+ path: _build/dist/ubuntu/kclvm
diff --git a/.github/workflows/build-test-macos-arm64.yml b/.github/workflows/build-test-macos-arm64.yml
new file mode 100644
index 000000000..35e16aa2c
--- /dev/null
+++ b/.github/workflows/build-test-macos-arm64.yml
@@ -0,0 +1,46 @@
+name: Build and Test on MacOS ARCH64
+
+on: ["push", "pull_request"]
+jobs:
+ build-and-test:
+ # Ref: https://github.com/actions/runner-images/tree/main/images/macos
+ strategy:
+ matrix:
+ os: [macos-13-xlarge]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Git checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: "true"
+
+ - name: Set up Go 1.21
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.21
+
+ - run: clang --version
+ - run: cargo --version
+ - run: rustc --print sysroot
+
+ - name: Delete rust cargo
+ run: rm -rf /root/.cargo/bin
+ shell: bash
+ - name: Install LLVM 12
+ run: brew install llvm@12
+ shell: bash
+ - name: Install rust nightly toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: 1.76
+ override: true
+ components: clippy, rustfmt
+ - name: Grammar test
+ working-directory: ./kclvm
+ run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/opt/homebrew/opt/llvm@12/bin/ && make && make test-grammar
+ shell: bash
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: kcl-darwin-arm64
+ path: _build/dist/Darwin/kclvm
diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml
index 9f0505b5e..dd691550b 100644
--- a/.github/workflows/cla.yml
+++ b/.github/workflows/cla.yml
@@ -14,7 +14,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
- PERSONAL_ACCESS_TOKEN : ${{ secrets.KCL_LANG_BOT_TOKEN }}
+ PERSONAL_ACCESS_TOKEN : ${{ secrets.DEPLOY_ACCESS_TOKEN }}
with:
path-to-document: 'https://github.com/kcl-lang/.github/blob/main/CLA.md' # e.g. a CLA or a DCO document
diff --git a/.github/workflows/daily-release.yaml b/.github/workflows/daily-release.yaml
new file mode 100644
index 000000000..1320471bc
--- /dev/null
+++ b/.github/workflows/daily-release.yaml
@@ -0,0 +1,134 @@
+name: Daily Release CI
+
+on:
+ schedule:
+ - cron: '0 0 * * *'
+
+permissions:
+ contents: write
+
+jobs:
+ macos-release:
+ name: Build and release on macos
+ runs-on: macos-11
+ steps:
+ - name: Git checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: "true"
+
+ - run: clang --version
+ - run: cargo --version
+ - run: rustc --print sysroot
+
+ - name: Delete rust cargo
+ run: rm -rf /root/.cargo/bin
+ shell: bash
+ - name: Install LLVM 12
+ run: brew install llvm@12
+ shell: bash
+ - name: Install rust nightly toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: 1.76
+ override: true
+ components: clippy, rustfmt
+
+ - name: Build KCL
+ run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make build
+ shell: bash
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: kcl-darwin-amd64-nightly
+ path: _build/dist/Darwin/kclvm
+
+ linux-release:
+ name: Build and release on linux
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v3
+ with:
+ submodules: "true"
+
+ # Prerequisite
+
+ - name: Install LLVM
+ shell: bash
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y git wget curl make
+ sudo apt-get install -y clang-12 lld-12
+ sudo ln -sf /usr/bin/clang-12 /usr/bin/clang
+ - name: Install Rust Toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: 1.76
+ override: true
+ components: clippy, rustfmt
+
+ - name: Build KCL
+ run: make build
+ shell: bash
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: kcl-linux-amd64-nightly
+ path: _build/dist/ubuntu/kclvm
+
+ - name: Copy Dockerfile to the current work directory
+ run: cp scripts/docker/kcl/Dockerfile .
+ shell: bash
+ - name: Login to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ - name: Extract metadata (tags, labels) for Docker
+ id: meta
+ uses: docker/metadata-action@v4
+ with:
+ images: kcllang/kclvm
+ - name: Build and push Docker image
+ uses: docker/build-push-action@v3
+ with:
+ context: .
+ push: ${{ github.event_name != 'pull_request' }}
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+
+ windows-release:
+ name: Build and release on windows
+ runs-on: windows-latest
+ env:
+ LLVM_SYS_120_PREFIX: "C:/LLVM"
+ KCLVM_CLANG: "C:/LLVM/bin/clang.exe"
+ steps:
+ - name: Git checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: "true"
+
+ - uses: ilammy/msvc-dev-cmd@v1
+
+ - run: clang --version
+ - run: cargo --version
+
+ # Install LLVM-12
+ - run: Invoke-WebRequest -Uri https://github.com/kcl-lang/llvm-package-windows/releases/download/v12.0.1/LLVM-12.0.1-win64.7z -OutFile C:/LLVM-12.0.1-win64.7z
+ - run: Get-FileHash -Algorithm MD5 C:/LLVM-12.0.1-win64.7z # md5: 3fcf77f82c6c3ee650711439b20aebe5
+ - run: 7z x -y C:/LLVM-12.0.1-win64.7z -o"C:/LLVM"
+ - run: Remove-Item C:/LLVM-12.0.1-win64.7z
+
+ - run: echo "C:/LLVM/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+
+ - run: .\scripts\build-windows\build.ps1
+
+ - run: echo ";$(pwd)\scripts\build-windows\_output\kclvm-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+ working-directory: .
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: kcl-windows-nightly
+ path: scripts/build-windows/_output/kclvm-windows
diff --git a/.github/workflows/macos_test.yaml b/.github/workflows/macos_test.yaml
index b7aea8238..4f887b6f3 100644
--- a/.github/workflows/macos_test.yaml
+++ b/.github/workflows/macos_test.yaml
@@ -13,13 +13,18 @@ jobs:
with:
submodules: "true"
- - name: Set up Go 1.18
+ - name: Set up python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.9'
+
+ - name: Set up Go
uses: actions/setup-go@v2
with:
- go-version: 1.19
+ go-version: 1.21
- - name: Install kpm
- run: go install kcl-lang.io/kpm@latest
+ - name: Install KCL CLI
+ run: go install kcl-lang.io/cli/cmd/kcl@latest
- run: clang --version
- run: cargo --version
@@ -34,7 +39,7 @@ jobs:
- name: Install rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
- toolchain: 1.67
+ toolchain: 1.76
override: true
components: clippy, rustfmt
- name: Code format check
@@ -43,21 +48,24 @@ jobs:
shell: bash
- name: Grammar test
working-directory: ./kclvm
- run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make test-grammar
+ run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make && make test-grammar
shell: bash
- name: Runtime test
working-directory: ./kclvm
- run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make test-runtime
+ run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make && make test-runtime
shell: bash
+
- name: Unit test
working-directory: ./kclvm
- run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make codecov-lcov
- shell: bash
- - name: Konfig test
- working-directory: ./kclvm
- run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make test-konfig
+ run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make && make codecov-lcov
shell: bash
+ - name: Coveralls upload
+ uses: coverallsapp/github-action@master
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ path-to-lcov: ./kclvm/.kclvm_cov/lcov.info
+
- uses: actions/upload-artifact@v3
with:
name: kcl-darwin-amd64
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
deleted file mode 100644
index fa7bbdbf6..000000000
--- a/.github/workflows/release.yaml
+++ /dev/null
@@ -1,62 +0,0 @@
-name: release
-on:
- push:
- branches:
- - "main"
- tags:
- - "v*"
-permissions:
- contents: write
-jobs:
- test:
- name: Build and release
- runs-on: ubuntu-latest
- steps:
- - name: Check out code
- uses: actions/checkout@v3
- with:
- submodules: "true"
-
- # Prerequisite
-
- - name: Install Python3 and LLVM
- shell: bash
- run: |
- sudo apt-get update
- sudo apt-get install -y git wget curl make
- sudo apt-get install python3 python3-pip -y
- sudo apt-get install -y clang-12 lld-12
- sudo ln -sf /usr/bin/clang-12 /usr/bin/clang
- - name: Install Rust Toolchain
- uses: actions-rs/toolchain@v1
- with:
- toolchain: 1.67
- override: true
- components: clippy, rustfmt
-
- # KCL build
-
- - name: Build KCL
- run: export PATH=$PATH:$PWD/_build/dist/ubuntu/kclvm/bin && make build
- shell: bash
-
- - name: Copy Dockerfile to the current work directory
- run: cp scripts/docker/kcl/Dockerfile .
- shell: bash
- - name: Login to Docker Hub
- uses: docker/login-action@v2
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
- - name: Extract metadata (tags, labels) for Docker
- id: meta
- uses: docker/metadata-action@v4
- with:
- images: kcllang/kcl
- - name: Build and push Docker image
- uses: docker/build-push-action@v3
- with:
- context: .
- push: ${{ github.event_name != 'pull_request' }}
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
diff --git a/.github/workflows/test_compiler_base.yaml b/.github/workflows/test_compiler_base.yaml
index 1649ee595..94e2b0a7f 100644
--- a/.github/workflows/test_compiler_base.yaml
+++ b/.github/workflows/test_compiler_base.yaml
@@ -1,5 +1,12 @@
name: build-and-test-compiler-base
-on: ["push", "pull_request"]
+on:
+ push:
+ paths:
+ - 'compiler_base/**'
+ pull_request:
+ paths:
+ - 'compiler_base/**'
+
jobs:
check-fmt:
name: Test
@@ -15,7 +22,7 @@ jobs:
- name: Install rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
- toolchain: 1.67
+ toolchain: 1.76
override: true
components: clippy, rustfmt
- name: Rust code format check
@@ -36,7 +43,7 @@ jobs:
- name: Install rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
- toolchain: 1.67
+ toolchain: 1.76
override: true
components: clippy, rustfmt
- name: Compiler_base rust unit test
diff --git a/.github/workflows/ubuntu_test.yaml b/.github/workflows/ubuntu_test.yaml
index aadc775f5..4fbb4678d 100644
--- a/.github/workflows/ubuntu_test.yaml
+++ b/.github/workflows/ubuntu_test.yaml
@@ -5,24 +5,30 @@ jobs:
# Ref: https://github.com/actions/runner-images/tree/main/images/linux
name: Test
runs-on: ubuntu-latest
- container:
- image: kcllang/kcl-builder
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: "true"
- - name: Set up Go 1.18
+ - name: Set up Go
uses: actions/setup-go@v2
with:
- go-version: 1.19
- - name: Delete rust cargo
- run: rm -rf /root/.cargo/bin
+ go-version: 1.21
+
+ # Prerequisite
+
+ - name: Install Python3 and LLVM
shell: bash
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y git wget curl make
+ sudo apt-get install python3 python3-pip -y
+ sudo apt-get install -y clang-12 lld-12
+ sudo ln -sf /usr/bin/clang-12 /usr/bin/clang
- name: Install rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
- toolchain: 1.67
+ toolchain: 1.76
override: true
components: clippy, rustfmt
- name: Code format check
@@ -35,28 +41,19 @@ jobs:
shell: bash
- name: Grammar test
working-directory: ./kclvm
- run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make install-rustc-wasm && make && make test-grammar
+ run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make && make test-grammar
shell: bash
- name: Runtime test
working-directory: ./kclvm
- run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make install-rustc-wasm && make && make test-runtime
+ run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make && make test-runtime
shell: bash
- - name: Install kpm
- run: go install kcl-lang.io/kpm@latest
+ - name: Install KCL CLI
+ run: go install kcl-lang.io/cli/cmd/kcl@latest
- name: Unit test
working-directory: ./kclvm
- run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make install-rustc-wasm && make && make codecov-lcov
+ run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make && make test
shell: bash
- - name: Konfig test
- working-directory: ./kclvm
- run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make install-rustc-wasm && make && make test-konfig
- shell: bash
- - name: Coveralls upload
- uses: coverallsapp/github-action@master
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- path-to-lcov: ./kclvm/.kclvm/lcov.info
- uses: actions/upload-artifact@v3
with:
diff --git a/.github/workflows/windows_test.yaml b/.github/workflows/windows_test.yaml
index 81d36c920..2ae7dd3fe 100644
--- a/.github/workflows/windows_test.yaml
+++ b/.github/workflows/windows_test.yaml
@@ -13,13 +13,13 @@ jobs:
with:
submodules: "true"
- - name: Set up Go 1.18
+ - name: Set up Go
uses: actions/setup-go@v2
with:
- go-version: 1.19
+ go-version: 1.21
- - name: Install kpm
- run: go install kcl-lang.io/kpm@latest
+ - name: Install KCL
+ run: go install kcl-lang.io/cli/cmd/kcl@latest
- uses: ilammy/msvc-dev-cmd@v1
@@ -34,10 +34,10 @@ jobs:
- run: echo "C:/LLVM/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- # Build kclvm-cli
- - run: .\scripts\build-windows\build.bat
+ # Build kclvm CLI
+ - run: .\scripts\build-windows\build.ps1
- # Set kclvm-cli path
+ # Set kclvm CLI into PATH
- run: echo ";$(pwd)\scripts\build-windows\_output\kclvm-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
working-directory: .
@@ -45,10 +45,6 @@ jobs:
- run: cargo test -p kclvm-*
working-directory: ./kclvm
- # Rust runtime test
- - run: python3 -m pip install --upgrade pip && python3 -m pip install pytest && kclvm -m pytest -vv
- working-directory: ./kclvm/tests/test_units
-
- uses: actions/upload-artifact@v3
with:
name: kcl-windows
diff --git a/.gitignore b/.gitignore
index 29d5ee571..0d57d4d98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,6 +77,7 @@ lark_parser.pickle
# KCLVM cache and temp output
.kclvm
+.kclvm_cov
*.dylib
*.so
*.dll
@@ -93,5 +94,5 @@ _a.out_*.*
llvm*
llvm-*
-# kpm
+# KCL mod lock file
!.mod.lock
diff --git a/ADOPTERS.md b/ADOPTERS.md
new file mode 100644
index 000000000..e0143c3e8
--- /dev/null
+++ b/ADOPTERS.md
@@ -0,0 +1,11 @@
+# Adopters
+
+This list shows non-exhaustive adopters of KCL. If you are using to KCL, then please add your team and use-case to this file.
+
+## Adopters list
+
+### Organizations
+
++ *[Ant Group](https://www.antgroup.com/)* - Large scale Kubernetes configuration abstration and management with GitOps.
++ *[Youzan](https://www.youzan.com/)* - Large scale Kubernetes configuration abstration and management with GitOps.
++ *[Huawei](https://www.huawei.com/)* - Terraform resource model abstraction and management.
diff --git a/GOVERNANCE.md b/GOVERNANCE.md
new file mode 100644
index 000000000..79eff78c1
--- /dev/null
+++ b/GOVERNANCE.md
@@ -0,0 +1,65 @@
+# KCL Project Governance
+
+As a CNCF sandbox project, the KCL project adheres to the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
+
+## Overview
+
+- [KCL Project Governance](#kcl-project-governance)
+ - [Overview](#overview)
+ - [Maintainer Ship](#maintainer-ship)
+ - [Adding Maintainers](#adding-maintainers)
+ - [Removal of Inactive Maintainers](#removal-of-inactive-maintainers)
+ - [Decision-Making Process](#decision-making-process)
+ - [Updating Governance](#updating-governance)
+
+## Maintainer Ship
+
+Maintainers of the KCL project share the responsibility of its success. They have three main responsibilities:
+
++ Share responsibility for the project's success.
++ Make a long-term investment to improve the project.
++ Spend time on tasks that may not be the most interesting, but are essential for the project's success.
+
+Maintainers often work tirelessly, but their contributions may not always be fully appreciated. While it may be easy to focus on the more exciting and technically advanced features, it is equally important to work on minor bug fixes, small improvements, long-term stability optimizations, and other essential aspects of the project.
+
+## Adding Maintainers
+
+Maintainers are individuals who have shown dedication to the long-term success of the project. Contributors wishing to become maintainers should have actively participated in tackling issues, contributing code, and reviewing proposals and code for a period of at least two months.
+
+Maintainer ship is built on trust, which extends beyond code contributions. It is important for potential maintainers to earn the trust of current maintainers by demonstrating their commitment to the best interests of the project.
+
+Current maintainers hold regular maintainer meetings to identify active contributors who have consistently invested time in the project over the prior months. From this list, if one or more individuals are deemed qualified candidates, a proposal to add them as maintainers can be submitted on GitHub via a pull request. If at least 50% of the maintainers agree with the proposal, the newly added maintainer(s) will be considered valid.
+
+## Removal of Inactive Maintainers
+
+Similar to adding maintainers, existing maintainers can be removed from the active maintainer list. If an existing maintainer meets one of the following conditions, any other maintainer can propose their removal via a pull request:
+
++ The maintainer has not participated in community activities for more than three months.
++ The maintainer has violated the governance rules more than twice.
+
+Once the above conditions are confirmed, the maintainer can be removed from the list, unless the original maintainer requests to remain and receives at least 50% of the votes from other maintainers.
+
+If a maintainer is removed from the maintaining list, the other maintainers should acknowledge their contribution by adding their name to an alumni section.
+
+## Decision-Making Process
+
+The KCL project is an open-source project that values openness. This means that the KCL repository is the source of truth for every aspect of the project, including values, design, documentation, roadmap, interfaces, etc. If it is part of the project, it should be in the repository.
+
+All decisions, regardless of their size, should follow the following three steps to be considered an update to the project:
+
+1. Open a pull request.
+2. Discuss the changes under the pull request.
+3. Merge or reject the pull request.
+
+When the KCL project has less than seven maintainers, a pull request (except for adding maintainers) may be merged if it meets the following conditions:
+
++ At least one maintainer comments "LGTM" (Looks Good To Me) on the pull request.
++ No other maintainers have opposing opinions.
+
+When the KCL project has more than seven maintainers, a pull request (except for adding maintainers) may be merged if it meets the following conditions:
+
++ At least two maintainers comment "LGTM" (Looks Good To Me) on the pull request.
+
+## Updating Governance
+
+Any substantive updates to the Governance require a supermajority vote from the maintainers.
diff --git a/MAINTAINERS b/MAINTAINERS
new file mode 100644
index 000000000..6443f3449
--- /dev/null
+++ b/MAINTAINERS
@@ -0,0 +1,10 @@
+Pengfei Xu
-介绍 | 特性 | 场景 | 安装 | 快速开始 | 文档 | 贡献 | 路线规划 +介绍 | 特性 | 场景 | 安装 | 文档 | 贡献 | 路线规划
## 介绍 KCL 是一个开源的基于约束的记录及函数语言并通过成熟的编程语言技术和实践来改进对大量繁杂配置比如云原生 Kubernetes 配置场景的编写,致力于构建围绕配置的更好的模块化、扩展性和稳定性,更简单的逻辑编写,以及更简单的自动化和生态工具集成。 ++ +
+ ## 场景 您可以将 KCL 用于 @@ -27,103 +33,35 @@ KCL 是一个开源的基于约束的记录及函数语言并通过成熟的编 + [使用 Schema 对配置数据进行抽象建模](https://kcl-lang.io/docs/user_docs/guides/schema-definition)并减少配置数据中的样板文件 + [为配置数据定义带有规则约束](https://kcl-lang.io/docs/user_docs/guides/validation)的 Schema 并对数据进行自动验证 + [通过梯度自动化方案和 GitOps](https://kcl-lang.io/docs/user_docs/guides/automation)无副作用地组织、简化、统一和管理庞大的配置 -+ 通过[分块编写配置数据](https://kcl-lang.io/docs/reference/lang/tour#config-operations)可扩展地管理庞大的配置 ++ 通过[分块编写配置数据](https://kcl-lang.io/docs/reference/lang/tour#config-operations)为不同的环境可扩展地管理庞大的配置 + 通过与[云原生配置工具](https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/)集成直接编辑或校验存量 Kubernetes 资源 -+ 与 [Kusion Stack](https://kusionstack.io) 一起,用作平台工程语言来交付现代应用程序 ++ 与 [KusionStack](https://kusionstack.io) 一起,用作平台工程语言来交付现代应用程序 ## 特性 + **简单易用**:源于 Python、Golang 等高级语言,采纳函数式编程语言特性,低副作用 -+ **设计良好**:独立的 Spec 驱动的语法、语义、运行时和系统库设计 -+ **快速建模**:以 [Schema](https://kcl-lang.io/docs/reference/lang/tour#schema) 为中心的配置类型及模块化抽象 ++ **设计良好**:独立的规范驱动的语法、语义、运行时和系统库设计 ++ **快速建模**:[开箱即用的模型库](https://artifacthub.io/packages/search?org=kcl&sort=relevance&page=1)和以 [Schema](https://kcl-lang.io/docs/reference/lang/tour#schema) 为中心的配置类型及模块化抽象 + **功能完备**:基于 [Config](https://kcl-lang.io/docs/reference/lang/tour#config-operations)、[Schema](https://kcl-lang.io/docs/reference/lang/tour#schema)、[Lambda](https://kcl-lang.io/docs/reference/lang/tour#function)、[Rule](https://kcl-lang.io/docs/reference/lang/tour#rule) 的配置及其模型、逻辑和策略编写 + **可靠稳定**:依赖[静态类型系统](https://kcl-lang.io/docs/reference/lang/tour/#type-system)、[约束](https://kcl-lang.io/docs/reference/lang/tour/#validation)和[自定义规则](https://kcl-lang.io/docs/reference/lang/tour#rule)的配置稳定性 + **强可扩展**:通过独立配置块[自动合并机制](https://kcl-lang.io/docs/reference/lang/tour/#-operators-1)保证配置编写的高可扩展性 + **易自动化**:[CRUD APIs](https://kcl-lang.io/docs/reference/lang/tour/#kcl-cli-variable-override),[多语言 SDK](https://kcl-lang.io/docs/reference/xlang-api/overview),[语言插件](https://github.com/kcl-lang/kcl-plugin) 构成的梯度自动化方案 + **极致性能**:使用 Rust & C,[LLVM](https://llvm.org/) 实现,支持编译到本地代码和 [WASM](https://webassembly.org/) 的高性能编译时和运行时 -+ **API 亲和**:原生支持 [OpenAPI](https://github.com/kcl-lang/kcl-openapi)、 Kubernetes CRD, Kubernetes YAML 等 API 生态规范 -+ **开发友好**:[语言工具](https://kcl-lang.io/docs/tools/cli/kcl/) (Format,Lint,Test,Vet,Doc 等)、[包管理工具](https://github.com/kcl-lang/kpm)和 [IDE 插件](https://github.com/kcl-lang/vscode-kcl) 构建良好的研发体验 ++ **API 亲和**:原生支持 [OpenAPI](https://github.com/kcl-lang/kcl-openapi)、 Kubernetes CRD, Kubernetes Resource Model (KRM) 等 API 生态规范 ++ **开发友好**:[语言工具](https://kcl-lang.io/docs/tools/cli/kcl/) (Format,Lint,Test,Vet,Doc, 包管理工具等) 和 [IDE 插件](https://kcl-lang.io/docs/tools/Ide/) 构建良好的研发体验 + **安全可控**:面向领域,不原生提供线程、IO 等系统级功能,低噪音,低安全风险,易维护,易治理 + **多语言 SDK**:[Go](https://github.com/kcl-lang/kcl-go),[Python](https://github.com/kcl-lang/kcl-py) 和 [Java](https://github.com/kcl-lang/kcl-java) SDK 满足不同场景和应用使用需求 -+ **生态集成**:通过 [Kubectl KCL 插件](https://github.com/kcl-lang/kubectl-kcl)、[Kustomize KCL 插件](https://github.com/kcl-lang/kustomize-kcl)、[Helm KCL 插件](https://github.com/kcl-lang/helm-kcl) 或者 [KPT KCL SDK](https://github.com/kcl-lang/kpt-kcl) 直接编辑或校验资源 ++ **生态集成**:通过 [Kubectl KCL 插件](https://github.com/kcl-lang/kubectl-kcl)、[Kustomize KCL 插件](https://github.com/kcl-lang/kustomize-kcl)、[Helm KCL 插件](https://github.com/kcl-lang/helm-kcl) 、[KPT KCL SDK](https://github.com/kcl-lang/kpt-kcl) 或者 [Crossplane KCL 函数](https://github.com/kcl-lang/crossplane-kcl) 直接编辑、校验或者抽象资源 + **生产可用**:广泛应用在蚂蚁集团平台工程及自动化的生产环境实践中 ## 如何选择 -简单的答案: - -+ 如果你需要编写结构化的静态的 K-V,或使用 Kubernetes 原生的技术工具,建议选择 YAML -+ 如果你希望引入编程语言便利性以消除文本(如 YAML、JSON) 模板,有良好的可读性,或者你已是 Terraform 的用户,建议选择 HCL -+ 如果你希望引入类型功能提升稳定性,维护可扩展的配置文件,建议选择 CUE -+ 如果你希望以现代语言方式编写复杂类型和建模,维护可扩展的配置文件,原生的纯函数和策略,和生产级的性能和自动化,建议选择 KCL - -更详细的功能和场景对比参考[这里](https://kcl-lang.io/docs/user_docs/getting-started/intro)。 +详细的功能和场景对比参考[这里](https://kcl-lang.io/docs/user_docs/getting-started/intro)。 ## 安装 -从 Github releases 页面[下载](https://github.com/kcl-lang/kcl/releases),并且将 `{install-location}/kclvm/bin` 添加到您的环境变量中 - -> 有关安装的更多信息,请查看 KCL 官网的[安装指南](https://kcl-lang.io/docs/user_docs/getting-started/install/) - -## 快速开始 - -`./samples/kubernetes.k` 是一个生成 kubernetes 资源的例子 - -```python -apiVersion = "apps/v1" -kind = "Deployment" -metadata = { - name = "nginx" - labels.app = "nginx" -} -spec = { - replicas = 3 - selector.matchLabels = metadata.labels - template.metadata.labels = metadata.labels - template.spec.containers = [ - { - name = metadata.name - image = "${metadata.name}:1.14.2" - ports = [{ containerPort = 80 }] - } - ] -} -``` - -我们可以通过执行如下命令得到 YAML 输出 - -```bash -kcl ./samples/kubernetes.k -``` - -YAML 输出 - -```yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx - labels: - app: nginx -spec: - replicas: 3 - selector: - matchLabels: - app: nginx - template: - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx:1.14.2 - ports: - - containerPort: 80 -``` - -> 更多例子可以在[这里](https://github.com/kcl-lang/kcl-lang.io/tree/main/examples)找到 +有关安装的更多信息,请查看 KCL 官网的[安装指南](https://kcl-lang.io/docs/user_docs/getting-started/install/) ## 文档 @@ -137,7 +75,7 @@ spec: ## 路线规划 -参考[KCL 路线规划](https://github.com/kcl-lang/kcl/issues/29) +参考[KCL 路线规划](https://github.com/kcl-lang/kcl/issues/882) ## 社区 diff --git a/README.md b/README.md index 7c0134fd3..b4508b01c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ English | 简体中文-Introduction | Features | What is it for | Installation | Showcase | Documentation | Contributing | Roadmap +Introduction | Features | What is it for | Installation | Documentation | Contributing | Roadmap
## Introduction KCL is an open-source, constraint-based record and functional language that enhances the writing of complex configurations, including those for cloud-native scenarios. With its advanced programming language technology and practices, KCL is dedicated to promoting better modularity, scalability, and stability for configurations. It enables simpler logic writing and offers ease of automation APIs and integration with homegrown systems. ++ +
+ ## What is it for? You can use KCL to @@ -27,102 +33,34 @@ You can use KCL to + Reduce boilerplate in configuration data with the [schema modeling](https://kcl-lang.io/docs/user_docs/guides/schema-definition). + Define schemas with [rule constraints for configuration data and validate](https://kcl-lang.io/docs/user_docs/guides/validation) them automatically. + Organize, simplify, unify and manage large configurations without side effects through [gradient automation schemes and GitOps](https://kcl-lang.io/docs/user_docs/guides/automation). -+ Manage large configurations in a scalable way with [isolated configuration blocks](https://kcl-lang.io/docs/reference/lang/tour#config-operations). ++ Manage large configurations in a scalable way for different environments with [isolated configuration blocks](https://kcl-lang.io/docs/reference/lang/tour#config-operations). + Mutating or validating Kubernetes resources with [cloud-native configuration tool plugins](https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/). -+ Used as a platform engineering programming language to deliver modern applications with [Kusion Stack](https://kusionstack.io). ++ Used as a platform engineering programming language to deliver modern applications with [KusionStack](https://kusionstack.io). ## Features -+ **Easy-to-use**: Originated from high-level languages such as Python and Golang, incorporating functional language features with low side-effects. ++ **Easy-to-use**: Originated from high-level languages such as Python and Golang, incorporating functional language features with low side effects. + **Well-designed**: Independent spec-driven syntax, semantics, runtime and system modules design. -+ **Quick modeling**: [Schema](https://kcl-lang.io/docs/reference/lang/tour#schema)-centric configuration types and modular abstraction. ++ **Quick modeling**: [Out-of-the-box modules](https://artifacthub.io/packages/search?org=kcl&sort=relevance&page=1) and [Schema](https://kcl-lang.io/docs/reference/lang/tour#schema)-centric configuration types and modular abstraction. + **Rich capabilities**: Configuration with type, logic and policy based on [Config](https://kcl-lang.io/docs/reference/lang/tour#config-operations), [Schema](https://kcl-lang.io/docs/reference/lang/tour#schema), [Lambda](https://kcl-lang.io/docs/reference/lang/tour#function), [Rule](https://kcl-lang.io/docs/reference/lang/tour#rule). + **Stability**: Configuration stability is achieved through a [static type system](https://kcl-lang.io/docs/reference/lang/tour/#type-system), [constraints](https://kcl-lang.io/docs/reference/lang/tour/#validation), and [rules](https://kcl-lang.io/docs/reference/lang/tour#rule). + **Scalability**: High scalability is assured with an [automatic merge mechanism](https://kcl-lang.io/docs/reference/lang/tour/#-operators-1) of isolated config blocks. + **Fast automation**: Gradient automation scheme of [CRUD APIs](https://kcl-lang.io/docs/reference/lang/tour/#kcl-cli-variable-override), [multilingual SDKs](https://kcl-lang.io/docs/reference/xlang-api/overview), and [language plugin](https://github.com/kcl-lang/kcl-plugin) + **High performance**: High compile-time and runtime performance using Rust & C and [LLVM](https://llvm.org/), and support compilation to native code and [WASM](https://webassembly.org/). -+ **API affinity**: Native support for ecological API specifications such as [OpenAPI](https://github.com/kcl-lang/kcl-openapi), Kubernetes CRD, Kubernetes YAML spec. -+ **Developer-friendly**: Friendly development experiences with rich [language tools](https://kcl-lang.io/docs/tools/cli/kcl/) (Format, Lint, Test, Vet, Doc, etc.), [package manage tool](https://github.com/kcl-lang/kpm) and [IDE plugins](https://github.com/kcl-lang/vscode-kcl). ++ **API affinity**: Native support for ecological API specifications such as [OpenAPI](https://github.com/kcl-lang/kcl-openapi), Kubernetes CRD, Kubernetes Resource Model (KRM) spec. ++ **Developer-friendly**: Friendly development experiences with rich [language tools](https://kcl-lang.io/docs/tools/cli/kcl/) (Format, Lint, Test, Vet, Doc, package management tools etc.), and multiple [IDE extensions](https://kcl-lang.io/docs/tools/Ide/). + **Safety & maintainable**: Domain-oriented, no system-level functions such as native threads and IO, low noise and security risk, easy maintenance and governance. -+ **Rich multi-language SDK**: [Go](https://github.com/kcl-lang/kcl-go), [Python](https://github.com/kcl-lang/kcl-py), and[Java](https://github.com/kcl-lang/kcl-java) meet different scenarios and application use prelude. -+ **Integrations**: Mutate and validate manifests through [Kubectl KCL Plugin](https://github.com/kcl-lang/kubectl-kcl), [Kustomize KCL Plugin](https://github.com/kcl-lang/kustomize-kcl), [Helm KCL Plugin](https://github.com/kcl-lang/helm-kcl) or [KPT KCL SDK](https://github.com/kcl-lang/kpt-kcl). ++ **Rich multi-language SDK**: [Go](https://github.com/kcl-lang/kcl-go), [Python](https://github.com/kcl-lang/kcl-py), and [Java](https://github.com/kcl-lang/kcl-java) meet different scenarios and application use prelude. ++ **Integrations**: Abstract, mutate and validate manifests through [Kubectl KCL Plugin](https://github.com/kcl-lang/kubectl-kcl), [Kustomize KCL Plugin](https://github.com/kcl-lang/kustomize-kcl), [Helm KCL Plugin](https://github.com/kcl-lang/helm-kcl), [KPT KCL SDK](https://github.com/kcl-lang/kpt-kcl) or [Crossplane KCL Function](https://github.com/kcl-lang/crossplane-kcl). + **Production-ready**: Widely used in production practices of platform engineering and automation at Ant Group. ## How to choose? -The simple answer: - -+ YAML is recommended if you need to write structured static K-V or use Kubernetes' native tools. -+ HCL is recommended if you want to use programming language convenience to remove boilerplate with good human readability or if you are already a Terraform user. -+ CUE is recommended if you want to use a type system to improve stability and maintain scalable configurations. -+ KCL is recommended if you want types and modeling like a modern language, scalable configurations, in-house pure functions and rules, and production-ready performance and automation. - A detailed feature and scenario comparison is [here](https://kcl-lang.io/docs/user_docs/getting-started/intro). ## Installation -[Download](https://github.com/kcl-lang/kcl/releases) the latest release from GitHub and add `{install-location}/kclvm/bin` to the environment `PATH`. - -> For more information about installation, please check the [Installation Guide](https://kcl-lang.io/docs/user_docs/getting-started/install/) on the KCL official website. - -## Showcase - -`./samples/kubernetes.k` is an example of generating kubernetes manifests. - -```python -apiVersion = "apps/v1" -kind = "Deployment" -metadata = { - name = "nginx" - labels.app = "nginx" -} -spec = { - replicas = 3 - selector.matchLabels = metadata.labels - template.metadata.labels = metadata.labels - template.spec.containers = [ - { - name = metadata.name - image = "${metadata.name}:1.14.2" - ports = [{ containerPort = 80 }] - } - ] -} -``` - -We can execute the following command to get a YAML output. - -```bash -kcl ./samples/kubernetes.k -``` - -YAML output - -```yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx - labels: - app: nginx -spec: - replicas: 3 - selector: - matchLabels: - app: nginx - template: - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx:1.14.2 - ports: - - containerPort: 80 -``` - -> More examples can be found at [here](https://github.com/kcl-lang/kcl-lang.io/tree/main/examples). +For more information about installation, please check the [Installation Guide](https://kcl-lang.io/docs/user_docs/getting-started/install/) on the KCL official website. ## Documentation @@ -136,7 +74,7 @@ See [Developing Guide](./docs/dev_guide/1.about_this_guide.md). You can also get ## Roadmap -See [KCL Roadmap](https://github.com/kcl-lang/kcl/issues/29). +See [KCL Roadmap](https://github.com/kcl-lang/kcl/issues/882). ## Community diff --git a/VERSION b/VERSION index 79a2734bb..c18d72be3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0 \ No newline at end of file +0.8.1 \ No newline at end of file diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 000000000..a3e5a058b --- /dev/null +++ b/build.ps1 @@ -0,0 +1,14 @@ +Set-Location $PSScriptRoot +. '.\scripts\build-windows\build.ps1' +$bin_path = Join-Path $PSScriptRoot 'scripts\build-windows\_output\kclvm-windows\bin' +$env:Path += ";$bin_path" +# rust unit test +Set-Location .\kclvm +cargo test --workspace -r -- --nocapture +Set-Location $PSScriptRoot +# rust runtime test +Set-Location .\kclvm\tests\test_units +python3 -m pytest -vv +Set-Location $PSScriptRoot +# konfig test +Invoke-Expression -Command '.\test\integration\test_konfig.bat' diff --git a/build_and_test_win.bat b/build_and_test_win.bat deleted file mode 100644 index 0b85cf1e9..000000000 --- a/build_and_test_win.bat +++ /dev/null @@ -1,19 +0,0 @@ -cd %~dp0 - -call .\\scripts\\build-windows\\build.bat - -set "bin_path=%cd%\scripts\build-windows\_output\kclvm-windows\bin" -set "path=%path%;%bin_path%" - -@REM rust unit test -cd .\\kclvm -cargo test -p kclvm-* -cd %~dp0 - -@REM rust runtime test -cd .\\kclvm\\tests\\test_units -kclvm -m pytest -vv -cd %~dp0 - -@REM konfig test -call .\\test\\integration\\test_konfig.bat diff --git a/kclvm_cli/Cargo.toml b/cli/Cargo.toml similarity index 91% rename from kclvm_cli/Cargo.toml rename to cli/Cargo.toml index 54ac71dd8..305303f22 100644 --- a/kclvm_cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kclvm_cli" -version = "0.5.0" +version = "0.8.1" edition = "2021" [[bin]] diff --git a/kclvm_cli/build.rs b/cli/build.rs similarity index 59% rename from kclvm_cli/build.rs rename to cli/build.rs index 2f89c73a8..bb7623caf 100644 --- a/kclvm_cli/build.rs +++ b/cli/build.rs @@ -1,5 +1,9 @@ fn main() { - println!("cargo:rustc-link-search=../kclvm/target/release"); + if cfg!(target_os = "windows") { + println!("cargo:rustc-link-search=..\\kclvm\\target\\release"); + } else { + println!("cargo:rustc-link-search=../kclvm/target/release"); + } println!("cargo:rustc-link-lib=dylib=kclvm_cli_cdylib"); if cfg!(target_os = "macos") { println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path"); diff --git a/kclvm_cli/src/main.rs b/cli/src/main.rs similarity index 100% rename from kclvm_cli/src/main.rs rename to cli/src/main.rs diff --git a/compiler_base/error/src/diagnostic/diagnostic_handler.rs b/compiler_base/error/src/diagnostic/diagnostic_handler.rs index 020268c9a..281f13e50 100644 --- a/compiler_base/error/src/diagnostic/diagnostic_handler.rs +++ b/compiler_base/error/src/diagnostic/diagnostic_handler.rs @@ -10,8 +10,8 @@ //! For more information about template loader, see doc in "compiler_base/error/src/diagnostic/diagnostic_message.rs". use crate::{ - diagnostic::diagnostic_message::TemplateLoader, emit_diagnostic_to_uncolored_text, - emitter::EmitResultText, Diagnostic, DiagnosticStyle, Emitter, EmitterWriter, + diagnostic::diagnostic_message::TemplateLoader, emit_diagnostic_to_uncolored_text, Diagnostic, + DiagnosticStyle, Emitter, EmitterWriter, }; use anyhow::{bail, Context, Result}; use compiler_base_span::fatal_error::FatalError; diff --git a/compiler_base/error/src/lib.rs b/compiler_base/error/src/lib.rs index 21a4ea483..baca04ed1 100644 --- a/compiler_base/error/src/lib.rs +++ b/compiler_base/error/src/lib.rs @@ -14,6 +14,7 @@ mod emitter; mod tests; pub mod errors; +pub mod unit_type; pub use diagnostic::{ components, diagnostic_handler, style::DiagnosticStyle, Component, Diagnostic, StyledBuffer, diff --git a/compiler_base/error/src/unit_type.rs b/compiler_base/error/src/unit_type.rs new file mode 100644 index 000000000..02c0195c3 --- /dev/null +++ b/compiler_base/error/src/unit_type.rs @@ -0,0 +1,31 @@ +//! This file provides some of the self-encapsulated types used in handling error messages. + +/// [`TyeWithUnit`] is a trait for types that can be converted into a string with a unit. +pub trait TypeWithUnit { + fn into_string_with_unit(self) -> String; +} + +/// [`UnitUsize`] is a [`usize`] type that can be converted into a string with a unit. +pub struct UnitUsize(pub usize, pub String); + +impl TypeWithUnit for UnitUsize { + /// [`into_string_with_unit`] converts [`UnitUsize`] into a string with a unit. + /// + /// # Examples + /// + /// ``` + /// use compiler_base_error::unit_type::{TypeWithUnit, UnitUsize}; + /// + /// let unit_usize = UnitUsize(1, "byte".to_string()); + /// assert_eq!(unit_usize.into_string_with_unit(), "1 byte"); + /// let unit_usize = UnitUsize(2, "byte".to_string()); + /// assert_eq!(unit_usize.into_string_with_unit(), "2 bytes"); + /// ``` + fn into_string_with_unit(self) -> String { + if self.0 > 1 { + format!("{} {}s", self.0, self.1) + } else { + format!("{} {}", self.0, self.1) + } + } +} diff --git a/compiler_base/parallel/src/executor/tests.rs b/compiler_base/parallel/src/executor/tests.rs index 2e4d21584..ae0fa9b6d 100644 --- a/compiler_base/parallel/src/executor/tests.rs +++ b/compiler_base/parallel/src/executor/tests.rs @@ -124,7 +124,11 @@ mod test_timeout_executor { tasks.push(MyTask { id: i }) } - let executor = TimeoutExecutor::new_with_thread_count(thread_count); + let executor = TimeoutExecutor::new_with_thread_count_and_timeout( + thread_count, + Instant::now() + Duration::from_secs(120), + ); + let mut events_collector = Arc::new(Mutex::new(EventsCollector::default())); let expected_events = diff --git a/compiler_base/parallel/src/executor/timeout.rs b/compiler_base/parallel/src/executor/timeout.rs index 8dce4d1f7..8d9bf0682 100644 --- a/compiler_base/parallel/src/executor/timeout.rs +++ b/compiler_base/parallel/src/executor/timeout.rs @@ -25,6 +25,7 @@ pub(crate) struct TimeoutSituation { pub struct TimeoutExecutor { timeout_queue: VecDeque