From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#40838: 28.0.50; [feature/native-comp] Function overrides in init.el are not honored after deferred compilation Date: Mon, 18 May 2020 23:23:49 +0800 Message-ID: <87wo592rne.fsf@localhost> References: <87zhb0q8wi.fsf@localhost> <87lfmidexg.fsf@localhost> <87mu6v4qss.fsf@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="123980"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40838@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 18 17:29:08 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jahhU-000W63-Jw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 May 2020 17:29:08 +0200 Original-Received: from localhost ([::1]:45194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jahhT-0008K0-Mb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 May 2020 11:29:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jahhO-0008Ja-G9 for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 11:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36533) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jahhO-0001tl-6T for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jahhO-0007Ug-3z for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 11:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 May 2020 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40838 X-GNU-PR-Package: emacs Original-Received: via spool by 40838-submit@debbugs.gnu.org id=B40838.158981570428744 (code B ref 40838); Mon, 18 May 2020 15:29:02 +0000 Original-Received: (at 40838) by debbugs.gnu.org; 18 May 2020 15:28:24 +0000 Original-Received: from localhost ([127.0.0.1]:48070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jahgm-0007TY-Di for submit@debbugs.gnu.org; Mon, 18 May 2020 11:28:24 -0400 Original-Received: from mail-pj1-f51.google.com ([209.85.216.51]:35165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jahgk-0007TK-L4 for 40838@debbugs.gnu.org; Mon, 18 May 2020 11:28:23 -0400 Original-Received: by mail-pj1-f51.google.com with SMTP id 5so2176309pjd.0 for <40838@debbugs.gnu.org>; Mon, 18 May 2020 08:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=eCBW6TmJydj04S3pOotPbcjEz94I11IVdP0P5i90waQ=; b=vA0ojR8g92ZLKo/Uc64+unq+kpljVvtfxy1w+3u9NtkkTbbJLD1ahtT1kEQtNOsFKp UX18k6fMbIF0icj5RN9+gwq7/pYSdeKRJvDhsSz4+82Pzjc64L+Fc4prIRFt8rz1WHEq y8QUycl4lgrZQ34sWzDv+nD8XjDjk9xq/bmHY/3ANSOlDIkA5pIKXgcx/Uw1OImsUoEl oiw3OCdWnevifCI+jAEIC6SImkBlLP44MiEyk35BD6JpYgdCr4wEGsOJom4eL9llwCPY X2hkhsKrkWkqHCOdu9eV5skTAqt80p6kvBEhm9IFi4HHN/8mNZuqiX3uxKiqJOixqpii oM7A== 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:in-reply-to:references:date :message-id:mime-version; bh=eCBW6TmJydj04S3pOotPbcjEz94I11IVdP0P5i90waQ=; b=C7P4nfqUAsB4dfaumBn+SrZSfCwkSncUwajfSNKmGz/NJ0+Prz0PxOFmIuUnpTWlSG /3Vw0kMGRrFGy2sKJd0oEC/Rnpmfw+/uwNfY31s3q3p00HH+7ciLcb7m1KiGDnvMYHYQ bbj2jpRkTQ9VLDg7+7LcFLXvLQz9Q6HskqqSBh6A1TUldQDr6gsQiNKxMYlSHJzYgvgA psVCDrk5TkC4NLXsTcaB9nDBbIBEfANHUw1GRe0NpCbSx+0rdiasyWwuSbyjY/NlG2D3 1ir+92qlPMqlAPwoUUTaCXgF0vqWa3T9/YazuECfc/2o8W8SNqZmIZWiNFtNKccFmLh5 eVlQ== X-Gm-Message-State: AOAM531J1mzu8xyaHlz1G1AXcrUJ7vxfxpZEqwAZPXl8LDt6df3pbVp9 dpLiLhFdrFunJobfSmhJgsU= X-Google-Smtp-Source: ABdhPJzvCH1BDSvPRCUtRuoviZfc19m7FWXyfK3/BwCdrG6lrpG18XPOfK1V8JbAMvUQC6at0TAVJA== X-Received: by 2002:a17:90a:9f8a:: with SMTP id o10mr20313149pjp.118.1589815696713; Mon, 18 May 2020 08:28:16 -0700 (PDT) Original-Received: from localhost (97.151-89-23.rdns.scalabledns.com. [23.89.151.97]) by smtp.gmail.com with ESMTPSA id e26sm5331183pff.137.2020.05.18.08.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 08:28:15 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180545 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > thanks this is appreciated because I haven't managed to reproduce it > myself. Finally, I found some reproducible example. straight.el redefines some org functions before loading org. It is done in straight--fix-org-function (org-git-version and org-release are redefined).=20 The redefined version works with org.elc, but somehow get overridden when org.eln is loaded (in my case, the loading is triggered by elfeed-org). Steps to reproduce: 1. Use the attached file to load emacs. No errors should appear. 2. Wait until org is native-compiled. 3. Restart emacs. The following errors appears (straight--fix-org-function supposed to be a workaround for this error): Error (use-package): elfeed-org/:catch: Invalid version syntax: =E2=80=98N/= A=E2=80=99 (must start with a number) 4. Delete org.eln 5. Restart emacs. The error disappears. Best, Ihor --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=native-fail-recepy.el Content-Transfer-Encoding: quoted-printable (setq comp-deferred-compilation t) ;; enable automatic native-compilation (setq straight-repository-branch "develop") (setq straight-vc-git-default-protocol 'ssh) (setq straight--wait-for-async-jobs nil) (eval-and-compile (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-di= rectory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install= .el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage))) (setq load-prefer-newer t) (eval-and-compile (straight-use-package 'use-package)) (straight-use-package '(org :type git :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :files (:defaults "contrib/lisp/*.el") :fork (:repo "/home/yantar92/Git/org-mode/" :branch "feature/drawertextp= rop"))) (use-package elfeed :straight t) (use-package elfeed-org :straight t :config (elfeed-org)) ;; when this file is loaded after org is native-compiled, the following err= or appears. ;; Error (use-package): elfeed-org/:catch: Invalid version syntax: =E2=80= =98N/A=E2=80=99 (must start with a number) ;; deleting org.eln makes the error disappears ;; possible cause: straight--fix-org-function from straight.el is redefinin= g some org.el functions ;; (org-git-version and org-release). This override fails to work in native= -compiled org --=-=-= Content-Type: text/plain Andrea Corallo writes: > Ihor Radchenko writes: > >>> It would certanly help if you could provide a reproducer. >> >> I was trying to make a simple recipe to reproduce this, but failed. >> The bug only appears with my config (though I do not see any problem >> when not using native-comp branch). >> Will try to narrow down the exact cause, but it may take a while. >> >> Best, >> Ihor > > Hi Ihor, > > thanks this is appreciated because I haven't managed to reproduce it > myself. > > Thanks > > Andrea > > -- > akrl@sdf.org -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg --=-=-=--