syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

Package Gets Deleted After Reloading Spacemacs #864

Closed ranjitjhala closed 9 years ago

ranjitjhala commented 9 years ago

I'm getting a weird error (I think it has to do with the upgrade to 0.64/0.65 but not sure, can revert to older versions to confirm). Here is the issue.

I wrote a (private) layer that has an extension that depends on the button-lock.el package. Now, when I activate the layer, it does the right thing -- downloads the package, and everything works fine. But when I exit emacs, and restart, it says "cannot find package 'button-lock'" (and so the layer doesn't work properly.)

Warning (initialization): An error occurred while loading `/Users/rjhala/.emacs.d/init.el':

File error: Cannot open load file, no such file or directory, button-lock

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

However, if I now remove the layer (by removing it from .spacemacs) and restart then it removes the package, such that if I then add it back in, again it works.

TLDR the package/layer works fine the first time, and then misbehaves. I can delete it and restore it and AGAIN it works fine, but thats not very nice.

The code for the layer is at:

https://github.com/ucsd-progsys/liquid-types-spacemacs

that repo also has the log obtained by running with --debug-init. This is running emacs the second time -- the first time after adding the layer everything works just fine. After restarting it cannot find button-lock (even though it was installed the first time) and so the liquid-tip extension doesn't work (the flycheck-liquid extension is still fine.)

And, as I mentioned earlier, the following steps get it to work again:

  1. remove the layer from .spacemacs
  2. restart so it deletes the package button-lock
  3. add the layer back into .spacemacs
  4. restart again so it re-installs the package button-lock
syl20bnr commented 9 years ago

Thank you, I'll look into it.

ranjitjhala commented 9 years ago

Dear @syl20bnr -- I upgraded to the latest version 0.101.1 -- and this problem seems to be solved! Thanks!