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: Request for Feedback: Adding VC support to package.el Date: Mon, 14 Feb 2022 14:32:14 +0000 Message-ID: <87ilthy0wh.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="11395"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 14 16:47: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 1nJdZi-0002ni-Td for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Feb 2022 16:47:38 +0100 Original-Received: from localhost ([::1]:52794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJdZh-0000hk-Fw for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Feb 2022 10:47:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJcOt-000218-GE for emacs-devel@gnu.org; Mon, 14 Feb 2022 09:32:23 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:34159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJcOo-0008Uc-UL for emacs-devel@gnu.org; Mon, 14 Feb 2022 09:32:23 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 55F44240103 for ; Mon, 14 Feb 2022 15:32:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1644849136; bh=rjqubN2JQQS2rIdQ59K1RS7wZIzFmCUTXqsn2bwk1EU=; h=From:To:Subject:Autocrypt:Date:From; b=Q8RzSy53yp/+cFo3Xkr5ZzxmeX6cV+iW5edF11hZ6jtcoXW37IN06U3YRypAHGuet T54UW1izrugpWtTZQoQ3K/HoZAy5lkoPXv1tgxftrTYRObawDXNdKCB1HuP98WLpq7 1MZ/DIYkOIt/Rc+sDN8pKSTIJ0RrI2YgrXfMqNw3/JeZ7eLZczm1MvIILF++8ACRGF bPk5Byv3Owp9IjqkWAuWfqDsruzI6aGCefrzehlquPznYVyKmfy2mSQ1E53YpeFRHd EMq1Ubl5fkKEdkScS2SeKpoH5OR35qHNL4DmVPsWsjho7xsj6CMYrVxlgkR4sb1OVL yT8ogFUg0Krxg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Jy6B73qQJz6tmq for ; Mon, 14 Feb 2022 15:32:15 +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 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:286281 Archived-At: Hi, I have just pushed a new branch (feature/package+vc) to emacs.git. It implements a `package-fetch' commands, that was proposed and discussed on the mailing list last December and last August[1]. The main difference when compared to `package-install' is that it doesn't download and extract a tar archive/single .el file, but clones a remote repository directly into ~/.emacs.d/elpa/devel. To avoid depending on a specific VC, I have added a vc-clone function to vc.el, and implemented a Git back-end. There is certainly much that can be discussed here, so I didn't want to waste too much time adding implementations for other systems right now, but if this branch is to be merged at some point, adding support for other applicable back-ends should be done too. Currently, you can pass `package-fetch' a URL, in which case it will try to clone it directly, or you can pass it a package name, in which case it will check if the package has a "VC" header, indicating the upstream repository to clone. My suggestion would be to extend elpa-admin to insert this metadata into the archive-contents, so that each package on the ELPAs can be `package-fetch'ed. In case there are missing dependencies, they will be installed using `package-install'. The "source" package is then processed and activated just as a regular package would be, with the minor difference that there is no additional signature processing. Packages are deleted by `package-delete', just like any other package. The current state is still primitive and probably unstable. Missing features might include: - Checking if the user already has a regular install, that might be modified, and attempting to apply these changes to the VCS checkout. - The ability to send local changes as patches to the maintainer of a package (I implemented a rough draft of how this could be use with the command `package-contact-maintainer', but I didn't figure out if VC allows for a generic way to prepare patches that could be attached to a message). - Managing upgrades of potentially diverging source packages, preferably via the list-packages interface. - Overloading `package-install to also allow installing source packages. My idea was that if `package-install' gets an s-expression as a package-name of the form (NAME :repo URL :rev REVISION), then it would defer the request to `package-fetch'. The advantage here is that it would make it easier for macros like use-package or setup.el to handle both kinds of packages. Either way, I would appreciate it if anyone who has the time could test the code and see what works as expected and (more importantly) what breaks it. Adding this kind of a functionality would be a significant step towards improving the practical, shared software freedom of Emacs users, by reducing the barrier towards contributing their improvements and extensions upstream. [0] https://mail.gnu.org/archive/html/emacs-devel/2021-12/msg02770.html [1] https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00295.html -- Philip Kaludercic