From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Warning in tramp.el Date: Sun, 06 Jun 2021 08:42:11 +0200 Message-ID: <87sg1v335o.fsf@gmx.de> References: <87lf8dcrcd.fsf@disroot.org> <15pmxh100n.fsf@fencepost.gnu.org> <87r1huwtwz.fsf@tcd.ie> <87eedr44i0.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7696"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , Glenn Morris , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 06 08:43:48 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lpmVg-0001mE-JU for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 08:43:48 +0200 Original-Received: from localhost ([::1]:40410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpmVf-00016t-ME for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 02:43:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpmUS-0000Pm-IZ for emacs-devel@gnu.org; Sun, 06 Jun 2021 02:42:32 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:33439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpmUI-00089z-9e; Sun, 06 Jun 2021 02:42:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1622961733; bh=ArTG1+GlgLsWOj8CPMzNlonUNA2blp2i8mXV9jvsBDs=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=aJUX2cN1EBT//6o3Trhux+it/GWmhb2368roP6XqWGzztZ17KgT6vWZWyKb3bWV93 7WZVcNZiDI6cX2LA1SPhXh6zBFoEJH/4XTwEcS2qdaOWnwHMe8gsXe2yJC8U9QXjjD pMswB0YDcIiLBDgCTmJCKOBQ+ZcfeyjdFFKSgjmk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.158.227]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MfYPi-1lA89F16Ea-00fzpf; Sun, 06 Jun 2021 08:42:13 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 05 Jun 2021 12:26:01 -0400") X-Provags-ID: V03:K1:rjFEp351r+looWc4LGPIfFyDheNiPHW4jftsA1KmeONK6mkIMtA DvB6g/s4hgOuw8VAGxyRNb1VywCIiHd+NfkBPjHMosj75I2ZetVRYj5crtuxtwXN6/eOD/N 9WfK9HAN0Qe2eo8zaqZ1tAvzKAegLqwedYZC817mGSJsu4s4lreKm0F2b8meOE4CHhovJyB eaH8PqlveOH/XtQzQyWuw== X-UI-Out-Filterresults: notjunk:1;V03:K0:Z8Jd+CrQaAc=:q5SP6e6ndykPmRh3ehHOTS Pe3wBt+torZFm0XNfPkEw1TXJ/jE8gX9pdPiy+CKm83IV2KyuCzmAOO1ODf1doDkwhLLhJUGV R7/yN1TaGTepcisDfQb7YiIP5I7BitTXXGTyAFduAq5jzXkyO1C9EtywnpOE06j4/BP5j+yXa 4Z8+HgnuwywEgYACDVFT6nQNK3PT/LkdiZvoNfpfbbGVS7b4yeKcBGwKT0ZROVjCmsqWl0Kcw sZKmfxhWcGEgnGL7d60Xv1JJOS9REXaBXV3/8TZ4DvnwW3tJ+i+jEIi+9YifZDPFM5EQ6GaVo GgebUmljGOdzANHxoKrMXK4R/iCTqcnshstBj/3vzwJqYAjWxA2i9zU99IdvsYFW+7GIL/yzH WLkIhAQIopEY8AvoaFn7Kxv7aXr5RAjaRj67yQYttVa0lV+lZS6KLOKUbxOjY5/u1HknZVOYG 5NYem+RR0YLRZqQYEg/Ma000PaiXdd6Vk7LVAAOng37iD0Q/fUjHDfvTifQgcYxsdrgyLV+D8 /7urhuWN6MMuFgXczp3YzUjHJ1DdZejxo35KX+Blf7E1URDfZ/k3y5Bb33a9E1cvOKGSzEPx9 wn/ZUC2u/ZElXPrGeP2fbwpyNVLh07Iy7E59ZJfNcShqu1wMWvzj853mms1tQ94kPtCjjLLxS 4mfwxu2ugxDhNkkP4RORv5aH5oICMvXh33P7n9oB0erIcHaZv4lNRpFD0AjWGoQmF16pEaLI3 7GcdP7K7AvKOreZ8/SCMOB3RDArTYTracDKyoBsN3fSlekd1wdnR6wdxhz0z4nb7q7+ruZHT Received-SPF: pass client-ip=212.227.15.18; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270463 Archived-At: Stefan Monnier writes: Hi Stefan, > `tramp-handle-access-file` (in `tramp.el`) calls the inlinable > `tramp-compat-file-missing` (from `tramp-compat.el`) which calls the > inlinable `tramp-error` (from `tramp.el`). > > If `tramp-compat.el` is compiled first, we don't get any warning, but > `tramp-error` is not inlined because `tramp-compat.el` doesn't require > `tramp` (instead it `declare-function` on `tramp-error`). > This case should arguably also signal a warning, because we fail to > inline the function, and the only good fix for that would be to > change the dependencies such that `tramp-compat.el` requires the file in > which `tramp-error` is defined (which may require moving `tramp-error` > to some other file to avoid circular dependencies). > > OTOH if `tramp-compat.el` is not yet compiled when we compile > `tramp.el`, we get the above warning. In that case, we *could* actually > do the right thing and inline `tramp-error` (and the old inlining code > got that right), but the info about `tramp-error` is kept inside > `byte-compile-function-environment` at that point, and we don't pass > that down to the recursive `byte-compile` (and to some extent for good > reason: the inlined function should be compiled in "its" environment > rather than in the environment of the caller). > > So we could try and fix this warning in the byte-compiler, but it > could require non-trivial (or ugly) changes to the compiler. > > I think the better fix is to change the Tramp code to avoid this > circular dependency. This will not only avoid the warning but it will > also make the inlining work in both cases (and avoid the need for > `declare-function` here). I've converted tramp-error from defsubst to defun. Unlike other Tramp message functions, there's no reason for it to be a defsubst. > Stefan Best regards, Michael.