aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp/interpreter.go
diff options
context:
space:
mode:
authorDan Kegel <[email protected]>2022-01-19 15:11:46 -0800
committerRon Evans <[email protected]>2022-01-20 10:07:48 +0100
commitb85cb55aabea8fc8f042f72e4ae0aaaed2a6cd6d (patch)
tree317473934116027805422425731ff4eebce58cb7 /interp/interpreter.go
parent03d83181caac13eb0703465e5ffdb040a0a2efe1 (diff)
downloadtinygo-b85cb55aabea8fc8f042f72e4ae0aaaed2a6cd6d.tar.gz
tinygo-b85cb55aabea8fc8f042f72e4ae0aaaed2a6cd6d.zip
interpreter.go: double timeout to let a real world project build. Waiting is a bit less frustrating with breadcrumbs.
Diffstat (limited to 'interp/interpreter.go')
-rw-r--r--interp/interpreter.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/interp/interpreter.go b/interp/interpreter.go
index 17ae02df7..64bb060d8 100644
--- a/interp/interpreter.go
+++ b/interp/interpreter.go
@@ -108,9 +108,10 @@ func (r *runner) run(fn *function, params []value, parentMem *memoryView, indent
// Provide some breadcrumbs for user trying to find their slow init functions.
fmt.Fprintln(os.Stderr, "interp: slow: startms", int(t0.Milliseconds()), "endms", int(t1.Milliseconds()), "func", fn.name)
}
- const maxInterpSeconds = 90
+ const maxInterpSeconds = 180
if t0 > maxInterpSeconds*time.Second {
- // Running for more than maxInterpSeconds seconds. This should never happen.
+ // Running for more than maxInterpSeconds seconds. This should never happen, but does.
+ // See github.com/tinygo-org/tinygo/issues/2124
return nil, mem, r.errorAt(fn.blocks[0].instructions[0], fmt.Errorf("interp: running for more than %d seconds, timing out (executed calls: %d)", maxInterpSeconds, r.callsExecuted))
}