benchmark-init-el
benchmark-init-el copied to clipboard
Fixing "function might not be defined at runtime" errors.
Without this, I get the following errors when depending on this package:
Error: the function "benchmark-init/node-root-p" might not be defined at runtime. Error: the function "benchmark-init/node-duration-adjusted" might not be defined at runtime. Error: the function "benchmark-init/flatten" might not be defined at runtime.
This error is accurate as the eval-when-compile does not force the require during a normal load.
See the official docs on eval-when-compile
, which say (emphasis added)
If you’re using another package, but only need macros from it (the byte compiler will expand those), then eval-when-compile can be used to load it for compiling, but not executing.
In this case, the mentioned items are functions, not macros and do need to be defined during runtime.
@dholm, can you please take a look at this?
Thank you @chaosemer, merged. Sorry for the delay.