emacs-php / php-runtime.el

PHP-Emacs bridge, call PHP function from Emacs
GNU General Public License v3.0
8 stars 2 forks source link

Bug: cl-assert Error Related to EIEIO #4

Open ejmr opened 7 years ago

ejmr commented 7 years ago

When I try to compile the package I get this error:

Debugger entered--Lisp error: (cl-assertion-failed ((not (symbolp body)) nil))
  cl--assertion-failed((not (symbolp body)))
  eieio--defalias(php-runtime-run nil)
  byte-code("\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\300\307\302\307\303\"\"\210\304\307\303\305\310$\210\300\311\302\311\303\"\"\210\304\311\303\305\312$\210\300\313\302\313\303\"\"\210\304\313\303\305\314$\210\300\315\302\315\303\"\"\210\304\315\303\305\316$\210\300\317\302\317\303\"\"\210\304\317\303\305\320$\210\300\321\302\321\303\"\"\210\304\321\303\305\322$\207" [eieio--defalias php-runtime-run eieio--defgeneric-init-form nil eieio--defmethod php-runtime-execute #f(compiled-function (php) "Execute PHP process using `php -r' with code.\n\nThis execution method is affected by the number of character limit of OS command arguments.\nYou can check the limitation by command, for example (shell-command-to-string \"getconf ARG_MAX\") ." #<bytecode>) php-runtime--call-php-process #f(compiled-function (php args) "Execute PHP Process by php-execute `PHP' and `ARGS'." #<bytecode>) php-runtime--call-php-process-with-input-buffer #f(compiled-function (php args) "Execute PHP Process with STDIN by php-execute `PHP' and `ARGS'." #<bytecode>) php-runtime--get-command-line-arg #f(compiled-function (php) "Return command line string" #<bytecode>) php-runtime--stdin-by-file-p #f(compiled-function (php) "Return T if (oref php stdin) is file." #<bytecode>) php-runtime--get-input #f(compiled-function (php) #<bytecode>) php-runtime-stdout-buffer #f(compiled-function (php) "Return output buffer." #<bytecode>)] 5)
  #<subr load>("/home/eric/.emacs.d/local/php-runtime.el/php-runtime.elc")
  apply(#<subr load> "/home/eric/.emacs.d/local/php-runtime.el/php-runtime.elc")
  load("/home/eric/.emacs.d/local/php-runtime.el/php-runtime.elc")
  byte-recompile-file("/home/eric/.emacs.d/local/php-runtime.el/php-runtime.el" nil 0 t)
  emacs-lisp-byte-compile-and-load()
  funcall-interactively(emacs-lisp-byte-compile-and-load)
  call-interactively(emacs-lisp-byte-compile-and-load nil nil)
  command-execute(emacs-lisp-byte-compile-and-load)

The problem is a call to cl-assert inside of eieio--defalias which is invoked by php-runtime-run. I am trying to figure out the fix for this but I have very, very small experience using EIEIO, so there may be an obvious solution which I simply am not seeing.

I am using GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-07-24.

zonuexe commented 7 years ago

I adopted it for this project to learn EIEIO, but I did not find a clear advantage. I could not get a back trace at the time of coding, which bothered me. I may exclude dependend on EIEIO.

ejmr commented 7 years ago

Heh, every great programmer has started a project as an excuse to learn something new ;)

What did you hope to gain and learn by using EIEIO? Knowing that will make it easier to decide what to do. As far as I know, EIEIO is the most popular object-oriented system for GNU Emacs, but hardly the only one available. However, I have also rarely seen object-oriented Elisp code ever in my life.

ejmr commented 7 years ago

I have thought about it the past three days, and I do not believe that this project benefits from using EIEIO. I would be happy to write the patch removing EIEIO to demonstrate my point. However, before I begin, I want to be absolutely clear that you will at least consider removing it. I am not asking you to guarantee that you will accept my patch; all I want to know before I start coding is that you will at least guarantee to consider making the change.

ejmr commented 7 years ago

I also should have mentioned: I am asking to remove EIEIO because, like I said elsewhere, I believe that php-runtime should eventually be part of PHP Mode itself---built right into it. Future maintainers may not care, but personally I do not want people in the future to be forced to learn EIEIO in order to work on one feature in PHP Mode; it is in everyone's best interest to keep the mental dependencies to a minimum.