-
Notifications
You must be signed in to change notification settings - Fork 637
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
Coffeescript 2.x compatibility #526
Comments
Thanks for conducting this initial set of research amongst the variations of packages @mistydemeo 🙌 I'm going to classify this as an For full transparency, we haven't prioritized getting hubot-slack up to speed with Coffeescript 2.x, but I'm happy to contribute to the research when possible, and of course, merge and release contributions related to this. My fear is that this will end up requiring a major version bump, which could mean we delay the release of those changes since there's several other breaking changes we'd like to lump in. |
Any chance we could get some action on this? A move to 2.x would allow for async/await which would be huge |
@xxbiohazrdxx we don't have a working implementation at the moment, or any commitment from anyone to work on it. if you'd like to commit to that, i'd be happy to merge and release that change. |
This is something I'd like to do (I started in #528), but it's not a priority for me and I've got no timeline in which I'd expect to do it. |
Hi, I continue @mistydemeo works at #565 |
This ticket could probably be closed because it is superseded by #429 ? |
Agreed. I was just investigating why a Hubot 3.0 deploy still needed Coffeescript and I found this issue. Switching to JavaScript (#429) on the surface, looks simpler than untangling the many Hubot 2/3 Coffeescript 1/2 compatibility problems |
Will there be any movement on this either way? I'd like to use Coffeescript 2 in my hubot scripts, and this is holding me up |
From #528
This is still unresolved even with #565 |
I'm also experiencing this error when trying to write a basic Hubot test in Coffeescript, since line 12 of message.coffee (the
I'm not familiar with Coffeescript, but I'm trying to figure out where in my script is actually invoking that, and it looks like it's doing that within either It may be something within my code, since I can get through the EDIT - Was able to get the changes from #528 and #565 working locally; will provide Hubot and Coffeescript version numbers for compatibility in a bit. |
Looking at this from my other account; I think I can hack on this enough to get it working for the project I'm on, but I don't know if I have the time to contribute a full Coffeescript 2.x-compatible branch on my own. If anyone finds it useful, I'll get it committed to this PR branch, but I'm not expecting it to be reopened. |
so.. since #565 has been merged, what's still to do here..? |
Description
Describe your issue here.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Introduction
The primary incompatibility between Coffeescript 1.x and 2.x is the class type. Coffeescript 1.x's object model is a custom one which compiles down to JS prototype-based objects, since Coffeescript 1.x predates JS having its own class model. Coffeescript 2.x classes instead compile down to ECMAScript 2015 classes in order to improve interoperability with modern JS. This required two major backwards-incompatible changes in order to comply with JS class requirements:
super
is now both a keyword and a method. This means thatsuper
, when called as a method, has to be called assuper()
in order to disambiguate.super
always be called before attributes are read or assigned within a constructor, so Coffeescript now has the same requirement. This means that constructors using the@ivar
attribute name/assignment shorthand must callsuper()
immediately before doing anything else.While Hubot 3.x is compatible with Coffeescript 2.x, since Hubot itself is no longer written in CS, hubot-slack isn't yet compatible. I've outlined the compatibility testing I've performed with the problems I've identified.
Compatibility testing
Hubot 2.x + Coffeescript 1.x
✅ Officially supported and compatible.
Hubot 3.x + Coffeescript 1.x
✅ Officially supported and compatible.
Hubot 2.x + Coffeescript 2.x
🚫 Not supported and not compatible. Hubot 2.x classes are written in Coffeescript before the release of 2.x.
Hubot 3.x + Coffeescript 2.x
🚫 Supported, but not compatible with hubot-slack.
It looks like there's probably only one compatibility issue, but I need to test more:
super
without arguments or parentheses:hubot-slack/src/bot.coffee
Line 19 in 55d41be
The text was updated successfully, but these errors were encountered: