From b85cb55aabea8fc8f042f72e4ae0aaaed2a6cd6d Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Wed, 19 Jan 2022 15:11:46 -0800 Subject: [PATCH] interpreter.go: double timeout to let a real world project build. Waiting is a bit less frustrating with breadcrumbs. --- interp/interpreter.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interp/interpreter.go b/interp/interpreter.go index 17ae02df..64bb060d 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)) }