Skip to content

Commit

Permalink
fix: fix typo '{k8s:KCL_MOD}' -> '${k8s:KCL_MOD}'
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Jan 30, 2024
1 parent 159edb7 commit 4d4e61a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/kcl_mod-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ entries = [
entries = [
"entry1.k",
"subdir/entry2.k",
"{k8s:KCL_MOD}/core/api/v1/deployment.k"
"${k8s:KCL_MOD}/core/api/v1/deployment.k"
]
```

`mod relative paths` 必须包含前缀 `{k8s:KCL_MOD}`,其中 `k8s` 是包名,`{k8s:KCL_MOD}` 表示包 k8s 的包根路径。因此,如果 `k8s` 的包根路径是 `/.kcl/kpm/k8s`,则上面的 `entries` 将把 `/usr/my_pkg/entry1.k``/usr/my_pkg/subdir/entry2.k``/.kcl/kpm/k8s/core/api/v1/deployment.k` 作为 `kcl` 编译器的入口点。
`mod relative paths` 必须包含前缀 `${k8s:KCL_MOD}`,其中 `k8s` 是包名,`${k8s:KCL_MOD}` 表示包 k8s 的包根路径。因此,如果 `k8s` 的包根路径是 `/.kcl/kpm/k8s`,则上面的 `entries` 将把 `/usr/my_pkg/entry1.k``/usr/my_pkg/subdir/entry2.k``/.kcl/kpm/k8s/core/api/v1/deployment.k` 作为 `kcl` 编译器的入口点。

### 注意
你可以使用 `normal path` 指定当前包路径中的编译入口点,使用 `mod relative path` 指定三方包中的入口点。
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl_mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ entries = [
entries = [
"entry1.k",
"subdir/entry2.k",
"{k8s:KCL_MOD}/core/api/v1/deployment.k"
"${k8s:KCL_MOD}/core/api/v1/deployment.k"
]
```

The `mod relative paths` must contains the preffix `{k8s:KCL_MOD}`, `k8s` is the package name, `{k8s:KCL_MOD}` means the package root path of the package `k8s`. Therefore, if the package root path of `k8s` is `/.kcl/kpm/k8s`, the `entries` show above will take `/usr/my_pkg/entry1.k`, `/usr/my_pkg/subdir/entry2.k` and `/.kcl/kpm/k8s/core/api/v1/deployment.k` as the entry point of the kcl compiler.
The `mod relative paths` must contains the preffix `${k8s:KCL_MOD}`, `k8s` is the package name, `${k8s:KCL_MOD}` means the package root path of the package `k8s`. Therefore, if the package root path of `k8s` is `/.kcl/kpm/k8s`, the `entries` show above will take `/usr/my_pkg/entry1.k`, `/usr/my_pkg/subdir/entry2.k` and `/.kcl/kpm/k8s/core/api/v1/deployment.k` as the entry point of the kcl compiler.

### Note
You can use `normal path` to specify the compilation entry point in the current package path, and use `mod relative path` to specify the entry point in a third-party package.
Expand Down

0 comments on commit 4d4e61a

Please sign in to comment.