From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#46841: [PATCH] Make package downloading in inversion.el obsolete Date: Mon, 1 Mar 2021 10:08:48 -0600 Message-ID: References: <87pn0j81vv.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2289"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Eric M. Ludlam" , 46841@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 01 17:09:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGl6h-0000Rd-7i for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 17:09:15 +0100 Original-Received: from localhost ([::1]:33326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGl6g-00076M-5x for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 11:09:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGl6U-00073Y-8q for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 11:09:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGl6T-0002Mh-Rj for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 11:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGl6T-0003tC-Ld for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 11:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Mar 2021 16:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46841 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46841-submit@debbugs.gnu.org id=B46841.161461493614938 (code B ref 46841); Mon, 01 Mar 2021 16:09:01 +0000 Original-Received: (at 46841) by debbugs.gnu.org; 1 Mar 2021 16:08:56 +0000 Original-Received: from localhost ([127.0.0.1]:50552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGl6N-0003ss-NS for submit@debbugs.gnu.org; Mon, 01 Mar 2021 11:08:56 -0500 Original-Received: from mail-pj1-f43.google.com ([209.85.216.43]:54759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGl6M-0003se-Hw for 46841@debbugs.gnu.org; Mon, 01 Mar 2021 11:08:54 -0500 Original-Received: by mail-pj1-f43.google.com with SMTP id i14so9955452pjz.4 for <46841@debbugs.gnu.org>; Mon, 01 Mar 2021 08:08:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=rVgekddhbiX2u4lZdnHBMpKP6WPXchrBqJQtR6gqQC0=; b=KnoaMmILUX9CUKNgZRwROnFQ0dM6NzFLM6PhWORJ/ZDFINE4tPU/VH4AfLldg4DBGP 5eBWKSMIQXsmExMaWJuf793umntvVoKbJGK4gesBpyG0Dk76J0cEHtk5bX2qKbzzPs9L mBuLzR/3XXH6Qp9GGrZ3v/4fddm+urVsDSzsIkFPel+P5adgWYvshsyUrDPEl12vpg3a d1zCYtGX0yMnt7YE6sl6+znouo+f4LmUbOsAJbHw/Xvz+xfZw9ADPvBjRqakyFNTZwIU O2mbzugE519OULsk2bBLLelO8oSo8OrOpQysBGtxNCsw0eXOGxDlLiZ98Her2mT2zuR1 2RQA== X-Gm-Message-State: AOAM5325FsR+oU61U9L0tP5pua2rDckMhJxL6rQVe/ysI0SBiwxT38Vg tg7M3I+/Rz4VkStfACn53mKxXbMjIe0xQzfP8xg= X-Google-Smtp-Source: ABdhPJygfGryYLn1eHVggbDdz6Po/qlWjTVv1Qavzgr0HCAXeJf7tGDsgpS30VYdCpeS9EwiT108hEi1YU5Psig0xeg= X-Received: by 2002:a17:90b:e83:: with SMTP id fv3mr16059012pjb.179.1614614928820; Mon, 01 Mar 2021 08:08:48 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 1 Mar 2021 10:08:48 -0600 In-Reply-To: <87pn0j81vv.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201118 Archived-At: (Copying in Eric Ludlam in case he has something to add.) Lars Ingebrigtsen writes: > Stefan Kangas writes: > >> There is some code to download packages in cedet/inversion.el which >> seems completely redundant now that we have package.el. I suggest >> marking that part as obsolete, see the attached patch. >> >> To be honest, I don't exactly see that there is any need for >> inversion.el since the problem it tries to solve is already solved by >> package.el. Perhaps we should just move the entire library to >> obsolete/. > > Utility functions like `inversion-package-version' are used in the rest > of CEDET, though? (I just did a quick grep, but didn't actually read > the call sites.) Yes. I took a closer look. The uses all seem to be of dubious value these days, and could probably themselves be obsoleted or changed to not need inversion. Here is what I could find: ./lisp/cedet/cedet.el106: (filever (car (inversion-find-version sym))) The function `cedet-version' produces a screen like this: CEDET Version: 2.0 Requested File Loaded Package Version Version Version ---------------------------------------------------------- cedet: 2.0 ok ok eieio: 1.4 ok ok semantic: 2.2 ok Not Loaded srecode: 1.2 ok Not Loaded ede: 1.2 2.0 Not Loaded C-h f cedet-version RET for details on output format. But all these packages are distributed with Emacs itself. ./lisp/cedet/semantic/ede-grammar.el165: (list "eieio" "semantic" "inversion" "ede"))) ./lisp/cedet/semantic/ede-grammar.el168: ;; Inversion for versioning system. Add inversion to loadpath in Makefiles produced by EDE, for some reason. If inversion is obsolete, that would not be useful. ./lisp/cedet/semantic/db-file.el176: (if (not (inversion-test 'semanticdb-file fv)) ./lisp/cedet/semantic/db-file.el177: (when (inversion-test 'semantic-tag tv) ./lisp/cedet/cedet-cscope.el156: (if (inversion-check-version rev nil cedet-cscope-min-version) ./lisp/cedet/cedet-idutils.el185: (if (inversion-check-version rev nil cedet-idutils-min-version) ./lisp/cedet/cedet-global.el160: (if (inversion-check-version rev nil cedet-global-min-version) Several similar functions that just check for the installed version, which is either the one distributed with Emacs or the latest released version. The latter would normally be the one you automatically installed with package.el. So it's all just about making sure the correct version of a package is installed. AFAICT, that is fully obsoleted by `package-install'. ./lisp/cedet/ede/make.el76: (setq ans (not (inversion-check-version rev nil ede-make-min-version)))) This parses the make version and ensures its recent enough. Perhaps useful, but could likely be replaced by the built-in `version<' or somesuch. ./lisp/cedet/semantic.el61: (inversion-test 'semantic Here we have a function `semantic-require-version' that allows callers to check if this is a recent enough version of Semantic. They should instead be checking for the major version of Emacs, or if Semantic is installed from the external CEDET repository deal with it themselves, or if Semantic is turned into a core package and installed that way they should just make sure their dependencies are correct. Am I missing something here? Eric? > But, yes, the download bits don't seem very useful. Thanks.