Previously, when trying to `enter!' into a module, an exception would
abort the whole thing, leaving the repl where it was. This behavior can
be very confusing:
> (module foo racket/base (define x 123) (error "bleh!"))
> (enter! 'foo)
bleh!
> x
reference to undefined identifier: x
> (enter! 'foo)
> x
123
Things are a little better with xrepl, since the prompt always indicates
the module that you're in. Still, it's unfortunate that a module with
an error is more likely to be something you'd want to debug -- and most
people are likely to miss the fact that entering a second time will work.
So make `enter!' catch exceptions when requiring the module, change the
namespace, and then re-raise the exception so the user sees it and is
left in the expected namespace.
Related to the already fixed PR 12114 and PR 12133, which motivated the
error, and a few additional typos of the same kind.
(Note that it uses the symbols, but that's how they'll render anyway.)
Since that requires `racket/draw', which requires libcairo, which is
missing on some build machines. It might be needed in the future, but
for now it's better to make it easier to add build machines.
Ports must be forced closed in the case of kill a place,
and the existing code takes care of that.
The Windows fix is especially needed for the new places port
handling, but it turns out that the console handlign was broken for
places anyway.
Finalization for a place channel used a recursive, non-atomic
function, which meant that a thread switch could happen during
place-channel finalization, leaving the new thread with the
master GC and generally confused. (The random-message test
found the bug right away on my machine.)
We already have a non-recursive, non-atomic function to traverse
place messages, so collapse all modes into that one implementation.
Along the way, problems with empty structs (found by random tester)
and checking of file descriptors (test added) also fixed.
Use `continuation-mark-set-first', instead.
Also, re-enable bytecode for Racket code that is built into
the binary, which had been left disabled accidentally.
The recent addition of a shared table of names for shared code
caused bad performance on some machines (such as Robby's)
due to the lock on the table. The lock dosn't seem to be necessary
for platforms where places are supported, though.