You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Convert to plain JavaScript (or perhaps ES6 with Babel) #48
This is a tracking issue for converting the codebase to plain JavaScript. Many potential contributors have expressed their feelings that they're unable to work with a CoffeeScript codebase, plus CoffeeScript is being left behind in features anyway. It has outlived its usefulness.
Steps:
Combine lib and src so that we can start writing plain JS files that work from both CS and JS.
Make the linters and hinters to look at the JS codebase while also keeping them looking at the CS codebase.
Replace files one by one over a longer period of time.
Get rid of CS hinters and linters.
Get rid of the prepublish build script (unless converted to Babel).
It's a slow start, but adbkit-apkreader has now been freed from CoffeeScript as of v3.0.0. It was quite time intensive, though. Even though it's a fairly small module, it took over an hour to clean up after a decaffeinate run. I estimate that adbkit would take at least two full working days to go through.
Hi @sorccu
I took a look at decaf branch. So, we could check each .js file, if it was correctly decaffeinated, we can take off the comments. And if not, we just fix it, then jump to the next file?
Sorry, but I didn't understand
Combine lib and src so that we can start writing plain JS files that work from both CS and JS.
Could you explain it better? What do you mean by combining lib and src?
adbkit-logcat no longer uses CoffeeScript as of v2.0.0. It took about two hours to convert everything. While larger than adbkit-apkreader which was previously converted, it's still way, way smaller than adbkit itself. My estimate of several days to convert adbkit still stands.
Maybe is time to rewrite the adbkit with pure JavaScript. It's not only just about the CoffeeScript, it's also about the dependencies many of which are out of date, such as the bluebird.
Outdated deps are a separate issue - some spots still use progress callbacks which means that breaking changes are required, which means more work downstream. It’s not quite so simple.
Also, and please keep in mind that I am trying to say this as nicely as possible, and I am aware that your intent was not malicious, but just to make it clear, open source creators/maintainers are not public utilities. Unfortunately, spending two or more days on the conversion is not a time investment I will be able to or necessarily even want to do anytime soon - certainly you should not expect that. It may happen or it might not. It is a significant task.
If someone wants to take charge of the conversion project, that would be great and would make things go faster :) Should I end up doing it, it will be on my terms.
I would like to help convert project to plain JavaScript.
but as I can see , it's already in plain JavaScript when install with npm.
Is it done already?
Activity
sorccu commentedon Aug 8, 2016
https://github.com/decaffeinate/decaffeinate seems to produce surprisingly decent results, at least with the smaller files I tried.
sorccu commentedon Sep 22, 2017
It's a slow start, but
adbkit-apkreaderhas now been freed from CoffeeScript as of v3.0.0. It was quite time intensive, though. Even though it's a fairly small module, it took over an hour to clean up after a decaffeinate run. I estimate that adbkit would take at least two full working days to go through.amadeu01 commentedon Oct 21, 2017
Hi @sorccu
I took a look at decaf branch. So, we could check each
.jsfile, if it was correctly decaffeinated, we can take off the comments. And if not, we just fix it, then jump to the next file?Sorry, but I didn't understand
Could you explain it better? What do you mean by combining lib and src?
sorccu commentedon Oct 21, 2017
Tests require the src folder, whereas the public package only has the lib folder.
The decaf branch is slightly out of date. While the converted files may work as-is, many of them look quite crappy.
sorccu commentedon Oct 21, 2017
adbkit-logcatno longer uses CoffeeScript as of v2.0.0. It took about two hours to convert everything. While larger thanadbkit-apkreaderwhich was previously converted, it's still way, way smaller thanadbkititself. My estimate of several days to convert adbkit still stands.harlentan commentedon Mar 31, 2018
How is this project going ?
Maybe is time to rewrite the adbkit with pure JavaScript. It's not only just about the CoffeeScript, it's also about the dependencies many of which are out of date, such as the bluebird.
sorccu commentedon Mar 31, 2018
Outdated deps are a separate issue - some spots still use progress callbacks which means that breaking changes are required, which means more work downstream. It’s not quite so simple.
Also, and please keep in mind that I am trying to say this as nicely as possible, and I am aware that your intent was not malicious, but just to make it clear, open source creators/maintainers are not public utilities. Unfortunately, spending two or more days on the conversion is not a time investment I will be able to or necessarily even want to do anytime soon - certainly you should not expect that. It may happen or it might not. It is a significant task.
If someone wants to take charge of the conversion project, that would be great and would make things go faster :) Should I end up doing it, it will be on my terms.
harlentan commentedon Mar 31, 2018
Thanks for your effert for this. You did a great job.
phapdinh commentedon Sep 19, 2019
@sorccu can we start by converting the grunt file from CS to JS? I can create a PR for it
sorccu commentedon Sep 20, 2019
Yes
P0oOOOo0YA commentedon Jan 28, 2020
2020 Go straight to Typescript
huhuang03 commentedon Apr 28, 2020
go typescript?
koral-- commentedon Apr 28, 2020
There is a PR for that. However it has merge conflicts: #120
feel free to resolve them :)
RexHuang commentedon Jun 30, 2020
I would like to help convert project to plain JavaScript.
but as I can see , it's already in plain JavaScript when install with npm.
Is it done already?
koral-- commentedon Jun 30, 2020
Coffee files are still in sources: https://github.com/openstf/adbkit/tree/master/src
RexHuang commentedon Jul 1, 2020
Here's the sample of plain Javascript version https://github.com/RexHuang/adbkit.js
phapdinh commentedon Jul 4, 2020
this PR has existed to convert only the grunt file to javascript for a while and it has no merge conflicts https://github.com/openstf/adbkit/pull/122/files