From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH v2] Add compat.el support to Org (was: [POLL] Use compat.el in Org? (was: Useful package? Compat.el))
Date: Tue, 18 Apr 2023 00:20:03 +0700 [thread overview]
Message-ID: <u1jv45$mur$1@ciao.gmane.io> (raw)
In-Reply-To: <87o7nsdkcw.fsf@localhost>
On 13/04/2023 19:42, Ihor Radchenko wrote:
> Max Nikulin writes:
>> My expectation
>> is that make does not attempt to manage dependencies. For me it is OK to
>> type an additional command to install them and to fail otherwise.
>
> Sure. And you will have such option (EFLAGS).
> However, I decided to enable auto-downloading by default to not break
> the previous working compilation instructions.
For me adding external dependencies is strong enough reason to change
compiling instructions. My vote is for clear separation of dependency
management (even if performed through make targets) and
compiling/testing/etc.
Last years I rarely use make directly to build software besides the
cases when I am involved in development. I strongly prefer .deb
packages. Earlier it was usual practice that "make" or "make all" failed
if dependencies were not provided. Actually often it was configure that
reported unavailable libraries. So network requests may be more
surprising for users than failures due to missed dependencies. It is OK
for e.g. gradle, but not for make to fetch packages. I expect that
maintainers of packages from Linux distributions would prefer to avoid
mixing of compiling and loading dependencies as well.
In my opinion, ideally there should be 3 options for dependency management:
1. Completely disabled. If load from default paths failed than it is a
fatal error.
2. Use specified directory outside of Org tree (~/.emacs.d/elpa by
default) or any other directory that you named pkgdir. Only dedicated
target may clean this directory.
3. Install packages to Org source/build directory.
You decided to make 3 the default variant. I believe, it should be
activated by a variable, e.g. AUTODEP = 1 in local.mk or from command
line "make compile AUTODEP=1
I think, it is better to require an additional command
make autoloads
make fetch-dependencies
make compile
> +package-install = --eval '(unless (require '"'"'$(package) nil t) (message "%s" load-path) (package-install '"'"'$(package)))'
I do not like that versions of dependencies are ignored. I have noticed
`package-install-from-buffer'. Perhaps it can be used to generate a stub
package (e.g. org-build-deps) with Package-Requires line obtained from
org.el. The only purpose of this package is to pull dependencies. It is
just an idea, I have not tried such approach.
>> $(FIND) $(pkgdir) -name \*.elc -delete
>
> Looks fine, except that now we have part of the targets using $RM
> variable and part of the targets ignoring it. I am not sure if it is a
> problem. I am slightly in favour of keeping the existing approach with
> $RM.
I have realized that -delete action is not a part of POSIX
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html
Anyway you removed this line and I like it since I suspected some issues
when "make compile" is invoked twice.
>> Is there a way to express (or (compat "29.1.4.1") (emacs "28.1")) to
>> avoid installing compat in the case of sufficiently new emacs? E.g.
>> dpkg/apt allows such alternatives.
>
> No, AFAIK:
It is sour. Another deficiency of Emacs package management is that
errors during compiling of dependencies do not cause immediate failure
of make.
> +EMACS_VERSION := $(shell $(EMACS) -Q --batch --eval '(message "%s" emacs-version)' 2>&1)
Ideally $(BATCH) should be used, but it is defined below. (princ
emacs-version) is an alternative, but I have not idea which variant is
better.
> -;; Package-Requires: ((emacs "26.1") (compat "29.1.4.1"))
> +;; Package-Requires: ((emacs "26.1") (compat "29.1.3.2"))
thanks
> Subject: [PATCH 3/7] Use compat.el library instead of ad-hoc compatibility
> function set
>
> * mk/default.mk (EPACKAGES): Demand compat library during compile time.
when I asked for more granular commits I expected this change in
> Subject: [PATCH 2/7] org-compat: Enable compat.el
To separate adding dependency and replacing org-compat functions to compat.
Earlier I used the following procedure: git rebase -i, mark some commit
for edit, git gui, unstage lines from commit, create new commit, reorder
and squash/fixup commits on next iteration of rebase -i. Perhaps magit
can do the same tricks as "git gui". If all changes of some file should
be moved to another commit it should be easier to use git checkout
COMMIT FILE.
next prev parent reply other threads:[~2023-04-17 17:21 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 10:36 Useful package? Compat.el Timothy
2021-10-11 14:28 ` Russell Adams
2021-10-11 14:40 ` Timothy
2021-10-11 18:04 ` Joost Kremers
2023-01-27 13:23 ` [POLL] Use compat.el in Org? (was: Useful package? Compat.el) Ihor Radchenko
2023-01-27 13:34 ` [POLL] Use compat.el in Org? Bastien Guerry
2023-01-27 20:38 ` Tim Cross
2023-01-27 21:38 ` Daniel Mendler
2023-01-27 22:29 ` Samuel Wales
2023-01-28 16:04 ` [POLL] Use compat.el in Org? (was: Useful package? Compat.el) Kyle Meyer
2023-01-30 11:35 ` Greg Minshall
2023-01-30 19:33 ` Ihor Radchenko
2023-01-30 19:40 ` Greg Minshall
2023-01-30 21:38 ` Daniel Mendler
2023-04-01 10:31 ` [PATCH] Add compat.el support to Org (was: [POLL] Use compat.el in Org? (was: Useful package? Compat.el)) Ihor Radchenko
2023-04-01 11:38 ` Daniel Mendler
2023-04-01 14:20 ` Max Nikulin
2023-04-02 8:52 ` Ihor Radchenko
2023-04-02 15:31 ` Max Nikulin
2023-04-02 16:04 ` Ihor Radchenko
2023-04-02 16:37 ` Max Nikulin
2023-04-02 17:00 ` [PATCH v2] " Ihor Radchenko
2023-04-03 8:46 ` [PATCH v3] " Ihor Radchenko
2023-04-08 11:15 ` [PATCH v2] " Max Nikulin
2023-04-08 11:41 ` Ihor Radchenko
2023-04-08 16:37 ` Max Nikulin
2023-04-13 12:42 ` Ihor Radchenko
2023-04-17 17:20 ` Max Nikulin [this message]
2023-04-20 9:27 ` Ihor Radchenko
2023-04-28 15:27 ` Max Nikulin
2023-04-30 10:39 ` [PATCH v4] " Ihor Radchenko
2023-05-03 12:14 ` [PATCH] epm.el: A CLI tool for package.el Max Nikulin
2023-05-04 10:24 ` Ihor Radchenko
2023-05-04 16:16 ` Max Nikulin
2023-05-05 9:39 ` Ihor Radchenko
2023-05-06 6:39 ` [PATCH v4] Add compat.el support to Org (was: [POLL] Use compat.el in Org? (was: Useful package? Compat.el)) Max Nikulin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='u1jv45$mur$1@ciao.gmane.io' \
--to=manikulin@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).