New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package update trouble #617
Comments
michael-heerdegen notifications@github.com writes:
This is indeed the problem.
Yes, in many places probably. (eval-when-compile (require '...)) Thierry |
I think require is not sufficient, since in the bad case, the feature is already loaded, and require won't do anything. That's why I suggested load. |
michael-heerdegen notifications@github.com writes:
I didn't dig fully into that, but I think we will break autoloads and Thierry |
Thierry Volpiatto notifications@github.com writes:
Why do you think so? We would do this only when compiling. Compiling autoloads are IMHO not related.
The problem does also appear without using the package manager when I could be quite easy: just reload every library of the package that Better would probably to recompile in a sane environment (using a But yes, it's not cool to have to fix this per package. I have the feeling that this already has been discussed at emacs.devel |
michael-heerdegen notifications@github.com writes:
Yes you are right this happen only at compile time.
Of course.
No I don't want to enter into such complications.
It is what the defadvice in the FAQ does.
Yes, it's a pain to fix this per package.
Dunno. Thierry |
Thierry Volpiatto notifications@github.com writes:
I meant package.el, not Helm ;-)
I'll try to find it. |
michael-heerdegen notifications@github.com writes:
The defadvice is affecting package.el not helm.
Thanks. Thierry |
This issue and related problems were discussed broadly in bug#10125: https://lists.gnu.org/archive/html/emacs-orgmode/2011-11/msg00844.html Summary: everybody knows about the problems, but it's tricky to fix this satisfactorily. I don't expect that this will be fixed in Emacs soon. I don't think it has a high priority, so this may take years. |
I had a look how other large projects handle this problem. org doesn't treat the problem at all AFAICT. Icicles does, I remember that I was involved in working on that issue. We had the advantage that all macros were located in one file ("icicles-mac"), and we decided to force a reload when compiling. We ended up with this:
That at least shows that it is possible to treat this problem from out of the package. |
michael-heerdegen notifications@github.com writes:
We have actually 44 files and I don't want to enter in these troubles.
We can do much better.
See our FAQ (It seems you didn't look at the actual fix). Actually helm is using emacs-async to copy/rename etc... files from Thierry |
Thierry Volpiatto notifications@github.com writes:
I tried it only quickly. But if it is stable and reliable enough, and
This sounds like a really good idea! |
michael-heerdegen notifications@github.com writes:
I am one of the maintainer of emacs-async, so I can ensure this code
I have improved the code to handle better errors, you can try it if you https://github.com/thierryvolpiatto/emacs-tv-config/blob/master/tv-utils.el#L816 You can try it like this: (async-byte-recompile-directory "~/tmp/helm" 0 t) Add error to a helm file (e.g remove some parens) and async byte recompile directory. Thierry |
At first, I noticed that after compiling tv-utils.el, the compiled code includes a hardcoded absolute path. It was put there by async-start. See jwiegley/emacs-async#33. |
Have tried it now. Works like a charm! |
Now I have repaired async.el and async-bytecomp.el, I think we can use this as dependency. |
BTW hope I did the right thing to add dependency for async in helm-pkg.el |
Looks it is working fine now helm have async as dependency, we will see in the future how helm and other packages are upgrading when using async-bytecomp. |
Fine, thanks so far. |
Since we have no more bug reports about this since we switch to async, I am closing this. |
Hi,
I must admit that it can be kind of surprising for users that updating helm via package manager can lead to a broken installation. The behavior is something one might not expect from sanity of reason, or from experience with other package managers. So I can a bit understand that some people are not aware of that problem, although it's well documented. I too use bash and apt and didn't read all of it's manual.
I wonder it we can improve the situation - sorry if this was discussed before.
What's the underlying problem? I guess the problem is that require doesn't reload the new versions of libraries, so that macros are expanded based on outdated code while compiling, which is fatal.
Would it make help to add something like
to force an explicit reload when compiling?
The text was updated successfully, but these errors were encountered: