Open Fuco1 opened 6 years ago
IMO, It would be intrinsically useful to programmatically examine package dependencies (beyond just the declared emacs version).
Some fragments that might be useful to this end:
- [ ] learn to find and read
Cask
(locate-dominating-file default-directory cask-filename)
- [ ] learn to find and read
-pkg.el
file
(with-current-buffer (find-file (package--description-file default-directory))
(package--read-pkg-desc 'single))
- [ ] learn to find and read the
Package-requires:
header
(package-desc-reqs (package-buffer-info))
;; OR
(lm-header "Package-Requires")
Edit: I've found the lisp-mnt.el
functions extremely helpful.
If we are analyzing a project which uses Cask or has a
-pkg
file or the requires headers we should pick theemacs
dependency version and warn if user uses functions not supported by that platform.package-lint
has a list of these by version: https://github.com/purcell/package-lint/blob/master/package-lint.el#L83Cask
-pkg.el
filePackage-requires:
headerElsafile
.