Infinite loop during installation
fr3fou opened this issue · comments
Simo commented
After setting up my ci.yaml
here - https://github.com/fr3fou/methor/blob/main/.github/workflows/ci.yaml and running the CI, I encounter an infinite loop (?) during the setup phase, causing the CI to time out
https://github.com/fr3fou/methor/runs/1379017245
The output is just non-stop "0"
Axetroy commented
import { evalExp, expression } from "./math.ts";
async function main() {
const p = expression();
while (true) {
const input = await prompt("> ");
console.log(evalExp(p(input)[0][0]));
}
}
async function prompt(message: string) {
const buf = new Uint8Array(1024);
await Deno.stdout.write(new TextEncoder().encode(message));
const n = <number> await Deno.stdin.read(buf);
return new TextDecoder().decode(buf.subarray(0, n)).trim();
}
main();
This is because your code has an infinite loop.
The process never exits, and finally caused a timeout.
This is not caused by setup-deno.
Simo commented
Thanks! My bad, I was looking at the wrong step