From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cOGQE9XD3GS2LAAASxT56A (envelope-from ) for ; Wed, 16 Aug 2023 14:40:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2BYrE9XD3GSFJQEA9RJhRA (envelope-from ) for ; Wed, 16 Aug 2023 14:40:53 +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 9FE2B4C994 for ; Wed, 16 Aug 2023 14:40:52 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CF7MSqrz; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692189653; 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=nhV6paiE7D8+ItPqgy8VUs7thzMF/NMvKX53mp1F/1c=; b=KOn3XXe91xkrSjlV90ErOWaoX4tsA2HzQZxdVr+2lceFJWCH8VlDmRg4p1HjKR1E0DOJkL JyW82s+fAzj3ztewinLbR84/dkOimGXqv5mo8YMU9p8sXGPd/+KoTAbf1jm6Qnqw0MvmX5 SMZ62ZAedAa5Nq+xU/gTdyDMPdfK1s6js/cPl71/y++PESiOclYA9XLkTJ11qJPyIlh66c WrIO1FScPP6wXjBPDUBKy0mFCVC+ftntkYnICf+qKbmQQ6J3eXyfy9jyONoqGJ4n2/Ukvo P+bNOQ4XnlSMmTbX4pAF3QlbWErOaBECRfLIZcWKQ5pm8shiil+18aFWSmsPyg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CF7MSqrz; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692189653; a=rsa-sha256; cv=none; b=lQWHShDMD1Mk+i1tf0w/GYk8zbq97p/BxJE9w5FzUzkgjyB9MPw7GRBkOM+RM43y6uHqxD BMJ/Od122aEn5gbz8RPrQIgV7Hj4YA2sDhqKm3kzLlHXDp0B945XbD5qSZRyXLdDbHPV4m aOPH7W8lapIzVmJngywWheFleZQV1Cb4MdzCKkdBjXZ3QdPRZCKqz8UuT8GnL2/rUrtISX eYjWNebN17mx79UQonub0IxGiZavmwJUQ0Rep/CoxZUyaVUfKXoT7m/RuaFW3/UWwCEfw+ 5T8x1CQ/6YIbfgR/+KMGzhgazDknHw0QYoQ/raqeyh2H08LYT9HAUdJtaE3ilQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWFpQ-00016l-3h; Wed, 16 Aug 2023 08:40:48 -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 1qWFpP-00011o-3G for emacs-orgmode@gnu.org; Wed, 16 Aug 2023 08:40:47 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWFpL-0002KX-9B for emacs-orgmode@gnu.org; Wed, 16 Aug 2023 08:40:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C4242240101 for ; Wed, 16 Aug 2023 14:40:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1692189640; bh=3JcZ0udrkEahnfBOnW2eTsp8lZISVBjw3PVId1fs3JE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=CF7MSqrzWq+hIFR+6RN3RJo8XNkotN7LvPLbaKxob8HUEmCpuj+di4ldulcDh+ISj gOgFj/yrG3rJpI8QmdvCM0tU68NylPCOAiTDl/+A1T3a4S8ueFQNCzphA7nL4YZP72 oNwGgyy1yI06rvBELHTw2PBnVUr5T8GjhneSzNvzbs9AgL9z48tAAsluNwlxLAt7TA 6iF+JhtDcP1cnW7hSjHdjV2djEyliW1PEk5gldQOPGvaDhYrNBwbUdA0d7UgtF8fIe BH1+agdHklTAqkYslm3Y1dCF4gr0XfCNzZBDtZSemdcMT+CRam2CYO39/nIY5PnJdC LUNVeD7usESOA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RQnmS0MS7z9rxM; Wed, 16 Aug 2023 14:40:39 +0200 (CEST) From: Ihor Radchenko To: Stefan Monnier Cc: Tom Gillespie , "emacs-orgmode@gnu.org" , Bastien Subject: Re: org-assert-version considered harmful In-Reply-To: References: <87h71ct10n.fsf@localhost> <87tu5bbajh.fsf@localhost> <87r10ey8ov.fsf@localhost> <87o7v4dvon.fsf@gnu.org> <87pmfijrvw.fsf@localhost> <87y1u4ec18.fsf@gnu.org> <871qqnjjdw.fsf@localhost> <87zgd85vc9.fsf@localhost> <87359yl2w5.fsf@localhost> <877cz7jucs.fsf@localhost> <87h6oznt28.fsf@localhost> Date: Wed, 16 Aug 2023 12:41:08 +0000 Message-ID: <87r0o3p3bv.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 X-Migadu-Queue-Id: 9FE2B4C994 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -9.38 X-Migadu-Spam-Score: -9.38 X-TUID: jOKrmXEZheaE --=-=-= Content-Type: text/plain Stefan Monnier writes: >> After trying several more approaches, > > [ Side note: did you keep notes about the various approaches you tried > and their respective downsides? E.g. I'm curious what were the > problems linked to my proposal of using a `require-with-check` like > the one below my sig. ] My attempt to use shadowcheck idea you proposed failed with some very strange errors and I gave up. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62762#311 Although, part of the problem was https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65286 which does not seem to be reproducible by others. >> I now came up with yet another idea. Instead of fiddling with load >> internals, compilation, or load-path, what about making sure that Org >> libraries include version info directly? > > That should work. It implies a fair bit more churn in the code, tho, > but I guess you plan to automate it via some scripts? Yeah. It will require search-and-replace across Org between releases. But, at least, it is the most reliable way I can see without falling into subtle details of Emacs load system. I did some automation in a form of =make test= barking when `provide' do not match Org version: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-testing-lisp-test-org-version.el-New-test-library.patch >From 9caf9ca7207ecebed3499432828833187436940d Mon Sep 17 00:00:00 2001 Message-ID: <9caf9ca7207ecebed3499432828833187436940d.1692189593.git.yantar92@posteo.net> From: Ihor Radchenko Date: Wed, 16 Aug 2023 13:59:49 +0300 Subject: [PATCH] * testing/lisp/test-org-version.el: New test library (test-org-version/provide): Test for all the versioned features to be provided according to current Org version. --- testing/lisp/test-org-version.el | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 testing/lisp/test-org-version.el diff --git a/testing/lisp/test-org-version.el b/testing/lisp/test-org-version.el new file mode 100644 index 000000000..3c12c8d46 --- /dev/null +++ b/testing/lisp/test-org-version.el @@ -0,0 +1,54 @@ +;;; test-org-version.el --- Test Org version consistency -*- lexical-binding: t; -*- + +;; Copyright (C) 2023 Ihor Radchenko + +;; Author: Ihor Radchenko +;; Keywords: internal + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This file implements internal checks for Org versioning. + +;;; Code: + +(require 'org-version) + +(ert-deftest test-org-version/provide () + "Test versioned `provide' calls in Org libraries." + (let* (org-library) + (dolist (org-library-file + (directory-files + (expand-file-name + (concat org-test-dir "../lisp")) + t "\\.el$")) + (setq org-library + (file-name-nondirectory + (file-name-sans-extension org-library-file))) + (unless (member org-library '("org-loaddefs" "org-version")) + (with-temp-buffer + (insert-file-contents org-library-file) + (goto-char (point-max)) + (should (re-search-backward + (rx-to-string + `(seq + bol (0+ space) + "(provide" (0+ space) + "'" ,(concat org-library "-" (org-release)) + (0+ space) ")")) + nil t))))))) + +(provide 'test-org-version) +;;; test-org-version.el ends here -- 2.41.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--