#lang htdp/bsl doesn't show coverage info

I've been transitioning my classes this year to use #lang htdp/bsl instead of picking a language under the menu.

But I've just noticed that doing this prevents DrRacket from screaming at them about code missing coverage. ("It's orange and black, like Halloween, and it's even more scary!")

Is this an oversight, a limitation we get from using a #lang line, or something else? And is there any way to activate the lack of coverage other than switching back to the Language menu?

Thanks,
Todd

In the language dialog, show the details:

Then enable "Syntactic test suite coverage" under "Dynamic Properties".

It isn't on by default but you can enable it in the language dialog:

  • language | choose language ... menu item
  • show details (if not shown already)
  • click "syntactic test suite coverage" (upper right)

Thanks very much! I'll have to tell students to do this on their home computers.

However, is there any way I can set this as a default on all the students' accounts in my lab? Some line I could set in everybody's ~/.config/racket/racket-prefs.rktd file or something?

Yes, it would be saved in the preferences. I believe it is the key plt:framework-pref:drracket:language-settings, but I recommend you test it out to be sure!

Why are debugging and profiling and the syntactic test suite coverage mutually exclusive options?

Probably they're misnamed. When syntactic test-suite coverage is turned on, you're also getting errortrace's normal good stack trace stuff happening.

1 Like

I've made a pull request (probably not to be merged until after the release code is set so we have a full release cycle to play with it via nightly builds) that lets the #lang-based teaching languages specify what default errortrace annotations they get (upshot: the teaching languages can, by default, have test coverage enabled).

If you want to try it out, you'll need to get the code on this branch in my fork of the DrRacket repo also need to make this change in the htdp source:

diff --git a/htdp-lib/htdp/bsl/reader.rkt b/htdp-lib/htdp/bsl/reader.rkt
index 3d622e90..20c051b2 100644
--- a/htdp-lib/htdp/bsl/reader.rkt
+++ b/htdp-lib/htdp/bsl/reader.rkt
@@ -43,5 +43,7 @@
     [(drracket:show-big-defs/ints-labels) #t]
 
     [(documentation-language-family) "HtDP"]
+
+    [(drracket:default-instrumentation) 'test-coverage]
     
     [else (use-default key default)]))

(let me know if you want advice on how to do try it out; alternatively, it should be in the snapshot builds a few days after the release branches get created)