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 04c4c578c7 3/4: Allow for packages to be installed directly from VCS Date: Tue, 15 Feb 2022 17:13:56 +0000 Message-ID: <87mtisnjcb.fsf@posteo.net> 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="6646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 15 18:27:39 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 1nK1c2-0001XO-VX for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Feb 2022 18:27:39 +0100 Original-Received: from localhost ([::1]:34824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK1c2-0005tL-10 for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Feb 2022 12:27:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK1P5-0004cH-UL for emacs-devel@gnu.org; Tue, 15 Feb 2022 12:14:17 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:60497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK1Ov-00010T-9j for emacs-devel@gnu.org; Tue, 15 Feb 2022 12:14:15 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A79CB240105 for ; Tue, 15 Feb 2022 18:13:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1644945237; bh=1x0mT8JgBbViNJFm9jo2wHyeE+T/U5tiI1kUcnMLjQU=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=BGj4A+wwOY9RUDp2ms9VPueCDHuFvSUN5h+j6AjARxpb8kYjNCVxdkFEVzF2TPgxw K/SGsFAZr3m+Pi7mJxfBcKxPW2q45mkoUt3mTW0mddSbcs9VPM/m+OgByTZF4FV4Th Y42xduqAI51aJQfJRx0Cg33GPJk93CU/JbzLrn+TeaKDWteS4cvMLNCaCbtDNLYAnP nmZweRA1sUIaz4BG4yBUR33UwWc9lsi07V88VXYyjoyqXpCUnBtTC3KFFsdYyqEv59 g97lQC5P0lM78pSrPL/tqfdDCrXLZrvnRG+5u2ZfgVVt0rCgGpwbJ4FKgcukRz30Vl KG5NNgeSnYwHQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JynkD63KXz9rxS; Tue, 15 Feb 2022 18:13:56 +0100 (CET) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB In-Reply-To: (Stefan Monnier's message of "Mon, 14 Feb 2022 21:58:13 -0500") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_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:286338 Archived-At: Stefan Monnier writes: >> 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)? I get that, my question still remains. Or to rephrase it, what is the advantage of displaying package names with the same names as the directories they are found in? >>> 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"? What I meant was that all directories in ~/.emacs.d/elpa/devel could be automatically detected and loaded. One case where this could be useful for anyone using submodules in a versioned configuration. >>> 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. Yes, exactly (and I agree with all of the above too). Something like checking the mtime of files and/or comparing the auto-loaded files on saving or on startup. > BTW, I think we should choose some `package--` prefix for the > vars&functions related to this new "install from VCS" functionality. If it is possible to extract the relevant functionality form package.el to package-.el, then of course, but I can also try to stick to this otherwise. Do you think this should also include renaming package-fetch? > > Stefan > -- Philip Kaludercic