{ "args": "", "askedAt": "2026-10-03T14:25:20+00:00", "compiler": "mojo_1_1_0", "firstItem": "manual/snippet/manual-errors-7", "key": "a502623b200de2aed639bad0e0da6015c0ddccb9551a2dc0630238b5da3af114", "mode": "run", "raw": { "buildResult": { "code": 1, "compilationOptions": [ "build", "/app/example.mojo" ], "downloads": [], "execTime": 156, "executableFilename": "/nosym/tmp/compiler-explorer-compilercdVwUh/example", "inputFilename": "example.mojo", "instructionSet": "amd64", "okToCache": true, "processExecutionResultTime": 0.06224600039422512, "stderr": [ { "tag": { "column": 1, "file": "example.mojo", "line": 2, "severity": 3, "text": "error: global variables are not supported; move this into a function body or use 'comptime' to declare a constant" }, "text": ":2:1: error: global variables are not supported; move this into a function body or use 'comptime' to declare a constant" }, { "text": "var f = open(input_file, \"r\")" }, { "text": "^" }, { "tag": { "column": 1, "file": "example.mojo", "line": 3, "severity": 3, "text": "error: global variables are not supported; move this into a function body or use 'comptime' to declare a constant" }, "text": ":3:1: error: global variables are not supported; move this into a function body or use 'comptime' to declare a constant" }, { "text": "var content = f.read()" }, { "text": "^" }, { "tag": { "column": 1, "file": "example.mojo", "line": 7, "severity": 3, "text": "error: backtick identifier must not be empty; add content between the backticks" }, "text": ":7:1: error: backtick identifier must not be empty; add content between the backticks" }, { "text": "```" }, { "text": "^" }, { "tag": { "column": 1, "file": "example.mojo", "line": 6, "severity": 3, "text": "error: expressions must not appear at file scope; move this into a function body" }, "text": ":6:1: error: expressions must not appear at file scope; move this into a function body" }, { "text": "f.close()" }, { "text": "^" }, { "tag": { "column": 3, "file": "example.mojo", "line": 7, "severity": 3, "text": "error: unterminated backtick identifier" }, "text": ":7:3: error: unterminated backtick identifier" }, { "text": "```" }, { "text": " ^" }, { "text": "/opt/compiler-explorer/mojo-1.1.0/bin/mojo: error: failed to parse the provided Mojo source module" } ], "stdout": [], "timedOut": false, "truncated": false }, "code": -1, "didExecute": false, "execTime": 257, "okToCache": false, "queueTime": 5, "stderr": [ { "text": "Build failed" } ], "stdout": [], "timedOut": false }, "result": { "asm": null, "buildStderr": ":2:1: error: global variables are not supported; move this into a function body or use 'comptime' to declare a constant\nvar f = open(input_file, \"r\")\n^\n:3:1: error: global variables are not supported; move this into a function body or use 'comptime' to declare a constant\nvar content = f.read()\n^\n:7:1: error: backtick identifier must not be empty; add content between the backticks\n```\n^\n:6:1: error: expressions must not appear at file scope; move this into a function body\nf.close()\n^\n:7:3: error: unterminated backtick identifier\n```\n ^\n/opt/compiler-explorer/mojo-1.1.0/bin/mojo: error: failed to parse the provided Mojo source module", "compiled": false, "executed": false, "exitCode": -1, "stderr": "Build failed", "stdout": "", "timedOut": false }, "seconds": 0.51, "sourceSha256": "fb5433f733b3100b1ff8fdda429c59360e3ccfbc4eea8205c0fbb6c0ae3265f6", "stdin": "" }