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: Re: Changing a cl-defstruct definition in a published package Date: Fri, 13 Jul 2018 23:36:28 -0400 Message-ID: References: <9afc36c6-5759-6ea0-4cd4-9d6eb6b073b5@gmail.com> <87601jx6xa.fsf@gmail.com> <8806cd3a-da5f-28da-1aa6-fff611214396@gmail.com> <33b59faf-9357-706e-2239-68411096bc51@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531539295 24486 195.159.176.226 (14 Jul 2018 03:34:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 14 Jul 2018 03:34:55 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 14 05:34:51 2018 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 1feBKc-0006FV-EH for ged-emacs-devel@m.gmane.org; Sat, 14 Jul 2018 05:34:50 +0200 Original-Received: from localhost ([::1]:39912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feBMh-0008Gu-Ly for ged-emacs-devel@m.gmane.org; Fri, 13 Jul 2018 23:36:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feBMS-0008Gi-F0 for emacs-devel@gnu.org; Fri, 13 Jul 2018 23:36:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feBMP-0006Ld-DK for emacs-devel@gnu.org; Fri, 13 Jul 2018 23:36:44 -0400 Original-Received: from [195.159.176.226] (port=38005 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1feBMP-0006Kl-5y for emacs-devel@gnu.org; Fri, 13 Jul 2018 23:36:41 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1feBKC-0005sr-Sr for emacs-devel@gnu.org; Sat, 14 Jul 2018 05:34:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:HW7QsN61mMqLFVqQ+QvLD8XDq6s= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:227385 Archived-At: > buffer checker filename line column message level id group) [...] > buffer checker filename -coordinates -region message level id group) OK, so the issue is with `line` and `column` which get replaced by `-coordinates` and `-region`, the rest stays unchanged. So maybe you can arrange to auto-detect objects created with the old format. > Most Flycheck checkers are defined using a standardized macro and do > not have to worry about creating or accessing individual error > structures, so that code is fine. More complex error checkers, on the > other hand, do create error objects directly (concrete examples > include merlin, or any of the checkers that maintain a persistent > background process). IIUC, outside Flycheck the main operation called (and hence inlined) is the constructor(s). Are field accessors also used outside Flycheck? If so, is there a chance that they are only ever used on those objects that were created by the outside code as well (i.e. those inlined accessors only see objects created by the compatible inline constructors)? I get the impression that maybe you can write a wrapper to access `-coordinates` and `-region` which will check if either of those is of the wrong type (but of the right type for `line` and `column` instead) so it will know to fallback on the new code? Stefan