nim-lang / nim-mode

An emacs major mode for the Nim programming language
139 stars 46 forks source link

Melpa nim-mode <> flycheck-nimsuggest dependency issue #187

Closed kaushalmodi closed 6 years ago

kaushalmodi commented 7 years ago

Conforming Bugs

Please tell us below:

And describe your problem:

Debugger entered--Lisp error: (error "Unable to activate package ‘flycheck-nimsuggest’.
Required package ‘nim-mode-0.4.1’ is unavailable")
  signal(error ("Unable to activate package ‘flycheck-nimsuggest’.\nRequired package ‘nim-mode-0.4.1’ is unavailable"))
  error("Unable to activate package `%s'.\nRequired package `%s-%s' is unavailable" flycheck-nimsuggest nim-mode "0.4.1")
  package-activate-1([cl-struct-package-desc flycheck-nimsuggest (20171025 135) "flycheck backend for Nim using nimsuggest" ((flycheck (0 23)) (nim-mode (0 4 1)) (emacs (24 3))) nil nil "/home/kmodi/.emacs.d/elpa_25/flycheck-nimsuggest-20171025.135" ((:url . "https://github.com/yuutayamada/flycheck-nimsuggest") (:commit . "b0b094874d4759224174eaacee1d210a181f6f55")) nil] nil deps)
  package-activate(flycheck-nimsuggest)
  package-initialize()
  eval-buffer(#<buffer  *load*-851140> nil "/home/kmodi/.emacs.d/setup-packages.el" nil t)  ; Reading at buffer position 4044
  load-with-code-conversion("/home/kmodi/.emacs.d/setup-packages.el" "/home/kmodi/.emacs.d/setup-packages.el" nil t)
  load("~/.emacs.d/setup-packages.el" nil :nomessage)
  eval-buffer(#<buffer  *load*> nil "/home/kmodi/.emacs.d/init.el" nil t)  ; Reading at buffer position 6862
kaushalmodi commented 7 years ago

Workaround was to remove nim-mode dependency from flycheck-nimsuggest:

Editted flycheck-nimsuggest-pkg.el to be this (removed the (nim-mode "0.4.1") form):

;;; -*- no-byte-compile: t -*-
(define-package "flycheck-nimsuggest" "20171025.135" "flycheck backend for Nim using nimsuggest" '((flycheck "0.23")  (emacs "24.3")) :commit "b0b094874d4759224174eaacee1d210a181f6f55" :url "https://github.com/yuutayamada/flycheck-nimsuggest")

I believe you've got a circular dependency issue here.. just make nim-mode depend on flycheck-nimsuggest (not the other way around too).

yuutayamada commented 7 years ago

thanks @kaushalmodi I've updated flycheck-nimsuggest (might take awhile MELPA is updated though)

kaushalmodi commented 6 years ago

Thanks. I confirm the fix.