jwiegley / emacs-async

Simple library for asynchronous processing in Emacs
GNU General Public License v3.0
837 stars 68 forks source link

Black list for async-bytecomp-package #108

Open seagle0128 opened 5 years ago

seagle0128 commented 5 years ago

Hi, Thanks for the amazing package!

I have an idea for async-bytecomp-package-mode. Since async-bytecomp-allowed-packages is like a white list, can you provide a black list as well, please? Recently I encountered some issue after async-bytecomp magit-todos package, I recompile it by disabling sync-bytecomp-package-mode, it worked again. I have no idea of the root cause, but a black list should help these cases, at least is a workaround.

thierryvolpiatto commented 5 years ago

Vincent Zhang notifications@github.com writes:

Hi, Thanks for the amazing package!

I have an idea for async-bytecomp-package-mode. Since async-bytecomp-allowed-packages is like a white list, can you provide a black list as well, please? Recently I encountered some issue after async-bytecomp magit-todos package, I recompile it by disabling sync-bytecomp-package-mode, it worked again. I have no idea of the root cause,

I think the root cause is that you have to recompile the dependencies first (and restart emacs to unbound old macros) and then recompile your package. The problem disapear when you compile synchronously because the old functions/macros are still loaded.

but a black list should help these cases, at least is a workaround.

No it would not help, it would just hide your main problem.

-- Thierry

seagle0128 commented 5 years ago

I think the root cause is that you have to recompile the dependencies first (and restart emacs to unbound old macros) and then recompile your package.

Could you let me know how to do that with async-bytecomp-package?

The problem disapear when you compile synchronously because the old functions/macros are still loaded.

But after restarting Emacs it still does work if I recompile it synchronously.

thierryvolpiatto commented 5 years ago

Vincent Zhang notifications@github.com writes:

I think the root cause is that you have to recompile the dependencies first (and restart emacs to unbound old macros) and then recompile your package.

Could you let me know how to do that with async-bytecomp-package?

(async-byte-recompile-directory "/path/to/your/package")

If you use Helm, you can use M-x helm-list-elisp-packages-no-fetch and use the action "Recompile package".

The problem disapear when you compile synchronously because the old functions/macros are still loaded.

But after restarting Emacs it still does work if I recompile it synchronously.

It probably works as it was working before update i.e. with the old libraries, but it may not work at all if a new macro is involved in the new changes.

-- Thierry