I took the opportunity to upgrade to Racket v8.8 (from v8.7). I'm using macOS Monterey 12.6.3. I dragged the Racket v8.8 folder from the .dmg into the /Applications/Tools-Developer folder on my hard drive. I double-clicked the DrRacket.app icon and saw this:
Ah, the problem here is not related to Quickscript that I previously suggested. Rather, it’s a combination of two things:
You previously used #lang br in DrRacket on the version 8.7. DrRacket helpfully remembers the most recently used #lang in ~/Library/Preferences/org.racket-lang.prefs.rktd, so that when you open a new empty buffer, the #lang will automatically be placed for convenience.
When you open a new empty buffer, the program will be run immediately. This is so that the REPL is loaded with the #lang environment, allowing you to use the REPL right away.
The issue is that after you freshly install the version 8.8, #lang br wouldn’t be installed yet, so when you open DrRacket, the automatic running causes the failure that you saw.
The heuristics to run a new empty buffer to load a #lang seems problematic to me. It has caused many other issues before. See https://github.com/mbutterick/pollen/issues/268 and https://github.com/racket/drracket/issues/555. I think it would be nice to revisit the heuristics and see if it’s actually needed, or if there’s anything we can do in a more principled manner.
The goal is to get an interactions window that doesn't error (and isn't #lang racket/base or something like that) without having to run the program. I'm happy to try other approaches, for sure.
I would still very much like this behavior to be something that is opted into and controlled at the #lang level. I find it annoying, to put it bluntly. When I want code to run I will run it.
That’s… even more heuristics. Though my biggest gripe is that currently DrRacket hard codes Pollen as an exception for the automatic running, which… doesn’t seem like the Right Thing(tm) to do. I would hope for a more extensible approach, along the line that @joeld mentioned.
To meet the goal of having a working interactions window at startup, would another workable solution be to to the following as part of installation? or on a prompt the first time DrRacket is started?
Configure Command Line for Racket...
Detect the previous installed version
If previous version exists run raco pkg migrate < previous installed version>
Assuming Configure Command Line has side effects like writing to
shell configuration files or similar, I would (personally) not want
that to happen automatically.