Closed haji-ali closed 1 year ago
I'm fine with this solution. I don't necessarily think it is a good idea to try to run with --no-local
, because it is important to byte-compile the local init-file, as well.
It would probably be better, to be honest, to make the output check more intelligent, so that it only fails on actual errors or critical warnings.
I wonder what's up with that compilation error in Emacs 27?
Okay, it was somehow a flake, I guess. I re-ran the action and it passed.
I don't necessarily think it is a good idea to try to run with
--no-local
, because it is important to byte-compile the local init-file, as well.
I see. I was under the impression that the emacs instance being called in byte-compile.bash
doesn't actually need the local configuration to be loaded to compile said configuration (and embed them in radian.el
). Perhaps I am missing something.
Anyways, thanks for the merging this change.
It might be possible to arrange for the local configuration to be byte-compiled without loading it, but the general assumption is that code is loaded before it's byte-compiled. Otherwise some odd things can happen, which require additional care to make sure they work.
In my init file, I sometimes output some helpful messages (mostly diagnostics) which cause Radian's make file to fail since it considers any output in the compilation process an error.
There are two ways to solve this:
Adding a flag (like I do in this pull request) and then testing for it in my config whenever I output a message in my init file (Note that testing for
byte-compile-current-file
doesn't help since the issue is with the emacs instance running the compilation function).A more elegant solution, I think, would be to run the emacs process in
byte-compile.bash
with--no-local
. However, there are a couple issues with--no-local
which make it unusable (at least for me). The first is that packages are automatically pruned (which can be fixed easily) and the other issue is that--no-local
doesn't even run thebefore-straight
hook which is necessary in my case to set the correct paths likestraight-*-dir
andno-littering-*-directory
,radian-disabled-packages
andstraight-recipe-overrides
. Perhaps--no-local
or a similar flag should be defined so thatbefore-straight
is run but notafter-init
.