Description
This is re a post made on the mailing list recently (cc @nineluj) by a student in my class who is trying to use racket-mode
with Emacs.
The problem is that the modules that are generated by the class language(s) don't have a test
submodule, and instead tests are just toplevel expressions. (The reason for that is that it predates submodules, and I don't have enough time to allocate to reorganizing the languages and the surrounding machinery to all switch to submodules.) However, it looks like it should be relatively easy to make such a situation work: IIUC, racket-run
(after the recent 5226366) will run a main
submodule, and if that's not present, it will run the module itself --- but it does not include coverage information. OTOH, racket-test
can do that, but it is hard-wired to running the test
submodule.
Would it be possible to make racket-test
run the module itself when there is no test
submodule in an analogous way to racket-run
& main
? That would make it be useful in cases where there is no test
module. If not, then maybe a custom option that can make it try the module itself rather than the submodules? And another option would be to add the option of coverage information for racket-run
too? (I'd try patching it myself, but I couldn't figure out the details.)
FWIW, I managed to make the languages add a (module+ test)
at the end, which made it possible to use racket-test
and see the coverage results, but the REPL that you get after that is in the context of the test submodule, and probably due to low-level games with typed-racket, the resulting repl is useless (has no type information).
(BTW, the package that is used is in the old archive format, it can be installed with raco -DA
.)