radian-software / apheleia

🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.
MIT License
517 stars 73 forks source link

Works fine but drops weird error to messages about native compilation #283

Closed artemkovalyov closed 5 months ago

artemkovalyov commented 5 months ago

I wanted to simply suppress it as formatting works fine. Am I doing smth wrong?

Apheleia: (native-compiler-error (lambda (arg14 arg15 arg16 &optional arg17 arg18 arg19 arg20) (let ((f #'write-region)) (funcall f arg14 arg15 arg16 arg17 arg18 arg19 arg20))) Invalid hash table test: tab-bar--auto-width-hash-test

Error: error ("Invalid hash table test" tab-bar--auto-width-hash-test)
  read(#<buffer  *load*>)
  load-with-code-conversion("/tmp/emacs-int-comp-subr--trampoline-77726974652d726567696f6e_write_region_0-YlYdYr.el" "/tmp/emacs-int-comp-subr--trampoline-77726974652d726567696f6e_write_region_0-YlYdYr.el" nil t)
  command-line-1(("-l" "/tmp/emacs-int-comp-subr--trampoline-77726974652d726567696f6e_write_region_0-YlYdYr.el"))
  command-line()
  normal-top-level()
)
(use-package apheleia
  ;; :straight (apheleia :host github :repo "raxod502/apheleia" :build (:not compile))
  :straight (apheleia :host github :repo "raxod502/apheleia")
  :config
  ;; (setq apheleia-log-only-errors nil)
  (add-to-list 'apheleia-formatters '(prettier-svelte . ("prettier" "--stdin-filepath" filepath "--parser=svelte")))
  (setf  (alist-get 'svelte-mode apheleia-mode-alist) '(prettier-svelte))
  (setf  (alist-get 'typescript-mode apheleia-mode-alist) '(prettier))
  (setf  (alist-get 'html-mode apheleia-mode-alist) '(prettier))
  (setf  (alist-get 'js-mode apheleia-mode-alist) '(prettier))
  (setf  (alist-get 'web-mode apheleia-mode-alist) '(prettier))
  (setf  (alist-get 'markdown-mode apheleia-mode-alist) '(prettier))
  :init
  (apheleia-global-mode +1))
artemkovalyov commented 5 months ago

Seems like I compiled Emacs from the Main branch which caused this issue. I recompiled it for 29th branch and things look fine. Thanks for the great tool!