From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KLAIGnQsMGNqVAAAbAwnHQ (envelope-from ) for ; Sun, 25 Sep 2022 12:24:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cMEeGXQsMGOp0AAAG6o9tA (envelope-from ) for ; Sun, 25 Sep 2022 12:24:52 +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 2E2B825529 for ; Sun, 25 Sep 2022 12:24:51 +0200 (CEST) Received: from localhost ([::1]:60714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocOob-0005ui-Ee for larch@yhetil.org; Sun, 25 Sep 2022 06:24:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocOo8-0005tF-PI for emacs-orgmode@gnu.org; Sun, 25 Sep 2022 06:24:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocOo7-0004m2-RN; Sun, 25 Sep 2022 06:24:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=DfaphsXyN/wDXyNU8zc5BGS9LufrYqwDNjLSBoutqz4=; b=DG5o55sMO/jIeacz7Zyi cs26CzWnCQqHJp9mCOrD8PgN1IGXRGpg5SYE3CQTH7RiQ41QjNf50V2l3uYQ4uUPzegYPqEMosb+r faXgbHEeOOhY9MV7ojF9/viK6iEeEh8pMn/UUrpHTJ57361WSusB97tX+EHidMJMxiLZSbcdDLXwk 144ql6ACJG16GWZJ3G1cmn/GFJoQusH2SeSOhHqhYPzhUf48jKdCJwyO7SQ8gZlGUVkgAYJz+OXMB u/3qKxUt75SVYjJEtLHE9mntkAOK8z9adRYi/+EDLEqwj9sPQPC8HuZT36N/Tig4tAMS+/dn3BCQu aNrQAW9OEmNQAA==; Received: from 96.52.140.77.rev.sfr.net ([77.140.52.96]:34024 helo=hal) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocOo7-00063u-HK; Sun, 25 Sep 2022 06:24:19 -0400 Received: by hal (Postfix, from userid 1000) id 0CCB21E0409; Sun, 25 Sep 2022 12:24:17 +0200 (CEST) From: Bastien To: Ihor Radchenko Cc: Stefan Monnier , emacs-orgmode@gnu.org Subject: Re: org-assert-version considered harmful In-Reply-To: <871qrzsrqd.fsf@localhost> (Ihor Radchenko's message of "Sun, 25 Sep 2022 17:55:38 +0800") Organization: GNU References: <875yhsujkq.fsf@localhost> <87h71ct10n.fsf@localhost> <87tu5bbajh.fsf@localhost> <87r10ey8ov.fsf@localhost> <87o7v4dvon.fsf@gnu.org> <874jww16w3.fsf@localhost> <87pmfjpzfw.fsf@bzg.fr> <871qrzsrqd.fsf@localhost> Date: Sun, 25 Sep 2022 12:24:16 +0200 Message-ID: <8735cfn44v.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664101491; 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=DfaphsXyN/wDXyNU8zc5BGS9LufrYqwDNjLSBoutqz4=; b=ZRJmqaiwRkVPQVMfCGmnkW3dza/JRrqmUf1gbSCLGBDZgfZi4xVC2dk7hTQH1ex+0uIIis lA5Rro49fBxVWmiR97+d4jyVumfzB2CqETrpPwZ9uXRnh4Eslztt1FiZKXCno3UPzj3vPT iu6JJo9JCPMZ4aKA5+QvK/zHaAKtAugz7WebyyOvXgYC4wr3beTOVdVp/pcwOE/ec+oXXp 0RgVkozIyLsYNtr7ioA3LbmuAX4BhqFb2Sh3B3h9Ske1nnSTh2mm8hU7X3esYcN2D7pgEy ij/EmdM0LyLdFnpiP0nY3GjZ1b87eLZo6qABkm67njGkTU1dqeCA9WWeKd+QQw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664101491; a=rsa-sha256; cv=none; b=UoRZ1SNUfry+IuJKOLudchHsCnmjBzW9c05RuLBP6tLHGrtgWwRBoIDNgZc3daR+9ribnS 8sERzulmi7eqDo48QdsTPWDl8t9yvCn5VaH98emD1FgC/tf4PAix9iORh7AXtGYwFdQDok holbUw5TTPyNTNDsmZSiZ4fvkpLlzMT2Xx/4DcST80AjAp8WdXkojXVFyA+91J6E2ZtSBE ppSeTZAlI0R++WGzwH5QUWWUOMlxZxUtTyq7ESZ94BFshWO4+6h53h46fH8CLa4KkwR5nn kDE+tLAtKS97ar7JCZHGXEt34QO8mQpmneuAeO0Ekw9CtPTAc6Nn2HYsbjtCcg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=DG5o55sM; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.55 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=DG5o55sM; dmarc=pass (policy=none) header.from=gnu.org; 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-Queue-Id: 2E2B825529 X-Spam-Score: -3.55 X-Migadu-Scanner: scn1.migadu.com X-TUID: xa2LjGwZEiVE Ihor Radchenko writes: > org-git-version is very useful when people report bugs. > M-x org-submit-bug-report supplies org-git-version output for bug > subject. Thus, we can easily check which git commit their build > corresponds to. Let's keep `org-git-version'. If we manage to release Org more often (minor and major versions), I doubt keep `org-git-version' will remain that useful in practise, though. Let's revisit the topic then. > I am not very familiar with all the code paths our Makefile and > autoloads take from setting ORG-VERSION to generating the appropriate > Elisp constants. > > However, I do note that mk/targets.mk contains the following: > > ifneq ($(wildcard .git),) > ORGVERSION ?= $(subst release_,,$(shell git describe --match release\* --abbrev=0 HEAD)) > ifeq ($(ORGVERSION),) > # In elpa.git, there are no tags available. Fall back to using > # the org.el header. > ORGVERSION := $(patsubst %-dev,%,$(shell $(BATCH) --eval "(require 'lisp-mnt)" \ > --visit lisp/org.el --eval '(princ (lm-header "version"))')) > GITVERSION ?= $(ORGVERSION)-g$(shell git rev-parse --short=6 HEAD) > else > GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD) > endif > GITSTATUS ?= $(shell git status -uno --porcelain) > else > -include mk/version.mk > GITVERSION ?= N/A > ORGVERSION ?= N/A > endif > > Note that we already have a way to parse Org version from lisp/org.el, > similar to what the commit you referenced does. > It is just that this code path is not used by default. I'd favor using it by default. When using Org from the main branch of the git repository, M-x org-version RET should return this: "Org mode version 9.6-dev (release_9.5.5-822-g0a6a56 @ [load-path])" > We can remove the current default and simply use > > ORGVERSION := $(patsubst %-dev,%,$(shell $(BATCH) --eval "(require 'lisp-mnt)" \ > --visit lisp/org.el --eval '(princ (lm-header "version"))')) > GITVERSION ?= $(ORGVERSION)-g$(shell git rev-parse --short=6 HEAD) > > all the time. > > I do not know if more involved fix is required (because I am not > familiar enough with the relevant code). Can you provide a patch for the above suggestions? I'll test and see if more fixes are needed, even though I'm also not that familiar with the code either. -- Bastien