benchmark-init-el
benchmark-init-el copied to clipboard
Error with Byte compilation preventing proper benchmarking
Hello,
I've installed this package using Elpaca, but for some reason the data collection process seems to be stopped due to a native-comp error. Here is my init file:
;;Welcome to my Emacs config!
;; ;;Use-Package Macro
;; ;; This is only needed once, near the top of the file
;; (eval-when-compile
;; ;; Following line is not needed if use-package.el is in ~/.emacs.d
;; (add-to-list 'load-path "<path where use-package is installed>")
;; (require 'use-package))
(defun efs/display-startup-time ()
(message "Emacs loaded in %s with %d garbage collections."
(format "%.2f seconds"
(float-time
(time-subtract after-init-time before-init-time)))
gcs-done))
(add-hook 'emacs-startup-hook #'efs/display-startup-time)
;; UTF-8 should hopefully work
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-language-environment 'utf-8)
(set-selection-coding-system 'utf-8)
;; From http://xahlee.info/emacs/emacs/emacs_set_font_symbol.html to get unicode symbols
(set-fontset-font
t
'symbol
(cond
((eq system-type 'windows-nt)
(cond
((member "Segoe UI Symbol" (font-family-list)) "Segoe UI Symbol")))
((eq system-type 'darwin)
(cond
((member "Apple Symbols" (font-family-list)) "Apple Symbols")))
((eq system-type 'gnu/linux)
(cond
((member "Symbola" (font-family-list)) "Symbola")))))
;; knowledge if from https://systemcrafters.net/emacs-from-scratch/basics-of-emacs-configuration/
(setq inhibit-startup-message t
visible-bell t) ;Control whether the startup screen happens
(global-display-line-numbers-mode 1)
;;TODO: get a better theme
(load-theme 'modus-vivendi t)
(hl-line-mode 1)
(blink-cursor-mode 1)
(setq history-length 25)
(savehist-mode 1)
(save-place-mode 1)
(setq custom-file (locate-user-emacs-file "custom-vars.el"))
(load custom-file 'noerror 'nomessage)
(global-auto-revert-mode 1)
(setq global-auto-revert-non-file-buffers t)
(pixel-scroll-precision-mode t)
(setq-default cursor-type 'bar)
;;Settings for backup files
(setq backup-directory-alist '(("." . "~/saves")))
(setq backup-by-copying t)
(setq delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t)
;;Installed through Msys2
;;pacman -S mingw64/mingw-w64-x86_64-aspell
;;pacman -S mingw64/mingw-w64-x86_64-aspell-en
(if (eq system-type 'windows-nt)
(setq ispell-program-name "C:/msys64/mingw64/bin/aspell.exe")
(setq ispell-program-name "aspell"))
(setq ispell-dictionary "english")
(context-menu-mode t)
(dolist (hook '(text-mode-hook ))
(add-hook hook #'flyspell-mode)
(add-hook hook #'auto-fill-mode))
;; Org Mode Settings
(require 'ox-md)
;;Bootstrap for Elpaca, a package manager
;;https://github.com/progfolio/elpaca
(defvar elpaca-installer-version 0.7)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
:ref nil :depth 1
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
(build (expand-file-name "elpaca/" elpaca-builds-directory))
(order (cdr elpaca-order))
(default-directory repo))
(add-to-list 'load-path (if (file-exists-p build) build repo))
(unless (file-exists-p repo)
(make-directory repo t)
(when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
,@(when-let ((depth (plist-get order :depth)))
(list (format "--depth=%d" depth) "--no-single-branch"))
,(plist-get order :repo) ,repo))))
((zerop (call-process "git" nil buffer t "checkout"
(or (plist-get order :ref) "--"))))
(emacs (concat invocation-directory invocation-name))
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
((require 'elpaca))
((elpaca-generate-autoloads "elpaca" repo)))
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
(error "%s" (with-current-buffer buffer (buffer-string))))
((error) (warn "%s" err) (delete-directory repo 'recursive))))
(unless (require 'elpaca-autoloads nil t)
(require 'elpaca)
(elpaca-generate-autoloads "elpaca" repo)
(load "./elpaca-autoloads")))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))
;; Uncomment for systems which cannot create symlinks:
(elpaca-no-symlink-mode)
;; Install use-package support
(elpaca elpaca-use-package
;; Enable use-package :ensure support for Elpaca.
(elpaca-use-package-mode))
;;Update Transient to make sure git-commit works
;; (use-package transient :ensure t)
(elpaca transient :defer t)
;; Install Magit, the git porcelain
;; (use-package magit :ensure t :demand t)
(elpaca magit (use-package magit :ensure t :demand t))
;; Emacs Dashboard Settings
(use-package dashboard
:ensure t
:config
(add-hook 'elpaca-after-init-hook #'dashboard-insert-startupify-lists)
(add-hook 'elpaca-after-init-hook #'dashboard-initialize)
(dashboard-setup-startup-hook))
(setq dashboard-banner-logo-title "It's Emacs-ing time")
(setq dashboard-center-content t)
;;Add Benchmark-init-el
(use-package benchmark-init
:ensure t
:config
;; To disable collection of benchmark data after init is done.
(add-hook 'after-init-hook 'benchmark-init/deactivate))
Upon loading with this configuration, this error appears:
Error (use-package): benchmark-init/:catch: Native compiler error: (lambda (arg4 &optional arg5 arg6) (let ((f #'require)) (funcall f arg4 arg5 arg6))), "Compiling c:/Users/seank/.emacs.d/eln-cache/29.3-5efa4952/subr--trampoline-72657175697265_require_0.eln...
And this is what happens when trying to bring up the table in the minibuffer:
comp--native-compile: Native compiler error: (lambda (arg13 &optional arg14 arg15 arg16 arg17) (let ((f #'load)) (funcall f arg13 arg14 arg15 arg16 arg17))), "Compiling c:/Users/seank/.emacs.d/eln-cache/29.3-5efa4952/subr--trampoline-6c6f6164_load_0.eln...
Oddly enough, the first warning also happens while trying to do a test with esup. Any ideas on what I could do?