* Get rid of the concept of `modspec': `getarg' now has `require' for
require specs and `module' for a module name (the latter is what all
previous uses of 'modspec except for ,require really needed); command
descriptions use "<require-spec>" and "<module>", documentation
adjusted as well.
* `module-name?' etc turn to `known-module' and `known-module-name',
with a saner behavior, and tests to keep it sane.
* This cleans up a lot of things. Two specific points: ,switch works
better with toplevel-defined modules (see the corresponding change in
the test suite), and also fixes PR 12148.
* Ensure that ,sh commands return void.
* Add tests for ,r with non-atomic require spec, and for use of $F in
,sh commands.
* Improved the test suite, including uses of `module+' so each file can
be run by itself to perform a subset of the tests.
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.
Set `current-load-relative-directory' to the path of the module file so
paths that it resolves in the description (in `describe-modeul') are not
bogus.