Closed KDr2 closed 4 months ago
How does your rust-mode configuration look like ?
Although the error is surprising since that code should not get evaluated for older emacs: https://github.com/rust-lang/rust-mode/blob/35e68c30fc882dd03c562346fa81eed6c7e09a2f/rust-mode.el#L75
I started emacs with emacs -q
and ran the code below manually:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'rust-mode)
Then the error occurred.
The complete log is like this:
Leaving directory ‘$HOME/.emacs.d/elpa/rust-mode-20240225.526’
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-cargo.el at Tue Feb 27 21:04:29 2024
Entering directory ‘$HOME/.emacs.d/elpa/rust-mode-20240225.526/’
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-common.el at Tue Feb 27 21:04:29 2024
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-compile.el at Tue Feb 27 21:04:29 2024
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-mode-treesitter.el at Tue Feb 27 21:04:29 2024
rust-mode-treesitter.el:9:1:Error: Cannot open load file: No such file or directory, treesit
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-mode.el at Tue Feb 27 21:04:29 2024
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-playpen.el at Tue Feb 27 21:04:29 2024
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-prog-mode.el at Tue Feb 27 21:04:29 2024
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-rustfmt.el at Tue Feb 27 21:04:29 2024
^L
Compiling file $HOME/.emacs.d/elpa/rust-mode-20240225.526/rust-utils.el at Tue Feb 27 21:04:29 2024
Seems it was compiling but not loading?
@KDr2 Thanks, that's helpful. Can you test drive this PR to see if it fixes for you: https://github.com/rust-lang/rust-mode/pull/521 ?
@psibi It works! Thank you for the quick response. :heart:
But I am still curious why the CI didn't find this.
But I am still curious why the CI didn't find this.
Not sure. Probably the ERT mechanism that we use for testing is not good enough ? I would be happy to accept PR's that improve this.
Closing this issue since it has been fixed by https://github.com/rust-lang/rust-mode/pull/521
I got an error while installing
rust-mode
:it's caused by this line: https://github.com/rust-lang/rust-mode/blob/master/rust-mode-treesitter.el#L9.
The problem doesn't exist in Emacs 29.1.
Does anyone know how to fix this? Thank you.