dholm / benchmark-init-el

Benchmark your Emacs initialization
172 stars 31 forks source link

Error: Wrong number of arguments #18

Closed apc closed 2 years ago

apc commented 2 years ago

Trying to install this package using straight. If I just eval a use-package call for it, e.g.

(use-package benchmark-init
  :demand)

I get (wrong-number-of-arguments (3 . 4) 2). Here's the backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments (3 . 4) 2)
  #f(compiled-function (obsolete-name current-name when &optional docstring) "Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.\n\n(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \"old-fun's doc.\")\n\nis equivalent to the following two lines of code:\n\n(defalias \\='old-fun \\='new-fun \"old-fun's doc.\")\n(make-obsolete \\='old-fun \\='new-fun \"28.1\")\n\nWHEN should be a string indicating when the function was first\nmade obsolete, for example a date or a release number.\n\nSee the docstrings of `defalias' and `make-obsolete' for more details." #<bytecode 0x155f9ad0b6db0ed6>)('benchmark-init/install 'benchmark-init/activate)
  (define-obsolete-function-alias 'benchmark-init/install 'benchmark-init/activate)
  eval-buffer(#<buffer  *load*> nil "/Users/apc/.emacs.d/straight/build/benchmark-init/..." nil t)  ; Reading at buffer position 6700
  load-with-code-conversion("/Users/apc/.emacs.d/straight/build/benchmark-init/..." "/Users/apc/.emacs.d/straight/build/benchmark-init/..." nil t)
  require(benchmark-init nil nil)
  (progn (use-package-statistics-gather :use-package 'benchmark-init nil) (straight-use-package 'benchmark-init) (use-package-statistics-gather :init 'benchmark-init nil) (require 'benchmark-init nil nil) (use-package-statistics-gather :config 'benchmark-init nil) (use-package-statistics-gather :config 'benchmark-init t) (use-package-statistics-gather :init 'benchmark-init t) (use-package-statistics-gather :use-package 'benchmark-init t))
  (progn (defvar bootstrap-version) (progn (use-package-statistics-gather :use-package 'benchmark-init nil) (straight-use-package 'benchmark-init) (use-package-statistics-gather :init 'benchmark-init nil) (require 'benchmark-init nil nil) (use-package-statistics-gather :config 'benchmark-init nil) (use-package-statistics-gather :config 'benchmark-init t) (use-package-statistics-gather :init 'benchmark-init t) (use-package-statistics-gather :use-package 'benchmark-init t)))
  eval((progn (defvar bootstrap-version) (progn (use-package-statistics-gather :use-package 'benchmark-init nil) (straight-use-package 'benchmark-init) (use-package-statistics-gather :init 'benchmark-init nil) (require 'benchmark-init nil nil) (use-package-statistics-gather :config 'benchmark-init nil) (use-package-statistics-gather :config 'benchmark-init t) (use-package-statistics-gather :init 'benchmark-init t) (use-package-statistics-gather :use-package 'benchmark-init t))) t)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

I'm on Emacs 28.0.90.

ugurbolat commented 2 years ago

the same issue I am experiencing with Emacs 28.0.91 see #15

include-yy commented 2 years ago

add the absent WHEN argument can help.

--- a/benchmark-init-modes.el
+++ b/benchmark-init-modes.el
@@ -209,7 +209,7 @@
 ;; Obsolete functions

 (define-obsolete-function-alias 'benchmark-init/show-durations
-  'benchmark-init/show-durations-tabulated)
+  'benchmark-init/show-durations-tabulated "28.1")

 (provide 'benchmark-init-modes)
 ;;; benchmark-init-modes.el ends here
diff --git a/benchmark-init.el b/benchmark-init.el
index 90a69df..7e7735d 100644
--- a/benchmark-init.el
+++ b/benchmark-init.el
@@ -189,7 +189,7 @@ Slots:
 ;; Obsolete functions

 (define-obsolete-function-alias 'benchmark-init/install
-  'benchmark-init/activate)
+  'benchmark-init/activate "28.1")

 (provide 'benchmark-init)
 ;;; benchmark-init.el ends here
aladine commented 2 years ago

@include-yy Could you add a pull request to this package. I have the same issue in emacs 28.1.0

include-yy commented 2 years ago

@aladine I am afraid that this package's author doesn't maintain it any more. Since the last commit is 4 years ago. I suggest just fork it, and commit the correction, then use it until another error occurs. You can see that there are 32 forks (include me) of this package, and they just add some small commit on it.

include-yy commented 2 years ago

@aladine in fact here is already a pull request 😄 https://github.com/dholm/benchmark-init-el/pull/16

aladine commented 2 years ago

Good news! The pull request is already merged. @apc could you verify the changes and resolve the issue.

apc commented 2 years ago

Sorry, I missed this notification. Looks good! Thanks a bunch.