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 04c4c578c7 3/4: Allow for packages to be installed directly from VCS Date: Mon, 14 Feb 2022 21:58:13 -0500 Message-ID: References: <164484721900.31751.1453162457552427931@vcs2.savannah.gnu.org> <20220214140020.04438C00891@vcs2.savannah.gnu.org> <87bkz9tbcj.fsf@posteo.net> <87o839ypx6.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="34852"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 15 03:59:46 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 1nJo4A-0008v6-3I for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Feb 2022 03:59:46 +0100 Original-Received: from localhost ([::1]:34968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJo48-0008Ui-NT for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Feb 2022 21:59:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJo38-000751-4Q for emacs-devel@gnu.org; Mon, 14 Feb 2022 21:58:42 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJo2x-000855-F8 for emacs-devel@gnu.org; Mon, 14 Feb 2022 21:58:34 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6834C440161; Mon, 14 Feb 2022 21:58:28 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2CF48442306; Mon, 14 Feb 2022 21:58:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1644893900; bh=VHAjb5yrcWxFL7ePQ9eOwO8pnEUN7kvPj5K9obWa63g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cXSVDlZ8JWQ01m1i0rLkT3egS13ex4s/lGp/INFL9iqtFj2gF5rcuXXd2827qfIIa xIEA+plYEL7o/8S+9QK6s6pieZujekYuoO75mNrlt2EOZg1i/+QqFFmAO3QW+BUwcl RQSVNDerV+D6FbE/wMTnL1lEqtSI7oLdf6XgXcayCMntSBj4k3ejd9UXRAFHHYOK2D APoWzNCQ9nnuotr1MqvWKb/KlMiSv6r1kBvxUiqSJYXj7GPtAMEjxpQEZOTCaJbEuA QPC5b2vP7BQ3yT1Ez1FnkWsQYShGTRmwrrqz87l/jHyHMR+MoDHOHQ8YMQM1wWphtb qeBCEMG88/CTg== Original-Received: from ceviche (unknown [45.72.237.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EE750120281; Mon, 14 Feb 2022 21:58:19 -0500 (EST) In-Reply-To: <87o839ypx6.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 14 Feb 2022 23:44:05 +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, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:286306 Archived-At: > The -devel doesn't necessarily indicate that directly, I just meant it > was worth somehow explicitly indicating that this is a VCS-package. But what I'm saying is: why not put no "-*" at all, since that's what `package.el` has been using so far for those cases (tho these had to be "installed" by hand)? >> IIUC for those VCS-installed packages we generate the -pkg.el file >> ourselves, so it should be fairly easy to make sure that file provides >> the needed info so we don't need to guess. > > Yes, but again, if I just clone a project into elpa/devel, this won't > work. It could be argued that this shouldn't be supported because it is > a different issue, and the elpa/... directories maintained by > package.el, but in that case I would like some other way to have > package.el manage non-versioned local source. I'm sorry, I don't understand what you're saying here. Who&how does "just clone a project into elpa/devel" and what do you mean by "elpa/devel"? >> For the rare cases where this is not the case, the `:main-file` property >> of the package spec should tell us which file it is. I'd rather not try >> and guess. > Ok, I didn't know that :main-file was propagated into the package > specification. In that case there should be no issue. The package specification is written by hand into `elpa-packages`, so nothing propagates it from elsewhere into the spec, AFAICT (other than a human, that is). I think we need to clarify our assumptions because we seem to fail to understand each other. The way I imagine it working goes as follows: - `elpa-admin.el` will be changed so that the spec from `elpa-packages` is propagated into the metadata in `archive-contents`. - when VCS-installing a package, we basically start with that spec (tho it can be reduced to a simple URL in many cases). - those VCS-packages are installed by cloning them into a directory with name ``. - During installation we auto-produce a `-pkg.el` file (and the `-autoloads.el`, of course), so that `package-activate-all` will do the right thing. - We somehow/somewhere/somewhen update these `-pkg.el` and `-autoloads.el` files sometimes after a `git pull` or equivalent. A simple way would be to provide some `package-vcs-update` command or somesuch (which would also recompile the changed `.el` files). - We could also arrange for `package-activate` to try and detect the case where the files were updated manually via `git pull` and emit a warning prompting the user to refresh that package's generated files. This same command which refreshes the generated files of a VCS-installed package could probably be used by users who want to do the `git clone` by hand. BTW, I think we should choose some `package--` prefix for the vars&functions related to this new "install from VCS" functionality. Stefan