-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #549 from kcl-lang/fix-dep-exist-bug
fix: fix 'edge already exists' when kpm run
- Loading branch information
Showing
16 changed files
with
217 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
pkg/client/test_data/issues/kcl-lang/kcl/issue/1760/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
## Bug Report | ||
|
||
https://github.com/kcl-lang/kcl/issues/1760 | ||
|
||
### 1. Minimal reproduce step (Required) | ||
|
||
1. Two empty modules within the same directory: | ||
|
||
|- modules | ||
| |- a | ||
| | |- kcl.mod | ||
| | |- main.k | ||
| |- b | ||
| | |- kcl.mod | ||
| | |- main.k | ||
|
||
2. Content `/modules/a/kcl.mod` : | ||
|
||
``` | ||
[package] | ||
name = "a" | ||
edition = "v0.10.0" | ||
version = "0.0.1" | ||
[dependencies] | ||
b = { path = "../b" } | ||
fluxcd-source-controller = "v1.3.2" | ||
fluxcd-helm-controller = "v1.0.3" | ||
``` | ||
|
||
3. Content `/modules/b/kcl.mod` : | ||
|
||
``` | ||
[package] | ||
name = "b" | ||
edition = "v0.10.0" | ||
version = "0.0.1" | ||
[dependencies] | ||
fluxcd-source-controller = "v1.3.2" | ||
``` | ||
|
||
4. Ensure your `$USER/.kcl/kpm/` directory is empty. | ||
|
||
|
||
### 2. What did you expect to see? (Required) | ||
``` | ||
$ kcl run /modules/a/main.k | ||
downloading 'kcl-lang/fluxcd-helm-controller:v1.0.3' from 'ghcr.io/kcl-lang/fluxcd-helm-controller:v1.0.3' | ||
downloading 'kcl-lang/fluxcd-source-controller:v1.3.2' from 'ghcr.io/kcl-lang/fluxcd-source-controller:v1.3.2' | ||
downloading 'kcl-lang/k8s:1.31.2' from 'ghcr.io/kcl-lang/k8s:1.31.2' | ||
The_first_kcl_program: Hello World! | ||
``` | ||
|
||
### 3. What did you see instead (Required) | ||
``` | ||
$ kcl run /modules/a/main.k | ||
downloading 'kcl-lang/fluxcd-helm-controller:v1.0.3' from 'ghcr.io/kcl-lang/fluxcd-helm-controller:v1.0.3' | ||
downloading 'kcl-lang/fluxcd-source-controller:v1.3.2' from 'ghcr.io/kcl-lang/fluxcd-source-controller:v1.3.2' | ||
downloading 'kcl-lang/k8s:1.31.2' from 'ghcr.io/kcl-lang/k8s:1.31.2' | ||
edge already exists | ||
``` | ||
|
||
--> **kcl exited with error code 1** | ||
|
||
### 4. What is your KCL components version? (Required) | ||
|
||
0.10.8-linux-amd64 |
9 changes: 9 additions & 0 deletions
9
pkg/client/test_data/issues/kcl-lang/kcl/issue/1760/a/kcl.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "a" | ||
edition = "v0.10.0" | ||
version = "0.0.1" | ||
|
||
[dependencies] | ||
b = { path = "../b", version = "0.0.1" } | ||
fluxcd-helm-controller = "v1.0.3" | ||
fluxcd-source-controller = "v1.3.2" |
29 changes: 29 additions & 0 deletions
29
pkg/client/test_data/issues/kcl-lang/kcl/issue/1760/a/kcl.mod.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[dependencies] | ||
[dependencies.b] | ||
name = "b" | ||
full_name = "b_0.0.1" | ||
version = "0.0.1" | ||
[dependencies.fluxcd-helm-controller] | ||
name = "fluxcd-helm-controller" | ||
full_name = "fluxcd-helm-controller_v1.0.3" | ||
version = "v1.0.3" | ||
sum = "IfDYAw0NW8XsbUSygAfqkgrJ8LdI7x4NIq7e9TuTbKY=" | ||
reg = "ghcr.io" | ||
repo = "kcl-lang/fluxcd-helm-controller" | ||
oci_tag = "v1.0.3" | ||
[dependencies.fluxcd-source-controller] | ||
name = "fluxcd-source-controller" | ||
full_name = "fluxcd-source-controller_v1.3.2" | ||
version = "v1.3.2" | ||
sum = "iZlc0kXOSajJNUmzvOlcIZgk60WGJbl4xKy4AVWYfkM=" | ||
reg = "ghcr.io" | ||
repo = "kcl-lang/fluxcd-source-controller" | ||
oci_tag = "v1.3.2" | ||
[dependencies.k8s] | ||
name = "k8s" | ||
full_name = "k8s_1.31.2" | ||
version = "1.31.2" | ||
sum = "xBZgPsnpVVyWBpahuPQHReeRx28eUHGFoaPeqbct+vs=" | ||
reg = "ghcr.io" | ||
repo = "kcl-lang/k8s" | ||
oci_tag = "1.31.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The_first_kcl_program = 'Hello World!' |
7 changes: 7 additions & 0 deletions
7
pkg/client/test_data/issues/kcl-lang/kcl/issue/1760/b/kcl.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "b" | ||
edition = "v0.10.0" | ||
version = "0.0.1" | ||
|
||
[dependencies] | ||
fluxcd-source-controller = "v1.3.2" |
15 changes: 15 additions & 0 deletions
15
pkg/client/test_data/issues/kcl-lang/kcl/issue/1760/b/kcl.mod.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[dependencies] | ||
[dependencies.fluxcd-source-controller] | ||
name = "fluxcd-source-controller" | ||
full_name = "fluxcd-source-controller_v1.3.2" | ||
version = "v1.3.2" | ||
reg = "ghcr.io" | ||
repo = "kcl-lang/fluxcd-source-controller" | ||
oci_tag = "v1.3.2" | ||
[dependencies.k8s] | ||
name = "k8s" | ||
full_name = "k8s_1.31.2" | ||
version = "1.31.2" | ||
reg = "ghcr.io" | ||
repo = "kcl-lang/k8s" | ||
oci_tag = "1.31.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The_first_kcl_program = 'Hello World!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ edition = "v0.10.0" | |
version = "0.0.1" | ||
|
||
[dependencies] | ||
helloworld = { version = "0.1.2" } | ||
helloworld = "0.1.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters