From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: Regression in dump-emacs-portable Date: Thu, 23 Feb 2023 08:21:52 -0500 Message-ID: References: <83ttzocomk.fsf@gnu.org> <834jrncd6a.fsf@gnu.org> <83r0up39qe.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10392"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 23 14:22:52 2023 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 1pVBYg-0002SQ-9E for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Feb 2023 14:22:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBY0-0000hY-Vh; Thu, 23 Feb 2023 08:22:08 -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 1pVBXz-0000eW-VN for emacs-devel@gnu.org; Thu, 23 Feb 2023 08:22:07 -0500 Original-Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVBXy-0007vX-7N; Thu, 23 Feb 2023 08:22:07 -0500 Original-Received: by mail-pj1-x1031.google.com with SMTP id il18-20020a17090b165200b0023127b2d602so12232686pjb.2; Thu, 23 Feb 2023 05:22:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=asHQnVKNUZZNRtFwGW9X8zKil157E2Pt0x4xH7o3Q9c=; b=NDMhit8qAr2IZ5zFL4QC9j2U83tcwWSxqCL8wYgFym7s87M68yEBHQ4LWxolWLmKHM OMdmrlgBA2WoJ9V6Z6I+ovVXSwRtdWZMku65opHN2BmsaEJZ9HObSnJPxKetFv03I54O z1QRk7hMPnsHjf4PbvrjObxTqCw/cqz+cCCd/XEVy4zgGTMKgzRTRteQEHI6cl/+fpxf 9S+BHSoZUQV3td82r1zlB1G+ntLllH6WoSoBkfF/1K+wYirWx7UdmPnuSaruW9mbW+92 3k6okXoBGIuh6ayua0ohJ/kfwBeTKD92Soo19RYq9s5KCE7PxecuB5Muz/VdoVJ4st0o kvTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=asHQnVKNUZZNRtFwGW9X8zKil157E2Pt0x4xH7o3Q9c=; b=rD6Ln9R562AIhLbNHGBsGA+8QnXiytQcOZIFnoWurxtJizcCK3LJKP3+N/x+SLwQWY zZkdl7IHBYnZI8b2PdciXuWT7cFMPMvGO3uuWbQbL0XDkJ/2m7P2krBWfXjQ0c9LyETz 9VMixxxZnBPNOElwrOdo2asYNokLbJUjxPzLoDOi70Xk4fJS7UVjpRAAUiY+Gro4SblY ynYMuw0opqmvcjxP6Oz32rzpKtd0/7HvWvkKAJihGAOYZG3QOpkjSS824Q4k84tDjLKE KyeUz87FKnaNQ3vrarwdOg/AcHbNiiEi2M8chxBlk10c26/88z1loD/jGgce/G55s0fO rShQ== X-Gm-Message-State: AO0yUKWlstVK8VTZ54b/PLM2wF1uO7l4HVVE8ZuFa7xnXX5d+/nBB53S +shAGEC2vKg8vbo5p/4ljRSUq68IUTORpEytaqKQaCcbq68= X-Google-Smtp-Source: AK7set9RMH2qFOTsQjf8RMz5a/+hm/ll6RXz1rTS5FOkFksp5qx0Nz9b2B7A04uu/DtI7LgkFam9jq1DwmZngFExSXI= X-Received: by 2002:a17:90a:3ea6:b0:236:6e4c:8a1e with SMTP id k35-20020a17090a3ea600b002366e4c8a1emr450790pjc.1.1677158523867; Thu, 23 Feb 2023 05:22:03 -0800 (PST) In-Reply-To: <83r0up39qe.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=owinebar@gmail.com; helo=mail-pj1-x1031.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.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:303704 Archived-At: On Thu, Feb 16, 2023 at 10:34 AM Eli Zaretskii wrote: > > From: Lynn Winebarger > > Date: Thu, 16 Feb 2023 10:05:00 -0500 > > Cc: emacs-devel > > > > I do see something in the redumped emacs that seems like a bug to me. The process I use for creating the > > dump uses the -Q flag. But some of the settings I see in "emacs -Q --dump-file ..." are not the ones I see > > with just "emacs -Q". Some are pretty basic - menu-bar-mode, tool-bar-mode, global-font-lock-mode, > > transient-mark-mode are all nil in the redumped process but not the baseline. > > That is exactly the problem with re-dumping: stuff that was > initialized on the first start gets dumped, and then works differently > when Emacs is restarted from the second dump. > > It might sound like a minor issue, but it is actually a tip of a very > large iceberg. When we run temacs to produce the dump file, we jump > through many hoops to avoid these problems, and then when dumped Emacs > is started, it jumps through some more hoops. Those are all the > init_FOO_once and pdumper_do_now_and_after_load calls. All this works > differently when Emacs starts from a re-dumped dump file. For > example, features that are toggled might be turned off in the second > start because the startup code assumes they are originally turned off > and toggling them turns them on. I don't understand why the initialization function for minor mode variables toggles, or why a minor mode command invoked in startup without argument would toggle. That's only supposed to be done when the mode command is invoked interactively without argument. It's true that there are only a few customization variables in the baseline dump file that use custom-initialize-delay. But one way of dealing with these issues would be to do a (conservative) analysis of initialization expressions for dependencies on values that are dependent on run-time initialization and re-initialize them accordingly. The patch I submitted in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61721 does the first step. In my test redump (with nothing additional loaded), global-font-lock-mode and tooltips-mode are set correctly at least. I added a bug report specifically about the failure of dumping for overlays and treesit-compiled-query pseudovectors. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61733 Lynn