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: Finalizing 'inhibit-automatic-native-compilation' Date: Sat, 18 Feb 2023 21:48:55 +0000 Message-ID: References: <837cx8cey0.fsf@gnu.org> <83a61pprm8.fsf@gnu.org> <87mt5ncjuk.fsf@X570GP> <83cz6jm9mo.fsf@gnu.org> <87a61lkjb7.fsf@X570GP> <87pmahs9um.fsf@EBx360> <877cwoo6ru.fsf@X570GP> <83bkm0jxbr.fsf@gnu.org> <87ttzq25m6.fsf@X570GP> <837cwmhlgs.fsf@gnu.org> <87pmae1wrs.fsf@X570GP> <83v8k6fxy5.fsf@gnu.org> <87y1p01qlc.fsf@EBx360> <83y1p0cq3v.fsf@gnu.org> <877cwiblk8.fsf@X570GP> <83leky828x.fsf@gnu.org> <83r0uo1zdx.fsf@gnu.org> <83cz681ims.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="9565"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org, larsi@gnus.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 18 22:50:01 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 1pTV5l-0002G2-F7 for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Feb 2023 22:50:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTV4z-0007qd-CD; Sat, 18 Feb 2023 16:49:13 -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 1pTV4x-0007q5-Hp for emacs-devel@gnu.org; Sat, 18 Feb 2023 16:49:11 -0500 Original-Received: from ma.sdf.org ([205.166.94.33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTV4v-0002uq-Sh; Sat, 18 Feb 2023 16:49:11 -0500 Original-Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1pTV4h-00081x-GT; Sat, 18 Feb 2023 21:48:55 +0000 In-Reply-To: <83cz681ims.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Feb 2023 16:17:15 +0200") Received-SPF: pass client-ip=205.166.94.33; envelope-from=akrl@sdf.org; helo=ma.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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:303534 Archived-At: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: aymeric.agon@yandex.com, spwhitton@spwhitton.name, >> monnier@iro.umontreal.ca, emacs-devel@gnu.org, larsi@gnus.org, >> rlb@defaultvalue.org >> Date: Fri, 17 Feb 2023 10:16:38 +0000 >> >> Eli Zaretskii writes: >> >> > Andrea, I think you can now merge this branch to emacs-29 when you >> > have time, and let's take it from there. >> > >> > Thanks. >> >> Done now with d6e4f243720. > > Thanks. I've installed a few updates to the docs, please take a look > and tell me if I made any mistakes. > > I have a question about this code from comp.el: > > (defun comp--trampoline-abs-filename (subr-name) > "Return the absolute filename for a trampoline for SUBR-NAME." > (cl-loop > with dirs = (if (stringp native-comp-enable-subr-trampolines) > (list native-comp-enable-subr-trampolines) > (if native-compile-target-directory > (list (expand-file-name comp-native-version-dir > native-compile-target-directory)) > (comp-eln-load-path-eff))) > with rel-filename = (comp-trampoline-filename subr-name) > for dir in dirs > for abs-filename = (expand-file-name rel-filename dir) > unless (file-exists-p dir) > do (ignore-errors > (make-directory dir t) > (cl-return abs-filename)) > when (file-writable-p abs-filename) > do (cl-return abs-filename) > ;; Default to some temporary directory if no better option was > ;; found. > finally (cl-return > (expand-file-name > (make-temp-file-internal (file-name-sans-extension rel-filename) > 0 ".eln" nil) > temporary-file-directory)))) > > This seems to use native-comp-enable-subr-trampolines, if it is a > string, without expanding it relative to anything, which AFAIU means > it will be interpreted relative to the current buffer's > default-directory. Is that indeed so, and if so, should we perhaps > interpret it relative to invocation-directory, like we do with > native-comp-eln-load-path? Because which buffer is current when > trampoline compilation happens is anyone's guess, especially if that > happens in a sub-process. > > Thanks. Hi Eli, yes your is a very good point. I pushed c15bc91e1bf to address that, please have a look. Thanks Andrea