[BUG] importing .mojopkg
runs its main()
instead of only importing
#1987
Labels
bug
Something isn't working
mojo
Issues that are related to mojo
mojo-repo
Tag all issues with this label
mojo-tooling
Tag for all issues related to repl, lldb, lsp, vscode extension.
Bug description
When importing and calling something from
.mojopkg
- mojo runs only package's main, and not real main.Steps to reproduce
I've written a minimal repro:
Where
simple_package/birds.mojo
is:and
main.mojo
:When I'm trying to import
birds_package.mojopkg
inmain.mojo
— my output is:And when
simple_package
as folder:Mojo package was created with
and
__init__.mojo
is empty fileSystem information
The text was updated successfully, but these errors were encountered: