Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid read syntax: "#<" with async-bytecomp #153

Closed
ShuguangSun opened this issue Feb 2, 2022 · 13 comments
Closed

Invalid read syntax: "#<" with async-bytecomp #153

ShuguangSun opened this issue Feb 2, 2022 · 13 comments

Comments

@ShuguangSun
Copy link

Please refer to this info:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-02/msg00003.html
And from the replies, Emacs has a new mechanism for compilation warning positions.
https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-02/msg00031.html

When I try to install packages from the Package Menu or the command of
package-install since about two weeks ago, it reports the error:

error in process sentinel: async-when-done: Invalid read syntax: "#<"
error in process sentinel: Invalid read syntax: "#<"

And it seems not preventing the installation process but stops the emacs
to compile the el files to elc.

@thierryvolpiatto
Copy link
Collaborator

thierryvolpiatto commented Feb 3, 2022 via email

@ShuguangSun
Copy link
Author

Could you check whether the async-bytecomp-package-mode is t or nil? My Emacs version is

In GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32) of 2022-01-31 
Repository revision: 04f9c3b8df6afaf1e9de9f2a4478f63fd959bf09

If sync-bytecomp-package-mode is t, then the error occurs when I call package-install or package-menu-mark-upgrades+package-menu-execute in the package-menu-mode (list-package).

It relates to some emacs' change around Jan 22.

@thierryvolpiatto
Copy link
Collaborator

thierryvolpiatto commented Feb 3, 2022 via email

@michael-heerdegen
Copy link
Contributor

I still see the problem. I think the symbols with positions change is the culprit, I see symbols with positions in the return value of async-inject-variables.

I asked for help in my bug report Bug#54079 regarding another issue related to this change (which had been fixed, but this one is still there):

https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-03/msg00571.html

@thierryvolpiatto
Copy link
Collaborator

thierryvolpiatto commented Mar 16, 2022 via email

@michael-heerdegen
Copy link
Contributor

I see symbols with positions in the binding of `byte-optimize--dynamic-vars' after I have byte compiled something (i.e., compiled normally, not asynchronously), and that seems to be the root cause of the issue. I have opened a separate Emacs bug#54433: 29.0.50; Invalid read syntax: "#<" with async-bytecomp. Let's see what comes out of this.

@thierryvolpiatto
Copy link
Collaborator

thierryvolpiatto commented Mar 17, 2022 via email

thierryvolpiatto added a commit that referenced this issue Mar 17, 2022
Some byte-* variables are no more readable since introduction of
symbols with positions in emacs-29, avoid loading by default such
vars.

The regexp passed to async-inject-variables is now stored in a var to
allow modifying it.
@thierryvolpiatto
Copy link
Collaborator

thierryvolpiatto commented Mar 17, 2022 via email

@michael-heerdegen
Copy link
Contributor

Yes, seems to help indeed, thanks. I hope not transferring those variables doesn't cause other issues.

After having a look at (info "(elisp) Symbols with Position"), you should be able to print the variable bindings using print-symbols-bare -> t to get rid of the symbol positions in printed expressions. You want to bind that in `async--insert-sexp' I think.

@thierryvolpiatto
Copy link
Collaborator

thierryvolpiatto commented Mar 18, 2022 via email

thierryvolpiatto added a commit that referenced this issue Mar 18, 2022
Bind `print-symbols-bare`.
@thierryvolpiatto
Copy link
Collaborator

thierryvolpiatto commented Mar 18, 2022 via email

@michael-heerdegen
Copy link
Contributor

Good - thanks. Then let's hope that this fixes all of the trouble...

@ShuguangSun
Copy link
Author

It works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants