-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replace "__main__" by package name when parse import statments i…
…n entry. (#660) feat: replace "__main__" by package name when parse import statments in entry.
- Loading branch information
Showing
15 changed files
with
62 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a: | ||
id: 102 |
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 @@ | ||
kcl_cli_configs: | ||
file: | ||
- ./test_inst_101/main.k | ||
- ${test_inst_102:KCL_MOD}/main.k | ||
package_maps: | ||
test_inst_102: ./src/test_data/instances/test_inst_10/test_inst_102 | ||
|
5 changes: 5 additions & 0 deletions
5
kclvm/cmd/src/test_data/instances/test_inst_10/test_inst_101/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,5 @@ | ||
[package] | ||
name = "test_inst_101" | ||
edition = "0.0.1" | ||
version = "0.0.1" | ||
|
5 changes: 5 additions & 0 deletions
5
kclvm/cmd/src/test_data/instances/test_inst_10/test_inst_101/main.k
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,5 @@ | ||
import test_inst_102 as k102 | ||
|
||
a = k102.K102 { | ||
id: 102 | ||
} |
5 changes: 5 additions & 0 deletions
5
kclvm/cmd/src/test_data/instances/test_inst_10/test_inst_102/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,5 @@ | ||
[package] | ||
name = "test_inst_102" | ||
edition = "0.0.1" | ||
version = "0.0.1" | ||
|
4 changes: 4 additions & 0 deletions
4
kclvm/cmd/src/test_data/instances/test_inst_10/test_inst_102/main.k
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,4 @@ | ||
schema K102: | ||
id: int | ||
|
||
inst102 = K102.instances() |
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,4 @@ | ||
a: | ||
id: 92 | ||
inst92: | ||
- id: 92 |
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 @@ | ||
kcl_cli_configs: | ||
file: | ||
- ./test_inst_91/main.k | ||
- ${test_inst_92:KCL_MOD}/main.k | ||
package_maps: | ||
test_inst_92: ./src/test_data/instances/test_inst_9/test_inst_92 | ||
|
5 changes: 5 additions & 0 deletions
5
kclvm/cmd/src/test_data/instances/test_inst_9/test_inst_91/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,5 @@ | ||
[package] | ||
name = "test_inst_101" | ||
edition = "0.0.1" | ||
version = "0.0.1" | ||
|
5 changes: 5 additions & 0 deletions
5
kclvm/cmd/src/test_data/instances/test_inst_9/test_inst_91/main.k
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,5 @@ | ||
import test_inst_92.sub as k92 | ||
|
||
a = k92.K92 { | ||
id: 92 | ||
} |
5 changes: 5 additions & 0 deletions
5
kclvm/cmd/src/test_data/instances/test_inst_9/test_inst_92/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,5 @@ | ||
[package] | ||
name = "test_inst_102" | ||
edition = "0.0.1" | ||
version = "0.0.1" | ||
|
3 changes: 3 additions & 0 deletions
3
kclvm/cmd/src/test_data/instances/test_inst_9/test_inst_92/main.k
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,3 @@ | ||
import sub as s | ||
|
||
inst92 = s.K92.instances() |
2 changes: 2 additions & 0 deletions
2
kclvm/cmd/src/test_data/instances/test_inst_9/test_inst_92/sub/main.k
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,2 @@ | ||
schema K92: | ||
id: int |
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