From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IFw4GV6HU2R1/AAASxT56A (envelope-from ) for ; Thu, 04 May 2023 12:22:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mNIhGV6HU2SFDQAA9RJhRA (envelope-from ) for ; Thu, 04 May 2023 12:22:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 110A83EB84 for ; Thu, 4 May 2023 12:22:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puW5Q-0008ER-Qb; Thu, 04 May 2023 06:21:20 -0400 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 1puW5M-0008Du-IY for emacs-orgmode@gnu.org; Thu, 04 May 2023 06:21:17 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puW5J-0004PX-Vi for emacs-orgmode@gnu.org; Thu, 04 May 2023 06:21:16 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CCAA724026D for ; Thu, 4 May 2023 12:21:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683195671; bh=Xfa6kQS4s0QRgede+QQJn1snSeJQznYtHhX1zMZbcc4=; h=From:To:Cc:Subject:Date:From; b=Vjkp815S0mgWARM6hznUFqoOXHZgMKafMqHb2tY756ipY3bljgwWqRKCbWYF0F3ld CJuYTN1fEXBI7fuZ9TN9gPCB++eIv3R9zvCFF0e2ObzsHQsavIZWoDpvAhAAOwSuEo YY7YzFfx92F5VwOmscYOfAOPDk9ZemcUDuGcF0dDByLzH+hkUhbp/MllpW2f9+AgIS 7Q+4ZR7sGXhx5y4ZUk/BlS61eVQMLqKPQLl8CDZ0JL7it/kVdwuOmufddSuG66Nnv0 7BvmIwMpBfEp2O6n5kxeJEhxIpYyrsahLt7yF7imdyqf5fQYgFNs3Bti3aPaFpeA0W tGSvdD76hmEuA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QBqbW2nVpz6txJ; Thu, 4 May 2023 12:21:11 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] epm.el: A CLI tool for package.el In-Reply-To: References: <87sfx7degz.fsf@gmail.com> <87v8ks6rhf.fsf@localhost> <87r0t3gahd.fsf@localhost> <87wn2ujk27.fsf@localhost> <87jzymk3dq.fsf@localhost> <87o7nsdkcw.fsf@localhost> <878remykby.fsf@localhost> <877cttirgy.fsf@localhost> Date: Thu, 04 May 2023 10:24:23 +0000 Message-ID: <874jospf6w.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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, RCVD_IN_MSPIKE_H2=-0.001, 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-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683195742; a=rsa-sha256; cv=none; b=NIbeXDpkek5mVArJcep2pB+myPWSmQkL8fMLvADJC7PTMCfhUcULkoylxENN6s/3KmmbeG nygBjUDsw2JhX/XK3AnEeZo+0bizJHcPMyMkGzVopNVfhcxxlS08IrJPBSGvHIw+mmN2rv vN9cN85wrgAHhfSOI5AO6qeE7hFiBOlOm7pDgUEwcqOf5iyAlv0Bl/Q0TcK40Z8086uhd1 1sdx9QtDyDRWU7r1kAftwmZYz0gAN+3C9l5FLOTOimR2lySX8Ms3xUCUkXMV9fkAeE5FaC FPxeiOaZB86dYNvnN0iw8lwZt5CqWue8MQ2WKUmhBLCIPDN/vgpNnDl0QdyWDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Vjkp815S; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683195742; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+wInnKdnQO2l/sKAAx1jVMTncYCMdVCYzTuRsphklFo=; b=gR/pdtBXOhmPOlrfZ+cB4yrjehPeZ99ysC/gvaZZy9cLVSp6lY2X12a0vkVpjCuvroP+KC TWXso3ddH/FjvkB0kChjItOiUIB2q0VnNX5cKffxDHtKUAdjYiEB3EE57xYLdP6GvVfMcp XVoP6PsqSc/CO9sfrPyi3XLakGjruC21f4nr34/INBWBp8UsjrLtqiQ2JQ3JUOJDz829R0 AA2oxTw8/2m1TNcK7Tnncoz7ErXso9LuyAxKFw2tegivexA/B0Ti1mmzdPqJSbeUgEJznk YiyKEWprQ77gw0whHhDkZEYIfOSfevUugriCYYHmhDaZq14OWRlvJHMFxA+Fog== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Vjkp815S; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.69 X-Spam-Score: -4.69 X-Migadu-Queue-Id: 110A83EB84 X-TUID: XtCfWmXxy/tr Max Nikulin writes: >> Good idea. Although, we should not overdo this package management thing. >> If we really need complex functionality here, we should better just use >> cask/eldev instead of re-inventing the wheel. > > I have not tried cask or eldev, so I can not reason on supposed workflow. Cask basically solves dependency management, including tracking outdated dependencies. See https://cask.readthedocs.io/en/latest/guide/usage.html#quickstart It can also be used from Makefile. The downside is that it has to be installed separately. >> Are you willing to improve the draft to be ready for upstream? > > See the attachment. Interface is subject to change to better fit > particular use cases. Thanks! >> 2. By ordinary users, not necessarily familiar with GNU make and all the >> associated build process conventions. > > For those who are not familiar with convention any target may be > specified in docs, keeping usual meaning of the default "all" target. I am mostly concerned about the existing users who are already settled on running the default "make". Their workflow will be broken with your suggestion. >> However, make repro and >> optionally make docs should avoid re-using user packages as it may cause >> inconsistent results if the `package-user-dir' is messed up. > > I agree concerning "make repro", but unsure for docs. I am also unsure about docs. Might be either way. > In general I agree that strategy may depend on specified target. The > only issue that make allows to specify several targets. I am not sure what will be the problem there. make all is also technically several targets. And running something like make compile repro is a bit silly anyway. > An I am unsure concerning user prompt. My main concern is for the users who changed their elpa directory location. They might run into issues unexpectedly. >> I think that it is stretching a bit beyond the complexity we should >> allow within Org build system. In your scenario, I can simply do >> make cleanpkg and re-download the latest dependencies. > > I would prefer clear error message that package version is not > satisfactory. However such feature may be added later. I think package.el technically suffers from the same problem. I do not think that we need to work around it ahead of Emacs. Not until it proves necessary. (and even then, we should better contribute upstream anyway) >>> #!/bin/sh >>> ":"; # -*- mode: emacs-lisp; lexical-binding: t; -*- >>> ":"; exec emacs --script "$0" "$@" >> >> Let's not lock to bash. AFAIK, our makefiles can currently work on >> Windows. Using /bin/sh will lead to regression. > > It is POSIX shell, not BASH. I am unsure if make can be used on windows > when e.g. cygwin is not available. Makefiles are full of POSIX tool > invocations. I thought that more portable way is using "env". > +(defun epm-nonempty-p (s) > + (and s (not (string-empty-p s)))) Can just use `seq-empty-p'. > + ;; TODO (load site-run-file 'no-error 'no-message) > + ;; may be necessary to load elpa-* deb packages when -Q option > + ;; is used. See Info node "(elisp) Init File". Given the explanation in the top comment, is this necessary? > +(defun epm-library-unavailable-p (lib) > + (unless (locate-library lib) > + lib)) > +(defun epm-missing (libs) > + ;; TODO consider `require' catching load errors > + (delq nil (mapcar #'epm-library-unavailable-p libs))) Maybe just (cl-remove-if #'locate-library libs)? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at