all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: shuguang79@qq.com, 50869@debbugs.gnu.org
Subject: bug#50869: 28.0.50; tramp: void-function tramp-file-name-method--cmacro
Date: Sat, 02 Apr 2022 17:09:13 -0400	[thread overview]
Message-ID: <jwv7d87w6db.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87tuhzcrje.fsf@gmx.de> (Michael Albinus's message of "Sat, 02 Oct 2021 18:36:37 +0200")

>> After load - unload - load tramp, I got an compile error:
>> Compiler-macro error for tramp-file-name-method: (void-function
>> tramp-file-name-method--cmacro) [7 times]

Note: this is not a compile error.  It's an error that happened during
expansion of a compiler-macro.  These are optional, so those errors only
affect the performance of the code but shouldn't affect its behavior.

IOW this sound more serious than it is.

>> How to replicate it:
>> - Start emacs
>> - load-libary tramp
>> - tramp-unload-tramp
>> - load-libary tramp
>> - tramp-unload-tramp
>> - load-libary tramp
>
> tramp-file-name-method--cmacro is a generated accessor function of the
> defstruct tramp-file-name. I'm not sure that this is native Tramp
> error. The backtrace shows as

`tramp-file-name-method--cmacro` is supposed to be a function which
inlines the code of calls to `tramp-file-name-method`.

More specifically `tramp-file-name-method--cmacro` is auto-generated
(and put on the `compiler-macro` property of the
`tramp-file-name-method` symbol) by the `cl-defsubst` used to define
`tramp-file-name-method`.

So I guess the source of the error is that unloading `tramp` undefines
the functions (both `tramp-file-name-method--cmacro` and
`tramp-file-name-method`) but leaves the `compiler-macro` property of the
`tramp-file-name-method` symbol.

We really should make it so package unloading knows how to undo
top-level `put`s.

In the men time, the `;;;###tramp-autoload` cookie placed before the
`cl-defstruct` seems to trip over another bug when I try to build the
package here:

    Debugger entered--Lisp error: (scan-error "Containing expression ends prematurely" 12345819 12345820)
      scan-sexps(12345782 3)
      forward-sexp(3)
      autoload-print-form((defvar cl-struct-tramp-file-name-tags))
    [...]

Maybe it's a bug in the locally-hacked Emacs I'm using to do the build,
tho.  Still, I suspect the cure might be not much better than the disease.


        Stefan






  parent reply	other threads:[~2022-04-02 21:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 15:15 bug#50869: 28.0.50; tramp: void-function tramp-file-name-method--cmacro Shuguang Sun via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-02 16:36 ` Michael Albinus
2022-03-17 14:39   ` Michael Albinus
2022-04-02 21:09   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-04-03 15:44     ` Michael Albinus
2022-09-02 18:52       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-03 10:07         ` Lars Ingebrigtsen
2022-09-03 19:08           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-04 14:53             ` Michael Albinus
2022-09-04 16:44               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-04 17:27                 ` Michael Albinus
2022-09-04 18:03                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-02 11:43     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv7d87w6db.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=50869@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=shuguang79@qq.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.