Subject: Re: bug#46841: [PATCH] Make package downloading in inversion.el obsolete

From: Eric Ludlam <[email-masked]>
Date: Tue, 2 Mar 2021 17:13:09 -0500

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 <[email-masked]> writes:
>
>> Stefan Kangas <[email-masked]> 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.