purcell / package-lint

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

False positive with transient.el and Emacs 28 #225

Closed SqrtMinusOne closed 2 years ago

SqrtMinusOne commented 2 years ago

Transient was included in Emacs 28, and it seems like package-lint doesn't like packages that target Emacs <= 28 and reference transient in Package-Requires.

Example file (err.el):

;;; err.el --- Err -*- lexical-binding: t -*-

;; Copyright (C) 2022 Korytov Pavel

;; Author: Korytov Pavel <thexcloud@gmail.com>
;; Maintainer: Korytov Pavel <thexcloud@gmail.com>
;; Version: 0.1.0
;; Package-Requires: ((emacs "27.1") (transient "0.3.7"))
;; Homepage: https://example.com

;; This file is NOT part of GNU Emacs.

;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;; ERR

;;; Code:
(require 'transient)
(provide 'err)
;;; err.el ends here

Running with riscy's melpazoid like that:

RECIPE='(err :repo "SqrtMinusOne/err" :fetcher github)' LOCAL_REPO='<path-to-repo-with-err>' make

Results in the following output: err.el with package-lint 20220404.1243:

1 issue found:
31:10: error: You should depend on (emacs "28.1") if you need `transient'.

This worked fine before the release of Emacs 28.

I presume, this is an error on the side of package-lint?

purcell commented 2 years ago

I pushed a fix, but are there other such libraries I should be aware of? Essentially, we have a list of libraries that are both in Emacs and ELPA, and I'm not sure that list is complete.

SqrtMinusOne commented 2 years ago

It seems like modus-themes is another such package.

Also hierarchy.el was included in Emacs 28, but it's only available on MELPA and it seems like the author continues the development in the Emacs core. So the MELPA version is an old one.

purcell commented 2 years ago

Thanks, I noted hierarchy too. modus-themes works a bit differently, and probably isn't an issue, since people are unlikely to depend on that package from their own code.

akirak commented 2 years ago

Also note oc which is short for org-cite, since Org 9.5.

purcell commented 2 years ago

Also note oc which is short for org-cite, since Org 9.5.

Oh, a fresh symbol prefix, like ob and ox?

akirak commented 2 years ago

Oh, a fresh symbol prefix, like ob and ox?

Yes, we have the following libraries in Org 9.5.2:

oc
oc-basic
oc-biblatex
oc-csl
oc-natbib
purcell commented 2 years ago

Yes, we have the following libraries in Org 9.5.2:

Added, thanks!