From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: emacs reproducible builds part1 of 2 : eln Date: Sat, 10 Feb 2024 11:35:27 -0500 Message-ID: References: <8d01d73e-7ce1-4b3a-a25c-03b518a7e584@lsmod.de> <83jzofj70t.fsf@gnu.org> <83edemiklb.fsf@gnu.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="36882"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: bernhardout@lsmod.de, emacs-devel@gnu.org, Stefan Monnier , Mattias =?utf-8?Q?Engdeg=C3=A5rd?= To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 10 17:36:17 2024 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 1rYqKv-0009Pm-9J for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Feb 2024 17:36:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYqKD-0002Ms-8X; Sat, 10 Feb 2024 11:35:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYqKB-0002MW-GC for emacs-devel@gnu.org; Sat, 10 Feb 2024 11:35:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYqK8-0004Sw-GW; Sat, 10 Feb 2024 11:35:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=+PSIb0/aVLSvraOc/gn4crG51yMrLdlk4cfoiRw4Qzc=; b=NwHEBf8hOZuybL7qx7e+ 6WR4PgsQV1uI+TUHnEFhihG514Z4+0rJ9OUDEgEAwYqseYd1cNQOZAMlORU9yv4GkLRpRI0T+W3qj 0wxo4qgcgC10FWL3eCGWgct+nMmi0Ls+zPcKO9gKUzcgv+LmQWdJTH2h20YNkNdh4iM5s8ZbGkGO3 sqd6I+M2PrionL4NcQ9KgvfTTLqH65WYb6KaMEsbqSP8sT11qFAbskmE0eYj/xBfaed37PM2vzapy hcs7jJ/wqnCUUVYLDtbOAhSPJhBeL/2pAQ/+aKxwvcZ83ebnorx4PPrD7lHAueMO0S3RZ7DkPQQHs bso2JfK06iv9+A==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rYqK8-00040X-8S; Sat, 10 Feb 2024 11:35:28 -0500 In-Reply-To: (Andrea Corallo's message of "Sat, 13 Jan 2024 04:52:55 -0500") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316099 Archived-At: Okay did some more investigation on this and I think I've a decent understanding of the problem, this is not related to the printer but is entirely on the native compiler. When we compile 'vendor-specific-keysyms' the native compiler is doing its value type propagation collecting all possible return values. This function is returning various possible different lists. We collect all possible return values iterating over the basic blocks of the functions, these are stored in hash table so we walk order is I believe *not* deterministic. That's the source of the trouble because these lists gets collected (and then stored into the function type) inside the eln. With other type of objects we normalize the list of possible returned objects (ex symbols) sorting them, but how to do it with list? Option 1 would be to ignore completly objects behind conses and just propagating the type (cons). IOW going from: (subr-type (native-compile '(lambda (x) (if x '(1 2) '(2 3))))) => (function (t) (member (1 2) (2 3))) to => (function (t) cons) Option 2 is to sort those lists to keep the computed function type stable over different compilation runs. BTW IIUC CL goes for option 1 [1] but at the time I thought it was easy (and nice as well) to support the full object behind the cons. Was it a bad idea? Thanks Andrea [1]