kcl-lang / kpm

KCL Package Manager
https://kcl-lang.io
Apache License 2.0
27 stars 44 forks source link

bug: the "-" in the dependency name is replaced with "_" in entries. #513

Open zong-zhe opened 2 weeks ago

zong-zhe commented 2 weeks ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

When a tripartite dependency name contains hyphens -, the entries will only take effect if the hyphens - are replaced with underscores _.

[package]
name = "dev"
edition = "v0.10.0"
version = "0.0.1"

[dependencies]
my-dev = { path = "../../my-dev" } # hyphens in the name

[profile]
entries = ["../base/base.k", "main.k", "${my_dev:KCL_MOD}/base/base.k"] # replace it into underscores

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

[package]
name = "dev"
edition = "v0.10.0"
version = "0.0.1"

[dependencies]
my-dev = { path = "../../my-dev" } 

[profile]
entries = ["../base/base.k", "main.k", "${my-dev:KCL_MOD}/base/base.k"] # the same as the dependency name

3. What did you see instead (Required)

When a tripartite dependency name contains hyphens -, the entries will only take effect if the hyphens - are replaced with underscores _.

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

The main branch of kpm