Issue description
Using vscode with mojo extension clicking the Run Mojo File
button in the top right works fine.
BUT after running magic shell
pressing the same button causes an error
Steps to reproduce
project setup
magic init hello --format mojoproject
simple mojo file
fn main():
var a = 1
print(a)
Run file
magic run mojo main.mojo
: ✔️
- pressing
Run Mojo File
: ✔️ (runs '/home/julian/.config/Code/User/globalStorage/modular-mojotools.vscode-mojo/magic-data-home/envs/max/bin/mojo' '/home/julian/programming/mojo/hello/main.mojo')
Run file (with activated shell)
magic shell
: ✔️
mojo main.mojo
: ✔️
- pressing
Run Mojo File
: 💥
(hello) julian@fedora:~/programming/mojo/hello$ '/home/julian/.config/Code/User/globalStorage/modular-mojotools.vscode-mojo/magic-data-home/envs/max/bin/mojo' '/home/julian/programming/mojo/hello/main.mojo'
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #debuginfo.file<"/work/remotebuilds/ea4cfa3c-cd22-4b2a-8b33-bc61cbe1c031/open-source/mojo/stdlib/stdlib/collections/dict.mojo" in "/">
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse a byte at the end of the bytecode
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #lit<var.decl.kind var>
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
#lit.lifetime.field<#kgen.param.decl.ref<"existing`"> : !lit.lifetime<0>, "st_mode"> : !lit.lifetime<0>:1:6: error: unknown attribute `lifetime.field` in dialect `lit`
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::StringAttr, but got: #lit<var.decl.kind var>
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #debuginfo.file<"/work/remotebuilds/ea4cfa3c-cd22-4b2a-8b33-bc61cbe1c031/open-source/mojo/stdlib/stdlib/collections/dict.mojo" in "/">
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/.magic/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: attempting to parse 8 bytes when only 0 remain
/home/julian/programming/mojo/hello/main.mojo:2:13: error: could not find an 'IntLiteral' type
var a = 1
^
/home/julian/programming/mojo/hello/main.mojo:3:5: error: use of unknown declaration 'print', 'fn' declarations require explicit variable declarations
print(a)
^~~~~
/home/julian/.config/Code/User/globalStorage/modular-mojotools.vscode-mojo/magic-data-home/envs/max/bin/mojo: error: failed to parse the provided Mojo source module
Version Info
- magic 0.2.3
- mojo 24.5.0 (e8aacb95)