From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: feature/package-vc has been merged Date: Wed, 16 Nov 2022 15:05:30 -0500 Message-ID: References: <164484721900.31751.1453162457552427931@vcs2.savannah.gnu.org> <83bkpjynmj.fsf@gnu.org> <87iljqya44.fsf@posteo.net> <8335auzo9s.fsf@gnu.org> <87zgd2ws8z.fsf@posteo.net> <831qqezkxj.fsf@gnu.org> <87y1slgq3m.fsf@posteo.net> <87bkpgfsqv.fsf@posteo.net> <87educ9fei.fsf@posteo.net> <8735as9cfb.fsf@posteo.net> <87pmdv98du.fsf@posteo.net> <87zgcz7qyy.fsf@posteo.net> <87mt8qnbaa.fsf@posteo.net> <87o7t6lr45.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17198"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Eli Zaretskii , rms@gnu.org, emacs-devel@gnu.org, Lars Ingebrigtsen To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 16 21:05:59 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 1ovOfW-00049d-Vf for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Nov 2022 21:05:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovOfG-0002et-Ie; Wed, 16 Nov 2022 15:05:42 -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 1ovOfD-0002eP-UO for emacs-devel@gnu.org; Wed, 16 Nov 2022 15:05:40 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovOfA-00042d-6A; Wed, 16 Nov 2022 15:05:39 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6D45A1000C9; Wed, 16 Nov 2022 15:05:33 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A34CF1000C3; Wed, 16 Nov 2022 15:05:31 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668629131; bh=MScajq+JMQWvIJpr1lam6w0lQQoBe23QIVWRl0kvoGU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HiZ41DyV8W86+M0jDxgYoN7GgK6q8NVzkdDT7v6Bkb9kVf6qVPK/BHtPXnSB6+muZ rgxRMyULAUoGJtW5erv7hJViLZEDR6d5yZ7vmMO4BHGLl7y/zgSG2/YzYwQiG0C2g8 HUIf/ddIEx8XaT5dbKRrl8LfRPkRN4OSshpqS9nXaVwlVcDsoAJiGG0JnK+ySQkOin EUNjGLSridbH0nMnMv65cjViQMD198vghhhsTvblMYY3HuJI7JCyvQu1nCY6zdn0k/ EdffvLvXdNNkSASicl0X6yC/EM8w1FAETgFhSjtpaKoai4r5ZDXmfTgxi5xfGaBZ+g A2g2YsvQZlZ/w== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8E756120840; Wed, 16 Nov 2022 15:05:31 -0500 (EST) In-Reply-To: <87o7t6lr45.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 16 Nov 2022 17:57:14 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:299985 Archived-At: > As mentioned below, I think the harm is that unintended error could > appear. But I get your argument too, that mistakes should be fixed in > general and having these pop up during byte compilation is a good way to > make these more noticeable... Either way is fine by me, every use of `lisp-dir` should come with a comment justifying it, IMO. >>>>> -(defun package-generate-autoloads (name pkg-dir) >>>>> - "Generate autoloads in PKG-DIR for package named NAME." >>>>> - (let* ((auto-name (format "%s-autoloads.el" name)) >>>>> +(defun package-generate-autoloads (pkg-desc pkg-dir) >>>>> + "Generate autoloads for PKG-DESC in PKG-DIR." >>>>> + (let* ((name (package-desc-name pkg-desc)) >>>>> + (auto-name (format "%s-autoloads.el" name)) >>>>> ;;(ignore-name (concat name "-pkg.el")) >>>>> (output-file (expand-file-name auto-name pkg-dir)) >>>>> ;; We don't need 'em, and this makes the output reproducible. >>>> >>>> I thought an alternative was for `package-vc.el` to call this function >>>> with the `:lisp-dir` as `pkg-dir`, so we don't need to change this part >>>> of the code. >>> >>> I might be missing something, but the previous signature was missing a >>> package description object that the change required. >> >> No, I mean that the change should not be needed (and hence the change >> in signature shouldn't be needed either). > > If there is any place where :lisp-dir this is needed, then here, because > this is the place where the auto-load is generated containing the > `load-path' modification. If I don't have the package description, then > I cannot infer the right sub-directory. I don't understand: in my mental model, package-vc would call (package-generate-autoloads 'org "/foo/bar/org/lisp/") and that would generate the right autoloads file with the right modification of `load-path`, and then `package-vc` would just need to create an additional /foo/bar/org/org-autoloads.el file which simply loads /foo/bar/org/lisp/org-autoloads.el. Stefan