From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Changing a cl-defstruct definition in a published package Date: Fri, 13 Jul 2018 20:38:25 +0100 Message-ID: <87601jx6xa.fsf@gmail.com> References: <9afc36c6-5759-6ea0-4cd4-9d6eb6b073b5@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1531510627 957 195.159.176.226 (13 Jul 2018 19:37:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Jul 2018 19:37:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 13 21:37:03 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 1fe3sE-00005e-06 for ged-emacs-devel@m.gmane.org; Fri, 13 Jul 2018 21:37:02 +0200 Original-Received: from localhost ([::1]:38929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fe3uL-0000yQ-5a for ged-emacs-devel@m.gmane.org; Fri, 13 Jul 2018 15:39:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fe3ti-0000yA-5d for emacs-devel@gnu.org; Fri, 13 Jul 2018 15:38:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fe3tf-0004lw-2t for emacs-devel@gnu.org; Fri, 13 Jul 2018 15:38:34 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:54769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fe3te-0004kU-Re for emacs-devel@gnu.org; Fri, 13 Jul 2018 15:38:31 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id i139-v6so9750811wmf.4 for ; Fri, 13 Jul 2018 12:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=+U+d+8nJ0XXnbjWg3i5HUagQTZUGIO66Vv3wgZphz1o=; b=grieWY45ClPakDX135Pg0COpKMlG8YdqISMDsdmSqlp3TYTllQi2aPt6Pyg3aCpm/6 D8DchG2HTmlwds/CVkhtg81KJpk14xJ4aPfmJoHvGXEOye1dvnQAn8Z+/p/PIDGAUuWq H3SrdhlvwpEl5zabzKocf39NJFqSCxNJTJ0/y+rDoxgECUXVxeC7KB4HLY01O8Rw1eDa +FzetKdVN1EV7aBMB4P/5n/4QzUrQHxLoleu/7r4Zqn4Xb6n0IdtoOqxsyQgEbYhXvXJ mQrRj05Wq1mU/zqXfun81qxC9GlDvYUhXXFe65MFZ7j6chJl/WkslgtxWVCf9DvgO5cp /qhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=+U+d+8nJ0XXnbjWg3i5HUagQTZUGIO66Vv3wgZphz1o=; b=HrMd6yEyO9tWV6sapu4PK44H/Dn3tD7bUQVbSs/izspH09RIy8oCQcPq5Y/NIw/zYA hfC29pdPvsp6FojntOu0LkAWcrgkZ/+L1E8eH9+UGUtrQ9vu3Hr+ahaFAYzQ4z0y9OH6 ys6yEUUWjQW5aZA7jUt+6EXido6X5FRkfzsybbYW1wh0B2VxNuah9GtYcNYAqkb4hQc0 eDjZaK8pBysWs8Y/plQTvp2a+GHswmjzq+tr+E+lFvmHx6nDYtfotJ8BHfmd8pNViuA0 P4gBMrFBsNTx+Dy/v8ZxyUKZCzJtM3FBGs5/4ZUWpbRGtbmVAPhCTPXb7iZJwsWagij1 PTWA== X-Gm-Message-State: AOUpUlFTKPGhzjEfdIvtp0JniUJAPDbfDbhpbHB06FyyghexQ75eSMf5 LVIZiYv4YPpcNGXPp2HFSZQpQlhA X-Google-Smtp-Source: AAOMgpdSZkNg+rx4N9pyqRa2/SSX+o2Qo1T0pl7yzVF5BE0ZKDGI1VdLl8rntqcR7WOwH7TfVUNhYA== X-Received: by 2002:a1c:9f86:: with SMTP id i128-v6mr4332847wme.156.1531510709257; Fri, 13 Jul 2018 12:38:29 -0700 (PDT) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id 125-v6sm12056337wmw.9.2018.07.13.12.38.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jul 2018 12:38:28 -0700 (PDT) In-Reply-To: (=?utf-8?Q?=22Cl=C3=A9ment?= Pit-Claudel"'s message of "Fri, 13 Jul 2018 14:26:51 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 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:227370 Archived-At: Cl=C3=A9ment Pit-Claudel writes: > On 2018-07-13 13:01, Jo=C3=A3o T=C3=A1vora wrote: >> There's no way to fix the problem now without breaking backward >> compatibility because by now B's use of your accessor has been >> compiled into something that probably looks like an aref into an >> array. > > Indeed, I suspected as much=E2=80=A6 > >> So if you change your object layout in A, you break a compiled B. > > Right, but I can't afford that. Do you have ideas on workarounds? > Some other source-based package managers recompile dependencies on > update. IIUC, package.el doesn't do that. Maybe it should? But it > sounds like a lot of extra work. > > What would you do? I don't think breaking all packages that depend on > FlyCheck is a valid option :/ You wouldn't be breaking the packages totally, you would be breaking the compiled code. You could argue that it's package.el's responsibility to notice, knowing the dependency chain, that some things need to be recompiled if a dependency changes upstream. Like Make does, basically. But arguing of course won't solve the immediate problem you have at hand. I don't know what you're trying to do, but the only way is not to change the object layout, and to guarantee that the value that the user packages are looking for is indeed found there at the right time. A potentially horrible amount of hookage awaits you, but you could at least also add your new feature/change and get rid of the hacks later. Jo=C3=A3o