Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fboundp not suppressing error for function that was removed then re-added #240

Closed
jackkamm opened this issue Jan 20, 2023 · 5 comments
Closed

Comments

@jackkamm
Copy link

I have a problem where fboundp is not suppressing an error from package-lint, even when I think it should.

In particular, in org-caldav.el, package-lint currently returns the following error:

1355:7: error: `org-datetree-find-month-create' was removed in Emacs version 26.1.

Even though the call is wrapped in (if (fboundp 'org-datetree-find-month-create) ...), which I think should suppress that error.

It seems to be because org-datetree-find-month-create was removed, then added back, to org-mode. In particular, if we don't wrap in fboundp, package-lint reports an additional error:

2 issues found:

1340:21: error: You should depend on (emacs "27.2") if you need `org-datetree-find-month-create'.
1340:21: error: `org-datetree-find-month-create' was removed in Emacs version 26.1.

And wrapping in fboundp removes the first error, but not the second.

Is this a bug in package-lint? If not, what would be the right way for org-caldav to fix the issue?

@purcell
Copy link
Owner

purcell commented Feb 14, 2024

I can't reproduce this now, so I think this is resolved.

@purcell purcell closed this as completed Feb 14, 2024
@jackkamm
Copy link
Author

I'm still able to reproduce this using emacs -Q and emacs29.2. Specifically:

  1. emacs -Q -L ~/.emacs.d/elpa/package-lint-20240214.1423/ ~/src/org-caldav/org-caldav.el
  2. M-: (require 'package-lint)
  3. M-x package-lint-current-buffer

Which gives the following:

2 issues found:

10:38: error: Package org is not installable.
1361:7: error: `org-datetree-find-month-create' was removed in Emacs version 26.1.

@purcell purcell reopened this Feb 20, 2024
@purcell
Copy link
Owner

purcell commented Feb 20, 2024

Thanks, I confirmed it and fixed both the tests and package-lint to resolve the issue.

@purcell
Copy link
Owner

purcell commented Feb 20, 2024

(I don't know why I failed to reproduce the issue when I first tried, sorry about that.)

@jackkamm
Copy link
Author

Can confirm the latest release on MELPA fixes the issue on my end. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants