arnested / drupal-mode

Advanced Emacs minor mode for Drupal development
https://melpa.org/#/drupal-mode
GNU General Public License v3.0
31 stars 14 forks source link

Failing installs via MELPA #80

Open danepowell opened 7 years ago

danepowell commented 7 years ago

I'm running Emacs 25 on Mac OS X. I'm trying to install drupal-mode by simply running M-x, package-install, drupal-mode.

It seems that all of drupal-mode's "optional" dependencies are actually required when installed this way, as the install fails with a lot of errors about missing dependencies. I was able to resolve a few of them by installing flymake-phps, ggtags, php-mode, and others (deleting the drupal-mode directory in the .emacs.d/elpa folder each time), but I still can't figure out how to resolve this:

helm-gtags.el:28:1:Error: Cannot open load file: No such file or directory, helm-gtags

gtags.el:28:1:Error: Cannot open load file: No such file or directory, gtags

xendk commented 7 years ago

Something is definitely off there. Those files are only supposed to be loaded if you already have their dependencies loaded. To take one example, in drupal-mode.el:

(eval-after-load 'helm-gtags '(require 'drupal/helm-gtags))

Causes the helm-gtags support to only be loaded after helm-gtags has been loaded.

Do you see other references to helm-gtags in the drupal-mode directory apart from that and the file itself?

danepowell commented 7 years ago

Yeah that's what I figured, I just can't understand why Emacs would be trying to load them even though they're not present. But I'm completely new to the built-in packaging system.

If I run grep -ri "helm" . on the .emacs.d/elpa/drupal-mode* directory, the only hits are the line you mentioned in drupal-mode.el, drupal-mode.elc (presumably the same thing but compiled), and drupal/helm-gtags.el (obviously).

danepowell commented 7 years ago

I can reproduce this error even after completely emptying out my .emacs.d directory except for init.el, which contains just this:

(require 'package) ;; You might already have this line
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line
xendk commented 7 years ago

Tried installing it via list-packages instead? Doubt it makes much difference though.

Tried installing other packages? expand-region and smartparens seems to have a bunch of eval-after-loads too.

Hope @arnested has better ideas.

danepowell commented 7 years ago

list-packages behaves no differently.

I am able to install expand-region and smartparens just fine.

Does emacs store configuration anywhere other than ~/.emacs.d? I'm just trying to figure out what could possibly be misconfigured on my machine, if anything.

One thing is that Mac installs a very old version of emacs by default (I think 22). I updated it to 25 via Homebrew. Could it be conflicting with the older version somehow?

xendk commented 7 years ago

Odd indeed.

Does emacs store configuration anywhere other than ~/.emacs.d?

Emacs doesn't really store configuration as such, per default it loads ~/.emacs/~/.emacs.el/~/.emacs.d/init.el and places like /usr/share/emacs/site-lisp, but it tries to keep versions separate.

I'm on Linux, so I don't know much about homebrew, @arnested would know more about that.

arnested commented 7 years ago

I'll take a look later. Weird problem.