Infinite loop while using run-txexpr/imperative!
I was just trying run-txexpr/imperative! and ran into an issue (confirmed with racket 7.5 and 7.7)
$ racket
> (require polyglot)
> (run-txexpr/imperative! '((script ((type "application/racket") (id "main")) "\n#lang racket/base\n(write `(p ,(format \"Today is ~a\" (date->string (current-date)))))")))
exception raised by error display handler: flush-output: output port is closed; original exception raised: flush-output: output port is closed
exception raised by error display handler: flush-output: output port is closed; original exception raised: flush-output: output port is closed
...
And it goes into infinite loop with that message.
Yep, that's a bug. I didn't expect that the error display handler would still try to use pipe ports after failing to instantiate a module.
First: Let's get you unblocked. Add the missing (require racket/date) to your script to get desired output. I should have a solution for this today.
Ah - I see what's going on. This is going to enter an infinite loop if the script fails to load properly... Thanks.
Cool! It works as I expected, now lets try to make the racket script slightly more complex.