From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= 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: Mon, 1 Jun 2020 21:42:50 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="114956"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41242@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 02 02:44:10 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 1jfv2I-000TnL-BU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jun 2020 02:44:10 +0200 Original-Received: from localhost ([::1]:55630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfv2G-000179-Ro for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jun 2020 20:44:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfv2A-00016x-Dh for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2020 20:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfv2A-0004Uq-4y for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2020 20:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfv2A-0006d3-36 for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2020 20:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2020 00: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.159105858825414 (code B ref 41242); Tue, 02 Jun 2020 00:44:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 2 Jun 2020 00:43:08 +0000 Original-Received: from localhost ([127.0.0.1]:37346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfv1I-0006bq-1J for submit@debbugs.gnu.org; Mon, 01 Jun 2020 20:43:08 -0400 Original-Received: from mail-ot1-f44.google.com ([209.85.210.44]:38172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfv1H-0006bR-2A for 41242@debbugs.gnu.org; Mon, 01 Jun 2020 20:43:07 -0400 Original-Received: by mail-ot1-f44.google.com with SMTP id o13so9579627otl.5 for <41242@debbugs.gnu.org>; Mon, 01 Jun 2020 17:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0YVXVksGPjFbzO3u5bvKiKb89GNUnh7u6zoHo+6LDYc=; b=WIfyC/7HKWxJWD0lRwCUU9Uq/YBylGNPmBcTw8MrEGjKdgEJcVFg/lghYY3v0NqbSv CJ9Pza+fGzTZpjNS32fe5OpU7SoQ9tE7Mc6YzCian5AGxB2tihjUV/TXTBn21KA6SzNN rLVrLHY/eKcAytnzbpFGRu0fN99kUzFhxnrg3n5WsR0ydEmNI5iL6vJv0EIEtE8v5ZgF QxkVIOVQFNUrJ0wt8DvXSb/q6ftkrkUj+3Vxp58vaheWVywqWooEqvFVA1vGGC7zfg6H W8idrAyEFCR9FtFfoYWybNlkhfPQhUAdLGgzcSgMXyfLFhDdKebLVr1+MaqeOJFMtqnu n84w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0YVXVksGPjFbzO3u5bvKiKb89GNUnh7u6zoHo+6LDYc=; b=Cq9MyMFYW4bV/PhT5SkNIOBlvxlPa4+mT8ixpVy4PNechFgguudiSvhmFp74Gf7L/U dM1rAWxsRMQxgA+NG1xCvY6ZA3o1vSBTh4oZvettn6YQ+tZ2mabgzaFC5zrRDZCAoe0k 7c68r8esLTMOlwlrTXOYK8lwSV6ohCeY5KfD3B8l5qQWNPvAzdrDL9DbaS+ou/Bakxeg 5on4WhhUqACdQhE6nvt8hsvtGqbtQ1A/2JcKsz8UBcdeGyyNyG6rlLCZC3V8b5EMDyke /AB8MsuidgIL/kX5Am7NaM7im3MYBRpW6Icj6M0ePTne0FwKbg26G0Ao4ltjwnXs7lJn cizA== X-Gm-Message-State: AOAM53197X1hcJ61ADCehNM8+WXxycJJH3Gh77ojz+NxRaGojPCQCt7D V1mi0GTmNHKW+2VKetwVXweunBM6iygSDjbXlmQ= X-Google-Smtp-Source: ABdhPJyUTKy6Bz0SH+lHc5OvySdRlBpQhpor5oduQ8dvSIrcN/SWqdzzK6zYjLDSWDDyZgpwdXFALeh7AAcXd+5lFB4= X-Received: by 2002:a9d:5f09:: with SMTP id f9mr18515948oti.202.1591058581297; Mon, 01 Jun 2020 17:43:01 -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:181385 Archived-At: > In which folders are we going to search if we do (load "...a/path/foo.eln")? > 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 perverse 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, even if it leads to trying to open absurd filenames. 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. Thanks, Nico.