cabbage icon indicating copy to clipboard operation
cabbage copied to clipboard

WIP Replace flymake with flycheck

Open tonini opened this issue 9 years ago • 12 comments

tonini avatar Nov 26 '14 08:11 tonini

just checked out the branch and ran scripts/update.sh. Can't boot up Emacs anymore. I'm left with:

Debugger entered--Lisp error: (file-error "Cannot open load file" "no such file or directory" "dash")
  require(dash)
  eval-buffer(#<buffer  *load*-445247> nil "/Users/senny/Projects/cabbage/vendor/flycheck/flycheck.el" nil t)  ; Reading at buffer position 1893
  load-with-code-conversion("/Users/senny/Projects/cabbage/vendor/flycheck/flycheck.el" "/Users/senny/Projects/cabbage/vendor/flycheck/flycheck.el" nil t)
  require(flycheck)
  (progn (add-to-list (quote load-path) library-dir) (require library))
  (if (and library-dir (file-directory-p library-dir)) (progn (add-to-list (quote load-path) library-dir) (require library)))
  (let* ((library-dir (cabbage-vendor-library-dir library))) (if (and library-dir (file-directory-p library-dir)) (progn (add-to-list (quote load-path) library-dir) (require library))))
  cabbage-vendor(flycheck)
  eval-buffer(#<buffer  *load*-42617> nil "/Users/senny/Projects/cabbage/bundles/flycheck/bundle.el" nil t)  ; Reading at buffer position 27
  load-with-code-conversion("/Users/senny/Projects/cabbage/bundles/flycheck/bundle.el" "/Users/senny/Projects/cabbage/bundles/flycheck/bundle.el" t nil)
  load("/Users/senny/Projects/cabbage/bundles/flycheck/bundle" t)
  (while --dolist-tail-- (setq bundle-path (car --dolist-tail--)) (load bundle-path t) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- (cabbage--bundle-path bundle)) bundle-path) (while --dolist-tail-- (setq bundle-path (car --dolist-tail--)) (load bundle-path t) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (progn (let ((--dolist-tail-- (cabbage--bundle-path bundle)) bundle-path) (while --dolist-tail-- (setq bundle-path (car --dolist-tail--)) (load bundle-path t) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  cabbage--load-bundle-internal(flycheck)
  (let ((bundle-name (cabbage--bundle-name bundle))) (if (member bundle-name cabbage--deprecated-bundles) (progn (warn (concat "the bundle '" bundle-name "' is deprecated. We are planning to remove the bundle in future versions of cabbage")))) (cabbage--load-bundle-internal bundle))
  cabbage-load-bundle(flycheck)
  cabbage-flycheck-init()
  (progn (cabbage-flycheck-init) (add-hook (quote erlang-mode-hook) (quote flycheck-mode)) (add-hook (quote erlang-mode-hook) (quote cabbage-flycheck-keybindings)))
  (if (cabbage-flycheck-active-p) (progn (cabbage-flycheck-init) (add-hook (quote erlang-mode-hook) (quote flycheck-mode)) (add-hook (quote erlang-mode-hook) (quote cabbage-flycheck-keybindings))))
  eval-buffer(#<buffer  *load*-816965> nil "/Users/senny/Projects/cabbage/bundles/erlang/bundle.el" nil t)  ; Reading at buffer position 798
  load-with-code-conversion("/Users/senny/Projects/cabbage/bundles/erlang/bundle.el" "/Users/senny/Projects/cabbage/bundles/erlang/bundle.el" t nil)
  load("/Users/senny/Projects/cabbage/bundles/erlang/bundle" t)
  (while --dolist-tail-- (setq bundle-path (car --dolist-tail--)) (load bundle-path t) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- (cabbage--bundle-path bundle)) bundle-path) (while --dolist-tail-- (setq bundle-path (car --dolist-tail--)) (load bundle-path t) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (progn (let ((--dolist-tail-- (cabbage--bundle-path bundle)) bundle-path) (while --dolist-tail-- (setq bundle-path (car --dolist-tail--)) (load bundle-path t) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  cabbage--load-bundle-internal(erlang)
  (let ((bundle-name (cabbage--bundle-name bundle))) (if (member bundle-name cabbage--deprecated-bundles) (progn (warn (concat "the bundle '" bundle-name "' is deprecated. We are planning to remove the bundle in future versions of cabbage")))) (cabbage--load-bundle-internal bundle))
  cabbage-load-bundle(erlang)
  (while --dolist-tail-- (setq bundle (car --dolist-tail--)) (cabbage-load-bundle bundle) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- cabbage-bundles) bundle) (while --dolist-tail-- (setq bundle (car --dolist-tail--)) (cabbage-load-bundle bundle) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (progn (let ((--dolist-tail-- cabbage-bundles) bundle) (while --dolist-tail-- (setq bundle (car --dolist-tail--)) (cabbage-load-bundle bundle) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  eval-buffer(#<buffer  *load*-742637> nil "/Users/senny/Projects/cabbage/cabbage.el" nil t)  ; Reading at buffer position 1552
  load-with-code-conversion("/Users/senny/Projects/cabbage/cabbage.el" "/Users/senny/Projects/cabbage/cabbage.el" nil nil)
  load("/Users/senny/Projects/cabbage/cabbage")
  eval-buffer(#<buffer  *load*> nil "/Users/senny/.emacs.d/init.el" nil t)  ; Reading at buffer position 1221
  load-with-code-conversion("/Users/senny/.emacs.d/init.el" "/Users/senny/.emacs.d/init.el" t t)
  load("/Users/senny/.emacs.d/init" t t)
  #[0 "\205\262

senny avatar Nov 26 '14 10:11 senny

I just want to push a WIP branch. :-)

tonini avatar Nov 26 '14 10:11 tonini

But I see whats the problem is. Because we just add package to vendor we would like to use, we have to add the dependencies by our self. package would solve these dependencies for use via package-install.

Maybe we should think about that. Why do we lock packages via vendor? What would happened if we just work with package itself instead adding them as submodule. etc

tonini avatar Nov 26 '14 10:11 tonini

We decided to use vendored library to have full control over our dependencies. This allows us to keep them in sync and provide a known-working-state. You could probably achieve this by relying on package versions and dependency specifications but at the time when we started with cabbage, no package manager offered the needed flexibility.

senny avatar Nov 26 '14 13:11 senny

I really understand this point, maybe we could go with MELPA STABLE and pin specific packages to always get tagged packages from MELPA STABLE.

tonini avatar Nov 26 '14 15:11 tonini

@senny What do you think about the idea if we go with Cask and pinned packages? https://github.com/cask/cask/issues/252

I know its a emacs 24.4 feature, but to be honest, people really should update, I mean REALLY. emacs 24.4 is in a really good shape.

tonini avatar Nov 29 '14 08:11 tonini

to be honest, this is not something I'd consider at this point. I don't want force cabbage users to to upgrade their Emacs at all times. A good amount of co-workers (including me) are still on 24.3. I like consistency in my Editor and every upgrade brings some changes one has to adapt to.

Besides that, I'm not eager to move away from the submodule approach we have at the moment. It allows for precise control of what works together. In my experience what we have now works very well. I'd rather not depend on an external package for the backbone of this project.

The experience cabbage should provide is:

  • works out of the box with close to no configuration
  • a stable working environment
  • sane defaults for external packages
  • get out of your way when you want to customize Emacs further

@tonini I hope this makes any sense.

senny avatar Nov 29 '14 10:11 senny

@senny Thanks for this great explanation. :-)

I really see and understand your point, so let's talk about some dependencies we have with flycheck. :-)

The following packages are dependencies which we have to resolve.

  • dash https://github.com/magnars/dash.el
  • pkg-info https://github.com/lunaryorn/pkg-info.el

tonini avatar Dec 01 '14 05:12 tonini

@tonini Is there anything preventing us from vendoring those in?

senny avatar Dec 01 '14 07:12 senny

@senny Not at all, I just wanted to hear a GO before vendoring them UP ;-)

tonini avatar Dec 01 '14 07:12 tonini

GO :checkered_flag:

senny avatar Dec 01 '14 07:12 senny

@senny I'm working on it, had a little break last week. :-)

tonini avatar Dec 08 '14 09:12 tonini