Description
Are you familiar with racket -y
? I understand that it basically compiles not only the file supplied as an argument, but also any modules in the dependency chain (and just those modules and nothing extra) that have been modified since they were last compiled (the "y", according to the official docs, stands for -y, --make Yes, enable automatic update of compiled files
😄 ). I find it to be a reliable way to run any module and be sure that it reflects the actual current behavior including all upstream changes, without having to manually recompile a lot of stuff.
Would it make sense for racket-run
to exhibit this kind of -y
behavior by default, or potentially via a defcustom
, or a separate command like racket-update-and-run
? (Or is there already a way to do this? I didn't immediately see anything in the docs. edit: @soegaard on Discord kindly pointed out what appears to be the place in the source where files are run, but we didn't know what exactly this implies re: compilation of modules).
Ever since learning about racket -y
, I've actually been assuming that racket-run
already uses it, as it seems to take more time to run the buffer when an upstream module has been changed, but thinking again, that delay is likely due to Racket determining that the compiled version of the upstream code is stale, and falling back to using the uncompiled modules (without recompiling them). But in today's Qi meeting we noticed that modifying an upstream module and then racket-run
ing the downstream one wasn't actually resulting in the change being picked up. But running racket -y <module>
at the command line did reflect the changes.
Using -y
would likely also end up addressing the delay with racket-run
ning modules with changed module dependencies, as it should end up recompiling those modules instead of falling back to the uncompiled ones.