kcl-lang / konfig

KCL Kubernetes Config Abstraction & Composition Module
https://kcl-lang.io
Apache License 2.0
9 stars 8 forks source link

provider = [*provider, *DatabaseBackend(config).provider] #4

Closed userxiaosi closed 8 months ago

userxiaosi commented 8 months ago

Bug Report

我在windows 11 中运行nginx 示例出现以下错误。我刚学习且没有编程经验,不知道怎么处理

1. Minimal reproduce step (Required)

[ ~ ]# cd .\examples\appops\nginx-example\dev\

[ ~ ]# kcl.exe .\main.k
error[E2L23]: CompileError
  --> C:\user\xiaosi\konfig\models\kube\backend\server_backend.k:65:33
   |
65 |         provider = [*provider, *StorageBackend(config).provider]
   |                                 ^ name 'StorageBackend' is not defined, did you mean '["ServerBackend"]'?
   |

error[E2L23]: CompileError
  --> C:\user\xiaosi\konfig\models\kube\backend\server_backend.k:68:33
   |
68 |         provider = [*provider, *DatabaseBackend(config).provider]
   |                                 ^ name 'DatabaseBackend' is not defined
   |

2. What did you expect to see? (Required)

希望能够解决这个问题,能像教程那样正常输出

3. What did you see instead (Required)

kube\backend\server_backend.k:65:33   # name 'StorageBackend' is not defined,
models\kube\backend\server_backend.k:68:33   # name 'DatabaseBackend' is not defined

4. What is your KCL components version? (Required)

[ ~ ]# kcl.exe -v         
kcl version 0.8.0
Peefy commented 8 months ago

Sorry to the late apply, I've fixed it in this commit https://github.com/kcl-lang/konfig/commit/7797c6a7c983ee3ec1e4149c5fcd6a5786454131