Skip to content

Bug Report: The position information in the KCL error message is incorrect. #126

Closed
@He1pa

Description

@He1pa

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

kcl code:

import non_existent_file

When a CannotFindModule error is triggered (e.g., importing a non-existent file), the error message is indicated at x:2, but by convention it should be x:1

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

KCL Error [CannotFindModule]
---> File ./src/resolver/test_data/test.k:1:1
1 |import non_existent_file
Cannot find the module non_existent_file from /path_to_test/non_existent_file

3. What did you see instead (Required)

KCL Error [CannotFindModule]
---> File ./src/resolver/test_data/test.k:1:2
1 |import non_existent_file
Cannot find the module non_existent_file from /path_to_test/non_existent_file

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

commit 7f91ecd

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions