Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Compiling a KCL program under /tmp on macos results in a CannotFindModule. #603

Closed
zong-zhe opened this issue Jul 12, 2023 · 0 comments · Fixed by #605
Closed

Bug: Compiling a KCL program under /tmp on macos results in a CannotFindModule. #603

zong-zhe opened this issue Jul 12, 2023 · 0 comments · Fixed by #605
Assignees
Labels
bug Something isn't working

Comments

@zong-zhe
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Under /tmp on macos, create the kcl program as below:

-- /tmp
     | -- a.k
     | -- pkg
           | -- a.k

The tmp/pkg/a.k.

a=1

The /tmp/a.k

import .pkg

a = pkg.a

Use the following command compile the /tmp/a.k

kcl /tmp/a.k

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

Compile successfully.

a: 1

3. What did you see instead (Required)

An error raised.

error[E2F04]: CannotFindModule
 --> /tmp/a.k:1:1
  |
1 | import .pkg
  |  Cannot find the module .pkg from //tmp/pkg
  |

error[E2G22]: TypeError
 --> /tmp/a.k:3:5
  |
3 | a = pkg.a
  |     ^ module '..tmp.pkg' has no attribute a
  |

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

I build the KCL compiler from the main branch.

@zong-zhe zong-zhe added the bug Something isn't working label Jul 12, 2023
@zong-zhe zong-zhe added this to the v0.5.0 Release milestone Jul 12, 2023
@zong-zhe zong-zhe self-assigned this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant