purcell / package-lint

A linting library for elisp package metadata
GNU General Public License v3.0
193 stars 34 forks source link

ol.el (org-link-*) compatibility issue #195

Closed akirak closed 3 years ago

akirak commented 3 years ago

Hi, I'm currently trying to vanish linting errors from my org-multi-wiki package.

This package adds a custom link type to Org. Since Org 9.3, ol.el has been added, and org-make-link-string was renamed to org-link-make-string. It is shipped with Emacs 27.1.

My package specifies Org 9.3 and Emacs 26.1 as its dependencies in the Package-Requires header, and I receive the following errors from package-lint:

org-multi-wiki.el:46:16: error: You should depend on (emacs "27.1") if you need `ol'.

org-multi-wiki.el:47:53: error: You should depend on (emacs "27.1") if you need `org-link-make-string'.

I want to avoid dependency on Emacs 27.1 wherever possible, because some major distributions don't have it yet. Having Org 9.3 should be sufficient.

Is it possible to fix this issue, or is there a workaround?

purcell commented 3 years ago

I think f11ed5f3b73eacd40e9c7876e979fee66086c1e0 should address this, though there may be other org-* functions that still produce the same warnings.

akirak commented 3 years ago

Great, thanks.

akirak commented 3 years ago

Sorry, the issue is not totally fixed. The function error has disappeared, but the feature error does not:

you should depend on (emacs "27.1") if you need `ol'.

The problem is that ol feature is listed in data/stdlib-changes file, but it is not an installable backport package, so you cannot add ol to package-lint-backport-libraries. I have looked at the source code of package-lint, and it doesn't seem possible to support this case without extra logic.

Maybe requiring Emacs 27.1 as the dependency is the way to go for packages that depend on org-link-*. What do you think?

purcell commented 3 years ago

Agree. I think this can be fixed fairly easily, with a change in the structure of package-lint-backport-libraries and adaptation of the related code.