-
Notifications
You must be signed in to change notification settings - Fork 37
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
jsonrpc
version detection is not generic enough
#70
Comments
This was introduced by request in #56 I reverted the commit as I believe it to be the lesser of two evils. I am still not sure on how to solve the initial issue. @timcharper ?? maybe?? |
Thank you for the quick response @svaante ! |
I deleted my previous comments in which I opined that straight.el should polyfill Packages should be able to assume the package manager does its job. Packages should declare version dependencies, but its up to the package manager to assert them, not the package. Reverting the detection is the right call. Perhaps feature detection and a warning is a better way to go. The core issue here is when you install Install without a package manager? Dependency enforcement is users job. Maybe we can make that clear. |
I think what compounds the problem is the fact that jsonrpc is merged in to core, but dape depends on a later version than that of core. The next emacs will have a more recent jsonrpc bundled, and this problem will be greatly reduced. |
Thinking further, I think one good solution would be to enhance Having at least some warnings emit when requiring packages with broken dependencies would be useful. Then that mechanism could have a generic way to suppress warnings on a package-by-package basis. |
Opened jwiegley/use-package#1071 after thinking about this for sometime. I will continue to think on it. A lightweight layer that integrates well with Emacs core packaging infrastructure to handle parsing and checking dependencies for manually installed packages could be helpful and resolve the gap that led us to reach for this assertion in the first place. |
I agree 100% with @timcharper, I hope As a workaround for (when (version-list-<
(with-temp-buffer
(insert-file-contents (find-library-name "jsonrpc"))
(package-desc-version (package-buffer-info)))
'(1 0 24))
(error "dape: Requires jsonrpc version >= 1.0.24, use `list-packages'\
to install latest `jsonrpc' release from elpa")) It is a bit ugly but does the job! |
Hello,
I'm using
straight.el
for package management,Recently,
dape
is not usable on my installation because of these lines:dape/dape.el
Lines 58 to 60 in 3cd8d42
The
jsonrpc
version detection code above supposes that the package has been installed using the builtinpackage.el
. So, if the user uses any other package manager (likestraight.el
), thepackage-installed-p
returnsnil
causingdape
to fail even if we have the rightjsonrpc
version.I've seen that
jsonrpc
doesn't include ajsonrpc-version
variable, but I think you can just require assume that the user have the rightjsonrpc
version since this is explicitly declared in the package' dependencies:dape/dape.el
Line 11 in 3cd8d42
The text was updated successfully, but these errors were encountered: