unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46841: [PATCH] Make package downloading in inversion.el obsolete
@ 2021-03-01  4:30 Stefan Kangas
  2021-03-01 13:00 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2021-03-01  4:30 UTC (permalink / raw)
  To: 46841

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

Severity: wishlist

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/.

[-- Attachment #2: 0001-Make-package-downloading-in-inversion.el-obsolete.patch --]
[-- Type: text/x-diff, Size: 5333 bytes --]

From 66fec856d110c61964f1ab4729d58317f29abcb2 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Mon, 1 Mar 2021 05:10:21 +0100
Subject: [PATCH] Make package downloading in inversion.el obsolete

* lisp/cedet/inversion.el (inversion-incompatible-version)
(inversion-locate-package-files, inversion-package-common-tails)
(inversion-locate-package-files-and-split)
(inversion-download-package-ask): Make obsolete.  Fix callers.
(inversion-require): Update advertised calling convention to no
longer support downloading packages.  Doc fix.
---
 lisp/cedet/inversion.el | 45 +++++++++--------------------------------
 1 file changed, 10 insertions(+), 35 deletions(-)

diff --git a/lisp/cedet/inversion.el b/lisp/cedet/inversion.el
index 2ef7e0df96..1e1bda4503 100644
--- a/lisp/cedet/inversion.el
+++ b/lisp/cedet/inversion.el
@@ -22,7 +22,7 @@
 ;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-;;
+
 ;; Keeping track of rapidly developing software is a tough thing to
 ;; do, especially if you want to have co-dependent packages which all
 ;; move at different rates.
@@ -61,9 +61,6 @@
 ;; 		  (intern-soft (concat (symbol-string p) "-version"))))))
 ;;
 ;; Or modify to specify `inversion-require' instead.
-;;
-;; TODO:
-;;  Offer to download newer versions of a package.
 
 ;;; History:
 ;;
@@ -76,6 +73,7 @@ inversion-version
 
 (defvar inversion-incompatible-version "0.1alpha1"
   "An earlier release which is incompatible with this release.")
+(make-obsolete-variable 'inversion-incompatible-version nil "28.1")
 
 (defconst inversion-decoders
   '(
@@ -332,11 +330,9 @@ inversion-require
 				  &rest reserved)
   "Declare that you need PACKAGE with at least VERSION.
 PACKAGE might be found in FILE.  (See `require'.)
-Throws an error if VERSION is incompatible with what is installed.
-Optional argument DIRECTORY is a location where new versions of
-this tool can be located.  If there is a versioning problem and
-DIRECTORY is provided, inversion will offer to download the file.
-Optional argument RESERVED is saved for later use."
+Throws an error if VERSION is incompatible with what is installed."
+  (declare (advertised-calling-convention
+            (package version &optional file) "28.1"))
   (require package file)
   (let ((err (inversion-test package version)))
     (when err
@@ -443,7 +439,7 @@ inversion-add-to-load-path
 	      (error "Outdated %s %s just installed" package (car newver)))
 	  )))))
 
-;;; URL and downloading code
+;;; Obsolete URL and downloading code
 ;;
 (defun inversion-locate-package-files (package directory &optional version)
   "Get a list of distributions of PACKAGE from DIRECTORY.
@@ -455,6 +451,7 @@ inversion-locate-package-files
 ;;DIRECTORY should also allow a URL:
 ;; \"http://ftp1.sourceforge.net/PACKAGE\"
 ;; but then I can get file listings easily.
+  (declare (obsolete nil "28.1"))
   (if (symbolp package) (setq package (symbol-name package)))
   (directory-files directory t
 		   (if version
@@ -467,6 +464,7 @@ inversion-package-common-tails
 					 ".gz"
 					 )
   "Common distribution mechanisms for Emacs Lisp packages.")
+(make-obsolete-variable 'inversion-package-common-tails nil "28.1")
 
 (defun inversion-locate-package-files-and-split (package directory &optional version)
   "Use `inversion-locate-package-files' to get a list of PACKAGE files.
@@ -474,6 +472,7 @@ inversion-locate-package-files-and-split
 VERSION is an optional argument specifying a version to restrict to.
 The return list is an alist with the version string in the CAR,
 and the full path name in the CDR."
+  (declare (obsolete nil "28.1"))
   (if (symbolp package) (setq package (symbol-name package)))
   (let ((f (inversion-locate-package-files package directory version))
 	(out nil))
@@ -499,6 +498,7 @@ inversion-locate-package-files-and-split
 (defun inversion-download-package-ask (err package directory version)
   "Due to ERR, offer to download PACKAGE from DIRECTORY.
 The package should have VERSION available for download."
+  (declare (obsolete package-install "28.1"))
   (if (symbolp package) (setq package (symbol-name package)))
   (let ((files (inversion-locate-package-files-and-split
 		package directory version)))
@@ -524,31 +524,6 @@ inversion-download-package-ask
 
 	  (copy-file (cdr (car files)) dest))))))
 
-;;; How we upgrade packages in Emacs has yet to be ironed out.
-
-;; (defun inversion-upgrade-package (package &optional directory)
-;;   "Try to upgrade PACKAGE in DIRECTORY is available."
-;;   (interactive "sPackage to upgrade: ")
-;;   (if (stringp package) (setq package (intern package)))
-;;   (if (not directory)
-;;       ;; Hope that the package maintainer specified.
-;;       (setq directory (symbol-value (or (intern-soft
-;; 					 (concat (symbol-name package)
-;; 						 "-url"))
-;; 					(intern-soft
-;; 					 (concat (symbol-name package)
-;; 						 "-directory"))))))
-;;   (let ((files (inversion-locate-package-files-and-split
-;; 		package directory))
-;; 	(cver (inversion-package-version package))
-;; 	(newer nil))
-;;     (mapc (lambda (f)
-;; 	    (if (inversion-< cver (inversion-decode-version (car f)))
-;; 		(setq newer (cons f newer))))
-;; 	    files)
-;;     newer
-;;     ))
-
 (provide 'inversion)
 
 ;;; inversion.el ends here
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#46841: [PATCH] Make package downloading in inversion.el obsolete
  2021-03-01  4:30 bug#46841: [PATCH] Make package downloading in inversion.el obsolete Stefan Kangas
@ 2021-03-01 13:00 ` Lars Ingebrigtsen
  2021-03-01 16:08   ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-01 13:00 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 46841

Stefan Kangas <stefan@marxist.se> 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.)

But, yes, the download bits don't seem very useful.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#46841: [PATCH] Make package downloading in inversion.el obsolete
  2021-03-01 13:00 ` Lars Ingebrigtsen
@ 2021-03-01 16:08   ` Stefan Kangas
  2021-03-02 22:13     ` Eric Ludlam
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2021-03-01 16:08 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Eric M. Ludlam, 46841

(Copying in Eric Ludlam in case he has something to add.)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stefan Kangas <stefan@marxist.se> 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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#46841: [PATCH] Make package downloading in inversion.el obsolete
  2021-03-01 16:08   ` Stefan Kangas
@ 2021-03-02 22:13     ` Eric Ludlam
  2021-03-03 19:02       ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Ludlam @ 2021-03-02 22:13 UTC (permalink / raw)
  To: Stefan Kangas, Lars Ingebrigtsen; +Cc: Eric M. Ludlam, 46841

Thanks for checking in about inversion.el.

I used to have a lot of issues with different versions of things when 
CEDET was
separate from Emacs and new versions of CEDET could overlay on top of an 
Emacs
with an earlier version of CEDET included.  Inversion was a way of getting
things tied together, and upgrading save files to new versions, and 
things like that.

None of those old issues exist anymore since external CEDET is too hard 
to merge back
into Emacs and I now post patches direct to Emacs instead, so it makes 
sense to clean this up.

Thanks
Eric

On 3/1/21 11:08 AM, Stefan Kangas wrote:
> (Copying in Eric Ludlam in case he has something to add.)
>
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Stefan Kangas <stefan@marxist.se> 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.







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#46841: [PATCH] Make package downloading in inversion.el obsolete
  2021-03-02 22:13     ` Eric Ludlam
@ 2021-03-03 19:02       ` Stefan Kangas
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2021-03-03 19:02 UTC (permalink / raw)
  To: Eric Ludlam, Lars Ingebrigtsen; +Cc: Eric M. Ludlam, 46841

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

tags 46841 + fixed
close 46841 28.1
thanks

Eric Ludlam <ericludlam@gmail.com> writes:

> I used to have a lot of issues with different versions of things when
> CEDET was
> separate from Emacs and new versions of CEDET could overlay on top of an
> Emacs
> with an earlier version of CEDET included.  Inversion was a way of getting
> things tied together, and upgrading save files to new versions, and
> things like that.
>
> None of those old issues exist anymore since external CEDET is too hard
> to merge back
> into Emacs and I now post patches direct to Emacs instead, so it makes
> sense to clean this up.

Thanks for giving the background.  Since you agree, I think we should
make the entire library obsolete.

So I've installed the attached patch on master and I'm closing this bug.

[-- Attachment #2: 0001-Make-inversion.el-obsolete-Bug-46841.patch --]
[-- Type: text/x-diff, Size: 13896 bytes --]

From 356636c6a1ebba3e95d0e6609ae0401992008ccf Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Wed, 3 Mar 2021 19:54:37 +0100
Subject: [PATCH] Make inversion.el obsolete (Bug#46841)

* lisp/cedet/inversion.el:
* test/lisp/cedet/inversion-tests.el: Move from here...
* lisp/obsolete/inversion.el:
* test/lisp/obsolete/inversion-tests.el: ...to here.

* lisp/cedet/cedet.el (cedet-version): Make obsolete.
* lisp/cedet/cedet-cscope.el (cedet-cscope-version-check):
* lisp/cedet/cedet-global.el (cedet-gnu-global-version-check):
* lisp/cedet/cedet-idutils.el (cedet-idutils-version-check):
* lisp/cedet/ede/make.el (ede-make-check-version): Use 'version<'
instead of 'inversion-check-version'.
* lisp/cedet/semantic/db-file.el (semanticdb-load-database): Don't
use 'inversion-test'.
* lisp/cedet/semantic/ede-grammar.el
(ede-proj-makefile-insert-variables): Don't add inversion to
loadpath.
* lisp/speedbar.el: Remove stale comment.
---
 etc/NEWS                                      |  5 +++-
 lisp/cedet/cedet-cscope.el                    |  5 +---
 lisp/cedet/cedet-global.el                    |  5 +---
 lisp/cedet/cedet-idutils.el                   |  5 +---
 lisp/cedet/cedet.el                           |  1 +
 lisp/cedet/ede/make.el                        | 15 ++++------
 lisp/cedet/semantic.el                        |  1 +
 lisp/cedet/semantic/db-file.el                | 29 +++++--------------
 lisp/cedet/semantic/ede-grammar.el            |  6 ++--
 lisp/{cedet => obsolete}/inversion.el         | 26 +----------------
 lisp/speedbar.el                              | 19 ------------
 .../{cedet => obsolete}/inversion-tests.el    |  0
 12 files changed, 25 insertions(+), 92 deletions(-)
 rename lisp/{cedet => obsolete}/inversion.el (95%)
 rename test/lisp/{cedet => obsolete}/inversion-tests.el (100%)

diff --git a/etc/NEWS b/etc/NEWS
index 73f136cfa7..6babbbf5a7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2259,7 +2259,10 @@ This is no longer supported, and setting this variable has no effect.
 Use macro 'with-current-buffer-window' with action alist entry 'body-function'.
 
 ---
-** The metamail.el library is now marked obsolete.
+** The inversion.el library is now obsolete.
+
+---
+** The metamail.el library is now obsolete.
 
 ---
 ** Some obsolete variable and function aliases in dbus.el have been removed.
diff --git a/lisp/cedet/cedet-cscope.el b/lisp/cedet/cedet-cscope.el
index 75a69db0a8..4d4a9f78d5 100644
--- a/lisp/cedet/cedet-cscope.el
+++ b/lisp/cedet/cedet-cscope.el
@@ -26,8 +26,6 @@
 
 ;;; Code:
 
-(declare-function inversion-check-version "inversion")
-
 (defvar cedet-cscope-min-version "15.7"
   "Minimum version of CScope required.")
 
@@ -139,7 +137,6 @@ cedet-cscope-version-check
 then instead of throwing an error if CScope isn't available,
 return nil."
   (interactive)
-  (require 'inversion)
   (let ((b (condition-case nil
 	       (cedet-cscope-call (list "-V"))
 	     (error nil)))
@@ -153,7 +150,7 @@ cedet-cscope-version-check
 	(goto-char (point-min))
 	(re-search-forward "cscope: version \\([0-9.]+\\)" nil t)
 	(setq rev (match-string 1))
-	(if (inversion-check-version rev nil cedet-cscope-min-version)
+        (if (version< rev cedet-cscope-min-version)
 	    (if noerror
 		nil
 	      (error "Version of CScope is %s.  Need at least %s"
diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el
index 5878ec1f48..77b4474439 100644
--- a/lisp/cedet/cedet-global.el
+++ b/lisp/cedet/cedet-global.el
@@ -24,8 +24,6 @@
 ;;
 ;; Basic support for calling GNU Global, and testing version numbers.
 
-(declare-function inversion-check-version "inversion")
-
 (defvar cedet-global-min-version "5.0"
   "Minimum version of GNU Global required.")
 
@@ -143,7 +141,6 @@ cedet-gnu-global-version-check
 then instead of throwing an error if Global isn't available,
 return nil."
   (interactive)
-  (require 'inversion)
   (let ((b (condition-case nil
 	       (cedet-gnu-global-call (list "--version"))
 	     (error nil)))
@@ -157,7 +154,7 @@ cedet-gnu-global-version-check
 	(goto-char (point-min))
 	(re-search-forward "(?GNU GLOBAL)? \\([0-9.]+\\)" nil t)
 	(setq rev (match-string 1))
-	(if (inversion-check-version rev nil cedet-global-min-version)
+        (if (version< rev cedet-global-min-version)
 	    (if noerror
 		nil
 	      (error "Version of GNU Global is %s.  Need at least %s"
diff --git a/lisp/cedet/cedet-idutils.el b/lisp/cedet/cedet-idutils.el
index fc5e05af88..3e3d6a5e94 100644
--- a/lisp/cedet/cedet-idutils.el
+++ b/lisp/cedet/cedet-idutils.el
@@ -29,8 +29,6 @@
 
 ;;; Code:
 
-(declare-function inversion-check-version "inversion")
-
 (defvar cedet-idutils-min-version "4.0"
   "Minimum version of ID Utils required.")
 
@@ -167,7 +165,6 @@ cedet-idutils-version-check
 then instead of throwing an error if Global isn't available,
 return nil."
   (interactive)
-  (require 'inversion)
   (let ((b (condition-case nil
 	       (cedet-idutils-fnid-call (list "--version"))
 	     (error nil)))
@@ -182,7 +179,7 @@ cedet-idutils-version-check
 	(if (re-search-forward "fnid - \\([0-9.]+\\)" nil t)
 	    (setq rev (match-string 1))
 	  (setq rev "0"))
-	(if (inversion-check-version rev nil cedet-idutils-min-version)
+        (if (version< rev cedet-idutils-min-version)
 	    (if noerror
 		nil
 	      (error "Version of ID Utils is %s.  Need at least %s"
diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el
index caaec473a2..5d98a1939d 100644
--- a/lisp/cedet/cedet.el
+++ b/lisp/cedet/cedet.el
@@ -85,6 +85,7 @@ cedet-version
 LOADED VERSION is the version of PACKAGE currently loaded in Emacs
 memory and (presumably) running in this Emacs instance.  Value is X
 if the package has not been loaded."
+  (declare (obsolete emacs-version "28.1"))
   (interactive)
   (require 'inversion)
   (with-output-to-temp-buffer "*CEDET*"
diff --git a/lisp/cedet/ede/make.el b/lisp/cedet/ede/make.el
index 4f86558c62..d9811ce52f 100644
--- a/lisp/cedet/ede/make.el
+++ b/lisp/cedet/ede/make.el
@@ -30,8 +30,6 @@
 
 ;;; Code:
 
-(declare-function inversion-check-version "inversion")
-
 (defsubst ede--find-executable (exec)
   "Return an expanded file name for a program EXEC on the exec path."
   (declare (obsolete locate-file "28.1"))
@@ -60,8 +58,7 @@ ede-make-check-version
   (let ((b (get-buffer-create "*EDE Make Version*"))
 	(cd default-directory)
 	(rev nil)
-	(ans nil)
-	)
+        (ans nil))
     (with-current-buffer b
       ;; Setup, and execute make.
       (setq default-directory cd)
@@ -70,18 +67,18 @@ ede-make-check-version
 		    "--version")
       ;; Check the buffer for the string
       (goto-char (point-min))
-      (when (looking-at "GNU Make\\(?: version\\)? \\([0-9][^,]+\\),")
+      (when (looking-at "GNU Make\\(?: version\\)? \\([0-9][^,[:space:]]+\\),?")
 	(setq rev (match-string 1))
-	(require 'inversion)
-	(setq ans (not (inversion-check-version rev nil ede-make-min-version))))
+        (setq ans (not (version< rev ede-make-min-version))))
 
       ;; Answer reporting.
       (when (and (called-interactively-p 'interactive) ans)
 	(message "GNU Make version %s.  Good enough for CEDET." rev))
 
       (when (and (not noerror) (not ans))
-	(error "EDE requires GNU Make version %s or later.  Configure `ede-make-command' to fix"
-	       ede-make-min-version))
+        (error "EDE requires GNU Make version %s or later (found %s).  Configure `ede-make-command' to fix"
+               ede-make-min-version
+               rev))
       ans)))
 
 (provide 'ede/make)
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index 44bd4b0cd8..797ff753a6 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -57,6 +57,7 @@ semantic-require-version
 It is assumed that if the current version is newer than that specified,
 everything passes.  Exceptions occur when known incompatibilities are
 introduced."
+  (declare (obsolete emacs-version "28.1"))
   (require 'inversion)
   (inversion-test 'semantic
 		  (concat major "." minor
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el
index 59e9db9cc0..d99b94f49e 100644
--- a/lisp/cedet/semantic/db-file.el
+++ b/lisp/cedet/semantic/db-file.el
@@ -154,8 +154,6 @@ semanticdb-create-database
 
 ;;; File IO
 
-(declare-function inversion-test "inversion")
-
 (defun semanticdb-load-database (filename)
   "Load the database FILENAME."
   (condition-case foo
@@ -163,32 +161,19 @@ semanticdb-load-database
                                        'semanticdb-project-database-file))
 	     (c (semanticdb-get-database-tables r))
 	     (tv (oref r semantic-tag-version))
-	     (fv (oref r semanticdb-version))
-	     )
+             (fv (oref r semanticdb-version)))
 	;; Restore the parent-db connection
 	(while c
 	  (oset (car c) parent-db r)
 	  (setq c (cdr c)))
 	(unless (and (equal semanticdb-file-version fv)
 		     (equal semantic-tag-version tv))
-	  ;; Try not to load inversion unless we need it:
-	  (require 'inversion)
-	  (if (not (inversion-test 'semanticdb-file fv))
-	      (when (inversion-test 'semantic-tag tv)
-		;; Incompatible version.  Flush tables.
-		(semanticdb-flush-database-tables r)
-		;; Reset the version to new version.
-		(oset r semantic-tag-version semantic-tag-version)
-		;; Warn user
-		(message "Semanticdb file is old.  Starting over for %s"
-			 filename))
-	    ;; Version is not ok.  Flush whole system
-	    (message "semanticdb file is old.  Starting over for %s"
-		     filename)
-	    ;; This database is so old, we need to replace it.
-	    ;; We also need to delete it from the instance tracker.
-	    (delete-instance r)
-	    (setq r nil)))
+          ;; Version is not ok.  Flush whole system
+          (message "semanticdb file is old.  Starting over for %s" filename)
+          ;; This database is so old, we need to replace it.
+          ;; We also need to delete it from the instance tracker.
+          (delete-instance r)
+          (setq r nil))
 	r)
     (error (message "Cache Error: [%s] %s, Restart"
 		    filename foo)
diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el
index bd0795acbd..64fc07fe1b 100644
--- a/lisp/cedet/semantic/ede-grammar.el
+++ b/lisp/cedet/semantic/ede-grammar.el
@@ -162,10 +162,9 @@ ede-proj-makefile-insert-variables
   "Insert variables needed by target THIS."
   (ede-proj-makefile-insert-loadpath-items
    (ede-proj-elisp-packages-to-loadpath
-    (list "eieio" "semantic" "inversion" "ede")))
+    (list "eieio" "semantic" "ede")))
   ;; eieio for object system needed in ede
   ;; semantic because it is
-  ;; Inversion for versioning system.
   ;; ede for project regeneration
   (ede-pmake-insert-variable-shared
       (concat (ede-pmake-varname this) "_SEMANTIC_GRAMMAR_EL")
@@ -174,8 +173,7 @@ ede-proj-makefile-insert-variables
 		  (with-current-buffer (find-file-noselect src)
 		    (concat (semantic-grammar-package) ".el")))
 		(oref this source)
-		" ")))
-  )
+                " "))))
 
 (cl-defmethod ede-proj-makefile-insert-rules :after ((this semantic-ede-proj-target-grammar))
     "Insert rules needed by THIS target.
diff --git a/lisp/cedet/inversion.el b/lisp/obsolete/inversion.el
similarity index 95%
rename from lisp/cedet/inversion.el
rename to lisp/obsolete/inversion.el
index 2ef7e0df96..f192d88868 100644
--- a/lisp/cedet/inversion.el
+++ b/lisp/obsolete/inversion.el
@@ -5,6 +5,7 @@
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Version: 1.3
 ;; Keywords: OO, lisp
+;; Obsolete-since: 28.1
 
 ;; This file is part of GNU Emacs.
 
@@ -524,31 +525,6 @@ inversion-download-package-ask
 
 	  (copy-file (cdr (car files)) dest))))))
 
-;;; How we upgrade packages in Emacs has yet to be ironed out.
-
-;; (defun inversion-upgrade-package (package &optional directory)
-;;   "Try to upgrade PACKAGE in DIRECTORY is available."
-;;   (interactive "sPackage to upgrade: ")
-;;   (if (stringp package) (setq package (intern package)))
-;;   (if (not directory)
-;;       ;; Hope that the package maintainer specified.
-;;       (setq directory (symbol-value (or (intern-soft
-;; 					 (concat (symbol-name package)
-;; 						 "-url"))
-;; 					(intern-soft
-;; 					 (concat (symbol-name package)
-;; 						 "-directory"))))))
-;;   (let ((files (inversion-locate-package-files-and-split
-;; 		package directory))
-;; 	(cver (inversion-package-version package))
-;; 	(newer nil))
-;;     (mapc (lambda (f)
-;; 	    (if (inversion-< cver (inversion-decode-version (car f)))
-;; 		(setq newer (cons f newer))))
-;; 	    files)
-;;     newer
-;;     ))
-
 (provide 'inversion)
 
 ;;; inversion.el ends here
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 0e2a3749be..4a78562380 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -141,25 +141,6 @@ speedbar-use-images
 
 ;;; Code:
 
-;; Note: `inversion-test' requires parts of the CEDET package that are
-;; not included with Emacs.
-;;
-;; (defun speedbar-require-version (major minor &optional beta)
-;;   "Non-nil if this version of SPEEDBAR does not satisfy a specific version.
-;; Arguments can be:
-;;
-;;   (MAJOR MINOR &optional BETA)
-;;
-;;   Values MAJOR and MINOR must be integers.  BETA can be an integer, or
-;; excluded if a released version is required.
-;;
-;; It is assumed that if the current version is newer than that specified,
-;; everything passes.  Exceptions occur when known incompatibilities are
-;; introduced."
-;;   (inversion-test 'speedbar
-;; 		  (concat major "." minor
-;; 			  (when beta (concat "beta" beta)))))
-
 (defvar speedbar-initial-expansion-mode-alist
   '(("buffers" speedbar-buffer-easymenu-definition speedbar-buffers-key-map
      speedbar-buffer-buttons)
diff --git a/test/lisp/cedet/inversion-tests.el b/test/lisp/obsolete/inversion-tests.el
similarity index 100%
rename from test/lisp/cedet/inversion-tests.el
rename to test/lisp/obsolete/inversion-tests.el
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-03 19:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01  4:30 bug#46841: [PATCH] Make package downloading in inversion.el obsolete Stefan Kangas
2021-03-01 13:00 ` Lars Ingebrigtsen
2021-03-01 16:08   ` Stefan Kangas
2021-03-02 22:13     ` Eric Ludlam
2021-03-03 19:02       ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).