-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Port hubot from coffeescript to plain Javascipt (ES2015) #1138
Comments
We completed the porting . hubot-generated project just need minor change to use this es6 version. (mainly because I take different naming from hubot to better test the port result and avoid the confusion) https://github.com/gasolin/webbybot#how-to-replace-hubot-to-webbybot Still wait for feedback if hubot interesting in moving to es6 based. |
Hi, @technicalpickles , do you like the Javascipt version, or I should fork from the Hubot? |
Wrote an article to explain the changes from Coffeescript to ES6 http://blog.gasolin.idv.tw/2016/03/how-we-ported-hubot-from-coffeescript.html |
I'd consider moving to ES6, but I'd be worried about it be effectively a rewrite. If there's a way to change individual files over one at a time, that'd be a lot lower risk. The biggest consideration I have is that it continues to work for existing hubot users. |
It's totally possible to change individual files over one at a time (that's what we did when porting hubot), hubot providing 77% test coverage, the ported result does fully compatible with current version, all plugins are still working. I've created yeoman-generator-equivalent template to triage some edge cases, it works well If that sounds good, I could start sending some patch to introduce the ES6 (babel) build script and change individual file one by one. |
@gasolin I'd like to thank you for your effort. You really have a point here. I came to github just to find an issue about this subject (my actual google query was |
Hello, what would be the resolution on this? @technicalpickles would like a manual port and it seems to have been done by @gasolin. Are there any other roadblocks to accept a pull request from @gasolin? My organization is very interested in contributing to Hubot, but we are more inclined to use javascript ( |
I'd live with CoffeeScript for now if it would at least be published as JS (like any other CoffeeScript module is). This is holding us back from using the hubot-test-helper (mtsmfm/hubot-test-helper#33) |
@hpurmann moving to es6 doesn't mean you can't run coffeescript module anymore (the prototype shows its totally possible). |
No, you got me wrong @gasolin. Usually, modules written in CoffeeScript are transpiled to JavaScript as a
|
Decaffeinate actually works really well in coverting coffeescript to es6 As much as I like it I'm not sure why it matters of the core is coffeescript or not. I write all my modules using es6 and have an index.js that calls robot.loadFile Do you need to actually require hubot directly in your modules? I'm guessing maybe adapters? |
Hi, I'm the main person working on the decaffeinate project recently, and I've been using hubot as one of the test cases. I have a fork of hubot that gets updated daily with the latest decaffeinate result: It was generated completely automatically from this repo, and it's almost 100% JavaScript with all tests passing. (I say "almost" because it doesn't yet convert the file bin/hubot since it doesn't end in .coffee; see decaffeinate/bulk-decaffeinate#90 .) decaffeinate is working (meaning all files convert and all tests pass) on hubot as well as some other larger projects, so it seems to be pretty safe at this point (although not 100% bug-free): Certainly there are some caveats, though, like various lint issues that can't be auto-fixed and a nuance involving constructors in JS classes. Given that this repo has been inactive, a big codebase change like this may not be worth it, but happy to provide any help or advice if you're interested in using decaffeinate! |
It has been awhile, but there is work to revitalize the hubot project, and porting to ES6 is now on the roadmap |
@technicalpickles good to see there's a roadmap to ES6! |
In general, I think we should support LTS versions that are still being maintained (currently 4 & 6), and the latest release (currently 7). So this would mean dropping 0.10 and 0.12 support since they're no longer maintained. |
I guess that one important aspect is the backward compatibility of hubot scripts that have been written in |
Should Coffeescript 2 be considered? |
We'll get a proposal started soon that dives into the details of how the port to ES6 will work. |
The proposal is here: hubotio/evolution#4 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
.coffee does not look familiar for JS developers.
After es6 is on the table and its easy to make es6 work on modern JS runtime through babel. Developers will have less motivation to learn .coffee and might cause maintenance issue in long term.
We almost complete the porting from hubot coffeescript to es6 (through babel)
including all .coffee and test cases. CI test passed and even passed eslint style check.
All hubot plugins are still workable.
Since the code looks different now, I setup a separate repo:
https://github.com/gasolin/webbybot
@technicalpickles would you consider move hubot to es6 based?
The text was updated successfully, but these errors were encountered: