From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50869: 28.0.50; tramp: void-function tramp-file-name-method--cmacro Date: Sat, 02 Apr 2022 17:09:13 -0400 Message-ID: References: <87tuhzcrje.fsf@gmx.de> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14688"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: shuguang79@qq.com, 50869@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 02 23:10:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nal0p-0003d5-5U for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Apr 2022 23:10:23 +0200 Original-Received: from localhost ([::1]:49614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nal0j-00074p-Pa for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Apr 2022 17:10:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nal0c-00074K-Ks for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2022 17:10:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nal0T-0001qq-U3 for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2022 17:10:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nal0T-0000BF-Jk for bug-gnu-emacs@gnu.org; Sat, 02 Apr 2022 17:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Apr 2022 21:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50869 X-GNU-PR-Package: emacs Original-Received: via spool by 50869-submit@debbugs.gnu.org id=B50869.1648933765644 (code B ref 50869); Sat, 02 Apr 2022 21:10:01 +0000 Original-Received: (at 50869) by debbugs.gnu.org; 2 Apr 2022 21:09:25 +0000 Original-Received: from localhost ([127.0.0.1]:47042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nakzs-0000AJ-Tf for submit@debbugs.gnu.org; Sat, 02 Apr 2022 17:09:25 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nakzq-00009x-V3 for 50869@debbugs.gnu.org; Sat, 02 Apr 2022 17:09:23 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0923D80543; Sat, 2 Apr 2022 17:09:17 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1345B8035A; Sat, 2 Apr 2022 17:09:15 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1648933755; bh=BlMfXtBpXR3ZFMjBWy6fi52+7YretKXXcYCwDzjagu4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ArQps9ilGqubyy+My6uDeU/bAWlMNuqaGXmrDo32EJYfMkimDQA8qCly1TKrwDQxK 571yHJdM9UUr2rpon1P/eC2x8l4w4BGHlNPdYrdH5g4tmABADgivNstr2r2NEhJPDq aBRCavVxtb/qs1qKsMi/2s0zS54IF2V/GfnivCxH4Xzb2Hw4WRhyFHPsSyOPBGb1kx JEHIJmTaCd9UvXel3sgH8EXhi4JwwjflfcoztBvurkpObeLYYAXfMZY0A37FfGa2qO PEoavLN3k1dyHLXQyUj/W9uyavW8BpCMZY71lApH2dKMVUET0Ke6Lajjs/xlBiTTFQ BVfgfjpSSBYAg== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4A0641202E6; Sat, 2 Apr 2022 17:09:14 -0400 (EDT) In-Reply-To: <87tuhzcrje.fsf@gmx.de> (Michael Albinus's message of "Sat, 02 Oct 2021 18:36:37 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229305 Archived-At: >> 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