Ihor Radchenko <[email protected]> writes: > Daniel Mendler <[email protected]> writes: > >>> (or (require 'compat nil 'noerror) >>> (require 'org-vendored-compat)) >>> >>> Then, if system provides compat library, we load that version. >> >> No, this does not sound good. >> >> It should only be (require 'compat), and the build scripts should make >> sure that Compat is available on the load path, either the Emacs Compat >> shim, a Compat installed as package or a vendored Compat. Otherwise you >> will create an incentive for distributions to install the >> org-vendored-compat as part of the distributions package, and this is >> clearly undesired. > > But if we have vendored compat, we can't step into the namespace, or > packages may load *Org's* compat instead of installed. That will create > a lot of headache for everyone.
Yes, the Compat code should not be modified. My point is that the vendored Compat should only be used for the tests when executing the Org scripts, with the only goal of ensuring its availability for offline use as Morgan wanted. >> The only purpose of the vendoring should be that you have the source of >> Compat is available of "offline use" inside the repository, such that >> you can develop with a cloned version of the Org repository without >> installing anything else, without cloning another repository and without >> cloning a git submodule. > > What about users who use git version of Org? They should use the Compat shim which is part of Emacs, or a separately installed Compat. (I've used the git version of Org for quite some time via ELPA-devel, installed via regular package-install/package-upgrade, and there I don't foresee problems.) There are many other packages which use Compat, so the user will likely have the recent Compat version already around in their Emacs. But there are certainly other ways to install the git version, via the git package managers (Elpaca, Straight, package-vc, ...). These package managers have to make sure to not accidentally install the vendored Compat. Do these tools blindly install every *.el file, or only files in the lisp/ directory? If they only install lisp/, then there shouldn't be a problem if you place the Compat code in vendor/compat/? Daniel
