raco make --force vs. direct source loading for stale module caches
0 reputation · 02 Sept 2026, 02:14 UTC
Racket utilizes compiled .zo files to accelerate module loading. However, when source files are modified, the system may continue to load the outdated bytecode from the cache rather than the updated source code.
There are two primary methods to ensure the most recent code is executed during development:
- Using
raco make --forceto explicitly regenerate the compiled bytecode for the collection. - Bypassing the cache entirely by using
(require "path/to/file.rkt")to load the source file directly.
The trade-off involves balancing the startup performance of compiled bytecode against the development velocity of automatic source loading, especially in larger projects where full recompilation is time-consuming.
Technical Constraints
Manual cache invalidation requires external tool invocation, while direct source loading may increase memory overhead and startup latency.
Which approach is more sustainable for a large-scale project requiring frequent iterations? Are there documented configurations to automate cache invalidation based on source timestamps?