-
Notifications
You must be signed in to change notification settings - Fork 137
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
Lexical binding in dash-functional.el #45
Comments
I guess I'd lean towards option 2... |
Hmm, this split is turning ever more problematic. Dash used to come with a few functions that required Emacs 24. Maybe that set of functions could be increased? Either way, I had planned a 2.0 release for some backwards breaking changes. But I now realize that is a lot harder to do without release support in melpa. I see you've been working on it, so maybe the best course of action is to wait for that? In which case E23 would be continued supported on 1.x, and E24 on 2.x. Thoughts? |
The compatibility issue is a nasty one. In most cases it shouldn't be much work to keep backwards compatibility with Emacs 23, but that's up to you. Once dash in MELPA is E24-only, then many other packages also will be. And even Marmalade users will always get the latest version available to them -- there's no way for Emacs 23 users to "pin" an old version of dash. The same would apply to MELPA's planned "release" package archive. You could analyse |
Yes, you are absolutely right. I'll fix this tonight. |
Do you see a problem with me just removing the |
Ah, is that what the problem is? Yes, the |
Yes, the problem is the lexical binding - which is why it is in a separate file. But is that a decent way of keeping backwards compatibility with Emacs 23? Or will it still break when E23 is trying to compile |
E23 would likely have problems compiling it. But as suggested, you could make |
If this is a problem, then how about the entire And yes, you're right that the require shouldn't be there. That was stupid on my part :/ |
@Fuco1 That sounds like it might work. |
Anyway, the fact that those functions require lexical binding to work doesn't mean they won't compile. It just wouldn't work, that's all, no? So there shouldn't be any problems to begin with. By the way if you want to support e23 maybe adding the tests on travis back would be a good idea :P |
Haha, I'm so chock full of fail these days. Somebody come take my computer away. :) |
So I've just compiled
Personally, I don't see much point in supporting e23. It's year and a half old (or more?) and so what... updating is trivial anyway. |
Excellent, thank you. I've fixed the |
dash-functional is now an optional package for those who do not care about E23 support. I reversed the dependency. Tests pass in E23. I'm going for an optimistic close. Wish me luck! |
By "optional package", do you mean that |
@Fuco1 As for whether or not to support Emacs 23, it's very easy for you to say there's no point, but |
That hadn't occured to me as important. I just figured we could mark some functions as requiring Emacs 24 like before. But I want to do what's right. What are the advantages of doing it like that? As for melpa, would it be okay to serve both files from this repository, but without a |
Yes. I personally think you should strive for clarity. Mixing functions which work in Emacs 23+ with functions which only work in Emacs 24 is a recipe for trouble. So yes, I'd aim for the following situation:
|
Cool, recipe changes merged. Thanks! |
And thank you for some sound advice. |
This code uses lexical-binding, which is not available in Emacs < 24.
As a result, if it's included in the
dash
package, then the entire package should depend on(emacs "24")
, which is probably undesirable since many other Emacs 23-compatible packages would then transitively depend on Emacs 24.Possible resolutions:
lexical-let
instead if possible and drop reliance onlexical-binding
dash-functional
as a separate package which depends ondash
and Emacs 24The text was updated successfully, but these errors were encountered: