From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows - Reduce the number of files probed when finding a lisp file. Date: Tue, 02 Jun 2020 14:43:14 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="39192"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 41242@debbugs.gnu.org To: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 02 16:45:30 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 1jg8AT-000A5k-Or for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jun 2020 16:45:29 +0200 Original-Received: from localhost ([::1]:50172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg8AS-0001js-PV for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jun 2020 10:45:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg895-0008Ue-OP for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2020 10:44:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg895-0006cE-E9 for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2020 10:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jg894-0007De-BV for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2020 10:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2020 14:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41242 X-GNU-PR-Package: emacs Original-Received: via spool by 41242-submit@debbugs.gnu.org id=B41242.159110899827691 (code B ref 41242); Tue, 02 Jun 2020 14:44:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 2 Jun 2020 14:43:18 +0000 Original-Received: from localhost ([127.0.0.1]:40545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg88L-0007CZ-LA for submit@debbugs.gnu.org; Tue, 02 Jun 2020 10:43:17 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:56786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg88J-0007CQ-Qj for 41242@debbugs.gnu.org; Tue, 02 Jun 2020 10:43:16 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 052EhEok018534 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 2 Jun 2020 14:43:14 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 052EhE1e020416; Tue, 2 Jun 2020 14:43:14 GMT In-Reply-To: ("Nicolas =?UTF-8?Q?B=C3=A9rtolo?="'s message of "Mon, 1 Jun 2020 21:42:50 -0300") 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:181400 Archived-At: Nicolas B=C3=A9rtolo writes: >> In which folders are we going to search if we do (load "...a/path/foo.el= n")? > >> I believe in this case we should search the file only in "...a/path/" >> because the user really want to load this specific file. Am I correct? > > I'm not sure we want the load function to be that smart. This is from > the manual: > > ----- > The load function is not clever about looking at filename. In the pervers= e case > of a file named foo.el.el, evaluation of (load "foo.el") will indeed find= it. > ----- > > I think we should respect that principle when dealing with .eln files, ev= en if > it leads to trying to open absurd filenames. Mmmh you are maybe right, but the directory and the filename are two different things, I've to think about it. I'd be curious of other opinions. > I did some tests, and these are the files probed in each case: > > (load "dir/foo.eln") > > "{elt}/dir/foo.eln.eln" > "{elt}/dir/eln-hash/foo.eln.eln" > "{elt}/dir/foo.eln.dll" > "{elt}/dir/foo.eln.elc" > "{elt}/dir/foo.eln.elc.gz" > "{elt}/dir/foo.eln.el" > "{elt}/dir/foo.eln.el.gz" > "{elt}/dir/foo.eln" > "{elt}/dir/foo.eln.gz" > > where {elt} is an element from `load-path`. > > (load "C:/dir/foo.eln") > > "c:/dir/foo.eln.eln" > "c:/dir/eln-hash/foo.eln.eln" > "c:/dir/foo.eln.dll" > "c:/dir/foo.eln.elc" > "c:/dir/foo.eln.elc.gz" > "c:/dir/foo.eln.el" > "c:/dir/foo.eln.el.gz" > "c:/dir/foo.eln" > "c:/dir/foo.eln.gz" > > (load "dir/foo.eln" nil nil t) <- nosuffix: t > > "{elt}/dir/foo.eln" > > (load "C:/dir/foo.eln" nil nil t) <- nosuffix: t > > "C:/dir/foo.eln" > >> That said IMO this logic is sufficiently complex to deserve a minimum of >> testing to make sure we have it under control. Not sure if the best >> place is files-tests.el or comp-tests.el. > > I agree about this. I am not sure what is the best way to do it. The list= of > files probed is inaccessible from Lisp. Yes but we can always compile a file and load it to see what's inside, this is what we do in comp-tests.el, technically is not a problem if we think is necessary. Andrea --=20 akrl@sdf.org