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 ms5.migadu.com with LMTPS id 0AFfGsMlMGME2gAAbAwnHQ (envelope-from ) for ; Sun, 25 Sep 2022 11:56:19 +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 4HtmGsMlMGOCkwAA9RJhRA (envelope-from ) for ; Sun, 25 Sep 2022 11:56:19 +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 DB8BF24B4B for ; Sun, 25 Sep 2022 11:56:18 +0200 (CEST) Received: from localhost ([::1]:35718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocOMz-00006U-NR for larch@yhetil.org; Sun, 25 Sep 2022 05:56:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocOLt-0008VA-Ag for emacs-orgmode@gnu.org; Sun, 25 Sep 2022 05:55:09 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:53106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocOLl-0000er-PA; Sun, 25 Sep 2022 05:55:08 -0400 Received: by mail-pj1-x1030.google.com with SMTP id go6so3849782pjb.2; Sun, 25 Sep 2022 02:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=D6a4afGerpMoRmbNFFe+jwiX8B/2vxFar8wPC6PcHLo=; b=NLiDdKZj82HCZHPJ59hqb1JGQDo/FnYE0xFVZ/AGVM0C+fGWavML4HzaIrvQMZqSBC KXNPRA3XzePKTLGaDn8NTwVhgjgO93PVKBwCfdNLU2nvqzkN7qGQHhaCsjsDTGadGPf9 MITdCuCLDwRDXTACSwtIEDXFlNwkFg7N9JrIv52skmC3iBMEc41x/tIIP57qvOx9XGvN uUWQKz+aVtU1O9aS3fUshiPpHbT1vK2rsODJOsqIaMjfU6CGtN/w+QUoSv1KTBFe64Tj TOJvpDfsBVJi5YAJ1MQl2MnwwX25856RknxAE1i+W+1dJ76FKXqyjWVwURK0liSa7s1F mYhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=D6a4afGerpMoRmbNFFe+jwiX8B/2vxFar8wPC6PcHLo=; b=TjTVbnR5tt6/vC0yIWPy8j3pxngzfKYaNjphFHkNOZ+geEn8RTPAbcW5v2uUtZJvoF R33L5ITn+0WdQw6I6hgXdIwchhUvcE5Ks0HRag4Zhe2aOzFP+oXbfLwcxw0jDA4pMStI Fv0YaDubVE+g08y39WTgu4HsXgJWB9+aHe9/tiP93uCsJFRotDHxt4nhzxeKhwh97YXp ZVy+rhfsQlowMlDgW0b1dZ0kVh3yQLhyt0MXKcQXOdFqMtzOVShKQJQmcD7xxBtJrd+9 NxDmV/TokiO6xLuK7KfoOoGfrlkWsFCeWl0OSInxnmKAKYUQqi/GtRrTKii4I0Nh52m3 BPEA== X-Gm-Message-State: ACrzQf2CfAAgHd2W5eaqjBi6Y1cbjn1gPNC4y6xEm/gngGpO8f7TQkcv ZnEFaV9HNIFIjG+r/CvBy2kFne/9W0xvDQ== X-Google-Smtp-Source: AMsMyM73kcP8d78uoGIamiPR0RXZgF+PQdD5w8tC54Qj2/IMb9dont/FTlLneDSXfSzU+ctJqwVV3g== X-Received: by 2002:a17:902:7c11:b0:178:a6ca:4850 with SMTP id x17-20020a1709027c1100b00178a6ca4850mr17540939pll.111.1664099698021; Sun, 25 Sep 2022 02:54:58 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id z14-20020a17090a398e00b002008b7c9764sm4413061pjb.50.2022.09.25.02.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 02:54:57 -0700 (PDT) From: Ihor Radchenko To: Bastien Cc: Stefan Monnier , emacs-orgmode@gnu.org Subject: Re: org-assert-version considered harmful In-Reply-To: <87pmfjpzfw.fsf@bzg.fr> References: <875yhsujkq.fsf@localhost> <87h71ct10n.fsf@localhost> <87tu5bbajh.fsf@localhost> <87r10ey8ov.fsf@localhost> <87o7v4dvon.fsf@gnu.org> <874jww16w3.fsf@localhost> <87pmfjpzfw.fsf@bzg.fr> Date: Sun, 25 Sep 2022 17:55:38 +0800 Message-ID: <871qrzsrqd.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" 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=1664099778; 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=D6a4afGerpMoRmbNFFe+jwiX8B/2vxFar8wPC6PcHLo=; b=D0oXteOufmymZfUUGxta2DyvVXWMh2Kr2ebq2ApYcsmTzAuJIwOl3mubxPjMcoSa0tn3+T fYd97ICutdxbWhEeDDFhe1vXaOSJ3K922fvQBLhLOF2rocZVWhTwoHxk8JQKXHHbAtfiBg 8U4zHMkWLv3ijeYlg58tCP2ScF5sZRypgWmAT+tRH/B60Oc4g7vBvUB/jpHeMUc55Dwt0i CbvlFJz+cuSGhz2XuP0Gfs/AKoZ4bMPbhgT1Y/hK+cHFKOUtpQCTpYtGOlhqc7hg+DOtq8 Ev8/DTISA1KOpO8lnlKgHPex4yBuNtKn0fnOoFAYgOFnIssyt4YOIctXqLlF0w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664099778; a=rsa-sha256; cv=none; b=dzMdg9yA3NSpF7cMWq6PtjYYVPD7zYucrr1Z6X636amlvpVuC1io4z+pOjfd/ajmg0w1Pj q+rPO/d3+RsNfn+DZl594R8dnvHMs+aLgz9+9kQzjD4kmFA1VFy7igYHOR0ukkYIcSkhKk LBDL6Uj35ai1HHqckjY3S/MpnBUntzuL1evB5QQ+4P4+Tcm47C6VBFaqP9ZMZlWG5Ytw38 BmqRk0u9ULCnnHGQCv24kI6tyMzX6BAqhJcEdVvtGG2CU1vyyNqXzIcaSwNUhBpSZQGM1I PaUApR+eAAp6cbKBnmxa7n0CHjDxcGfJ9iQZLFNGwleYmBU3Fa5/KfAJLUNhVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NLiDdKZj; dmarc=pass (policy=none) header.from=gmail.com; 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: -1.85 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NLiDdKZj; dmarc=pass (policy=none) header.from=gmail.com; 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: DB8BF24B4B X-Spam-Score: -1.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: eS3gXtovSKe2 Bastien writes: >> Should we use the next planned release version number on main branch as >> a convention? > > I'd rather use the value set in the ";; Version:" header. > > It is "9.5.5" in the bugfix branch and "9.6-dev" on the main branch. Makes sense. > I'm not even sure we should keep `org-git-version' at all: if we need > to distinguish between pre-release states, it seems easy enough to set > the header as 9.6rc1, 9.6rc2, etc. > > WDYT? 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. > PS: I have a vague memory that Stefan suggested to look at how things > are done on bbdb.el: > > https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/lisp/bbdb.el?h=externals/bbdb#n4750 > > If we can remove the complex Make machinery we have right now, I'd be > very happy. One reason for this machinery was to avoid merge conflict > (thanks to getting rid of the Version: header), but we do have these > conflicts (now that the header is back) and they are easy to solve. 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. 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). -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92