-
Notifications
You must be signed in to change notification settings - Fork 13
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
lint-compile doesn't catch missing dependency on package "package" #31
Comments
Thanks. It seems like one could just do Line 235 in 15ac490
BTW, note that you should probably upgrade your version of |
I had tried your suggestion of adding just
I'll try upgrading to latest to see if that works without a patch. |
Oh, I see what you mean about compiling separately. That won't make a difference in this case because it's a single file, but yes that's a good change, I'll upgrade. Thanks for the heads up. |
Not sure if this is still a problem, so deferring to 0.8. Please chime in if you can add more information. |
@alphapapa hmm, now I can't get it to flag any packages not listed as a dependency. For example, the below passes ;;; main.el --- Summary
;; Package-Requires: ((emacs "26.1"))
;;; Commentary:
;; Blah
;;; Code:
(require 'async)
(require 'package)
(provide 'main)
;;; main.el ends here Shouldn't it complain that Admittedly it's been a while since I last used |
Well:
|
Right, got confused here -- this ticket wasn't even about ;;; main.el --- Summary
;;; Commentary:
;; Blah
;;; Code:
(package-version-join '(1 2 3))
(provide 'main)
;;; main.el ends here
Tested with 2c4eac6 so I'd say it's still a problem. |
I think this is because ;;; main.el --- Summary
;;; Commentary:
;; Blah
;;; Code:
(package-version-join '(1 2 3))
(lm-section-start "Commentary")
(provide 'main)
;;; main.el ends here
I think it's rare to call a function from |
@alphapapa I reported it because I did run into it in real life (jscheid/prettier.el#58), so it's rare but not just theoretical. Also, in case you've missed it, I've suggested a fix that involves unloading the That being said, I do agree it's a minor problem so if you don't want to fix it that's totally fine. |
AFAICT, There are a number of built-in libraries which are loaded by default, and those don't require a It appears that |
@alphapapa interesting, but according to the original bug report (jscheid/prettier.el#58) it seems that it can happen in an interactive setting, outside |
If |
Ahh... right, that would explain it. Good catch. To summarize:
I still think it's pretty easy to fix (by unloading |
Well, the summary as I understand it something like this:
My best judgment is that unloading So I'm afraid this edge case will have to remain a known issue. At least the workaround is simple on your end. :) There are many warnings that become impossible to eliminate due to supporting multiple Emacs versions, so it becomes impossible to get a clean linting sometimes. |
@alphapapa OK no problem, makes sense to me. Thanks anyway for taking a look. |
When a file fails to declare a dependency on package
package
,lint-compile
doesn't flag it. This is because when running emacs for byte-compiling,$package_initialize_file
gets loaded, which asks to(require 'package)
leading to a false negative.I've worked around it like so: jscheid/prettier.el@d1f0fc1
The text was updated successfully, but these errors were encountered: