From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: feature/package-vc has been merged Date: Wed, 16 Nov 2022 22:09:23 +0000 Message-ID: <87fseik0vg.fsf@posteo.net> References: <164484721900.31751.1453162457552427931@vcs2.savannah.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="13341"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , rms@gnu.org, emacs-devel@gnu.org, Lars Ingebrigtsen To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 16 23:10:23 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 1ovQbu-0003Fu-WE for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Nov 2022 23:10:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovQbG-0003oG-SH; Wed, 16 Nov 2022 17:09:43 -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 1ovQbD-0003o1-6i for emacs-devel@gnu.org; Wed, 16 Nov 2022 17:09:39 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovQb9-0007PW-ME for emacs-devel@gnu.org; Wed, 16 Nov 2022 17:09:38 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 87C69240104 for ; Wed, 16 Nov 2022 23:09:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668636564; bh=E2PvMNvsh0POdVvXHcXulsAbK1NfzTvwQYf61KK3eKM=; h=From:To:Cc:Subject:Date:From; b=WESZYuhmoZI5rIRFSsjYXwLiNRfMvYXfzWOfKN4aWGc+9wQOBGatvQuc8Pettf8OO PmW7ku7KdguNVmg7K5nJbvGXfki5znyedcFJPng943qfClhGwfOyhKZbdZYlCw1epF Bbzhg7OCpbiMN8rQjOV1bicxaz8fa9zsVZbIiNQqpbmeX7UZl90WrtgjWInGCmxTTs N2E3jG7NpRo9Z+x7towS/eUX04gzxHfjT6le3MTIzb0cZ2rQ7uIibhpfBwmknGfzTG XfRVsO48ppZWHZBU3hQxZeulUEudYNT4Iu/DjdrCtx1RXRd+IqtwlPpmVDxZuD3Hz5 J8R+3r9y42aFA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NCHJg2fgLz9rxB; Wed, 16 Nov 2022 23:09:23 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Wed, 16 Nov 2022 15:05:30 -0500") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:299990 Archived-At: Stefan Monnier writes: >> 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. I've decided to remove the function entirely. >>>>>> -(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. I wanted to place the autoload file in top-level package directory, but I guess if make sure :lisp-dir gets respected during activation, then this could be reverted. I'd have to check how reliable this is.