From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Obsolescence warnings (was: [Emacs-diffs] master 9227b5c: last-chance: new utility lib for dangling deterrence) Date: Sat, 24 Dec 2016 00:02:03 -0500 Message-ID: References: <20161224023808.12868.71069@vcs.savannah.gnu.org> <20161224023808.9EE8D2201BC@vcs.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1482556322 17847 195.159.176.226 (24 Dec 2016 05:12:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2016 05:12:02 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: Thien-Thi Nguyen To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 24 06:11:56 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKecY-0002zQ-27 for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 06:11:50 +0100 Original-Received: from localhost ([::1]:42232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKecc-0001It-Da for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 00:11:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKeTA-0002hx-6r for emacs-devel@gnu.org; Sat, 24 Dec 2016 00:02:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKeT7-0005KW-5c for emacs-devel@gnu.org; Sat, 24 Dec 2016 00:02:08 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:36067) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKeT7-0005K2-0M; Sat, 24 Dec 2016 00:02:05 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DsBAAu3EVY/+J3oWxdGgEBAQECAQEBAQgBAQEBgzgBAQEBAR+EW6FkGAGUVoIIGYYDBAICghFCEgECAQEBAQEBAWIohGkGViMQPwcLFBgNiSatFItEAQslkC2FFQWPfIpqmxqGOpBOgUEmDCR4Ew6EEIFjIIktAQEB X-IPAS-Result: A0DsBAAu3EVY/+J3oWxdGgEBAQECAQEBAQgBAQEBgzgBAQEBAR+EW6FkGAGUVoIIGYYDBAICghFCEgECAQEBAQEBAWIohGkGViMQPwcLFBgNiSatFItEAQslkC2FFQWPfIpqmxqGOpBOgUEmDCR4Ew6EEIFjIIktAQEB X-IronPort-AV: E=Sophos;i="5.33,749,1477972800"; d="scan'208";a="283700036" Original-Received: from 108-161-119-226.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([108.161.119.226]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Dec 2016 00:02:03 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 8CD03AE2A4; Sat, 24 Dec 2016 00:02:03 -0500 (EST) In-Reply-To: <20161224023808.9EE8D2201BC@vcs.savannah.gnu.org> (Thien-Thi Nguyen's message of "Sat, 24 Dec 2016 02:38:08 +0000 (UTC)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210769 Archived-At: > +;; [Insert "nobody reads ChangeLog files" lament, here. --ttn] I think the problem is older, since it was made obsolete a long time ago. IOW, the problem really is that there's no warning ever given when we use an obsolete face. In general, I think we're currently not proactive enough in warning about uses of obsolete thingies: for functions and variables, we handle that during byte-compilation, so those are mostly covered, but not so for: - faces (as evidenced here). - user-variables or hooks (since the users most likely don't byte-compile their ~/.emacs file). - more generally code that isn't byte-compiled (it's very common for users to use Elisp code without ever byte-compiling it). - text-properties. - I'm sure there are more cases. I think it would be good to introduce a mechanism to tell the user about uses of obsolete features. And by "user" here I mean "end user", not because I prefer warning the end-user than the developer, but because in many of those cases they're one and the same, and because in other cases that's the best we can do. To the extent that it affects the end-user and is caught during execution, this mechanism needs to be very careful not to get in the way, although it should be visible enough that we can reasonably expect that the user will likely see those messages. Stefan