From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How does one find out what file a library has been loaded from? Date: Wed, 03 Aug 2022 17:19:07 +0300 Message-ID: <834jyt5s10.fsf@gnu.org> References: <83bktlnuog.fsf@gnu.org> <83ilnmfq9t.fsf@gnu.org> <83ilnd4f72.fsf@gnu.org> <83bkt226a7.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 03 16:21:00 2022 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 1oJFF5-00006b-Ut for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Aug 2022 16:21:00 +0200 Original-Received: from localhost ([::1]:48160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJFF5-0002zc-2S for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Aug 2022 10:20:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJFDO-0001GW-Mo for emacs-devel@gnu.org; Wed, 03 Aug 2022 10:19:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJFDO-0004j3-4Y; Wed, 03 Aug 2022 10:19:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=yeAC0Iwcae/Q2ZDPJb7jI79ChEili5l/0/HHYvuK2T4=; b=YWfxI8jS/M+I CLSQhHfC9VeK3TwG6TK4itKxAOFNNgZ57t1ms84Oz0iQk9JriS2BhyNoNSSC7fBm7L0b7D06apYkf 8DtxlNercOIgX3ev5cmdO1J9olm0lrNslg/nyvTNWRU+mh1s3zLVt0bm1QYoZGUNSxWBd8JHkf+LV mwJhQ1V3geioDIdNuzinAMxy09THl7b2DfUm6pxWS4Gn592zt3sYGxtV9Tn4i8SEUd5wCzhhqw4KM bPKgA3oWMbV+nRmu6BhkY0lqcQAKgbbnJpCl8A7XFPZKFy9xUgOf/WCeX0lqzg6rV+1oeQwOliHfM 7Gz0bQ/KgXhjkQqmhUHuYw==; Original-Received: from [87.69.77.57] (port=4563 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJFDN-00009h-5j; Wed, 03 Aug 2022 10:19:13 -0400 In-Reply-To: (message from Andrea Corallo on Tue, 02 Aug 2022 14:13:58 +0000) 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" Xref: news.gmane.io gmane.emacs.devel:293023 Archived-At: > From: Andrea Corallo > Cc: acm@muc.de, emacs-devel@gnu.org > Date: Tue, 02 Aug 2022 14:13:58 +0000 > > > So in that case, my changes would return the .eln file even > > though it was not actually loaded. > > Ops that's correct, I miss-read your code sorry. > > > We could document this corner use case, and say that we return the > > .eln file even if it's outdated, or we could add the timestamp test > > you suggested, and return the .elc file if the test fails. > > I think would be nicer to have the timestamp test. > > Still if the filesystem state changes the result could be incorrect, ex > one could even remove the .eln file and even if the definition is coming > from it we'd return the .elc. Perhaps we should document this? OK, thanks. I added the timestamp test, fixed the typo spotted by Alan, and installed the changes together with their documentation.