From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: More reliable byte compilation, take 45 Date: Mon, 04 Oct 2021 12:51:19 +0200 Message-ID: <87sfxhm5aw.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30287"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 04 12:52:46 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 1mXLaP-0007eJ-5o for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Oct 2021 12:52:45 +0200 Original-Received: from localhost ([::1]:53714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXLaN-0000wc-5R for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Oct 2021 06:52:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXLZA-0007zs-As for emacs-devel@gnu.org; Mon, 04 Oct 2021 06:51:28 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:47190) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXLZ7-0001T1-Qv for emacs-devel@gnu.org; Mon, 04 Oct 2021 06:51:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BkjzyMPtnxI3X6SwJKvVVBzrWq2YhQwDfmTutYjw2Lo=; b=ho5pfQ4U43Wec2mSlWnfddVt/o xuLgu7BXqPNL77CVs+wNc6kh7muCkaPp6YV/TFzJY362KjS/+fYBpJGQWqwtmJDLV196zuoXd0ouK jYtc5bo8Dvt8qHaKgIJmL/Dui1LqeTxx3adlu1D2asTe22L5qarwbJG8VY4g8Ldcx7N0=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXLZ1-0001qv-Qj for emacs-devel@gnu.org; Mon, 04 Oct 2021 12:51:22 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEU3Mi9PSUWso5T/ ///RB2lhAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UKBAolCz05I94AAAFOSURBVCjPTZBNihtBDIWf oCswWZWhFGKfRoapWUsgLTwH8CL3SWC8ymYMrlNG1W17oqZ/Pr3X0usGXpvxvoSFOmo0+3HiCQLl Vr/9jJCwjup8GeM2/nxMaIfL+Ey42duEMZXxaS9odT/G5XY+r6D1/fIrhZiAOlY4+QsKMMaq+B4H itv5eh2nj1QOb2Ncx6y/33H6ggP6Hd5X0Oq7COXfr3scJ3gIx1JQNQ9zsHlBSPW6MxRP4LooOG2u AEtC2lxdMo5UQNHsOG+i88qBChNqyKKeDhFsJWiPBxDS9ihaIE8ouMMyz0IbxMRyt8wkdyBlU2zb QMHhmXqbbNQVvZGvszQCJXQaCdy9sDqvAxDOrBYJTfILmaTMpW3uyG6xhGwu4DLtCUDPYc/Ilpps S+nYO9uWmSh6xBp2DZflj1d26HPj1z/Y/QdEzzYWytzyD2STbARTtGPFAAAAJXRFWHRkYXRlOmNy ZWF0ZQAyMDIxLTEwLTA0VDEwOjM3OjEwKzAwOjAwgHnpYwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy MS0xMC0wNFQxMDozNzoxMCswMDowMPEkUd8AAAAASUVORK5CYII= X-Now-Playing: Vladislav Delay, Sly Dunbar, Robbie Shakespeare's _500-PUSH-UP_: "(514)" Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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:276166 Archived-At: Various schemes to make byte compilation more reliable has been mooted, but none have been practical. To recap: The problem is that if we change a macro in foo.el, and bar.el uses that macro, bar.el won't be recompiled after changing the macro in foo.el. A defensive solution would be to recompile all libraries that require a library, building a dependency tree from require/autoloads/etc, but the problem is then that if you edit anything in subr.el, then you have to recompile all the .el files, basically. So it's not practical. So we want a solution that's 1) fairly fast and 2) somewhat reliable. A 100% solution isn't necessary -- just something that's less "well, just say 'make bootstrap' then". So here's the idea of the day: make macro-recompile would go through all the .el files and just look for "^\(defmacro ([^ \t\n]+)" (and defsubst and cl-defstruct and probably a couple of other things, but not a whole lot more), and then do a sha256 of the region from the start of the match and until the next "^(". It would maintain a database of these macro names/hashes. If a macro changes its hash, it would then just grep through all the .el files for the macro name, and delete the .elc files where it fines matches. The point here is to make it feasible to alter macros and see whether there's any horrible fall-out immediately, with some confidence. So it has to be fast, and not result in too much recompilation. So writing a little C helper program to do the hashing stuff might possibly be the way to go here. Does this sound feasible and useful? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no