-
Notifications
You must be signed in to change notification settings - Fork 3
preparation to get rid of jxcore specific utils #88
base: master
Are you sure you want to change the base?
Conversation
|
@yaronyg @andrew-aladev @chapko please review only file |
89dd630 to
7b386b7
Compare
c6c21c3 to
9c72786
Compare
|
I think it's to to start reviewing this PR. |
|
Reviewed 9 of 15 files at r1, 6 of 9 files at r2. logger.js, line 12 at r2 (raw file):
logger.js, line 14 at r2 (raw file):
Since you're using ES next, you can rewrite it with logger.js, line 23 at r2 (raw file):
Use spread operator: format(...messages)logger.js, line 35 at r2 (raw file):
I suggest something like: new Date().toISOString().replace(/[TZ]/, ' ').trim();Milliseconds are important in the logs. logger.js, line 42 at r2 (raw file):
You can use rest syntax here: error (...messages) {
this._log(console.error, chalk.red, messages);
}builder/virtual.js, line 332 at r2 (raw file):
It reminds me of little bobby tables :) internal/tester.js, line 10 at r2 (raw file):
tasker/run_.sh, line 11 at r2 (raw file):
how "sing_ios.sh" is related to this script? Comments from Reviewable |
9c72786 to
d133965
Compare
33bb6c6 to
62286e7
Compare
|
Review status: 11 of 18 files reviewed at latest revision, 8 unresolved discussions. logger.js, line 12 at r2 (raw file): Previously, chapko (Eugene Chapko) wrote…
Done. logger.js, line 23 at r2 (raw file): Previously, chapko (Eugene Chapko) wrote…
Done. logger.js, line 35 at r2 (raw file): Previously, chapko (Eugene Chapko) wrote…
Done. internal/tester.js, line 10 at r2 (raw file): Previously, chapko (Eugene Chapko) wrote…
Done. tasker/run_.sh, line 11 at r2 (raw file): Previously, chapko (Eugene Chapko) wrote…
Done. Comments from Reviewable |
|
Review status: 11 of 18 files reviewed at latest revision, 10 unresolved discussions. db_actions.js, line 1 at r4 (raw file):
As you're fixing issues in this file it would be good to add missing ';' in line 22,line 30 and line 39 db_actions.js, line 9 at r4 (raw file):
Shouldn't we first declare loki with require and later instantiate it? Comments from Reviewable |
|
db_actions.js, line 1 at r4 (raw file): Previously, jareksl (Jarosław Słota) wrote…
Please also remove two not used functions find() and remove() lines 66 and 82 Comments from Reviewable |
|
Reviewed 8 of 15 files at r1, 7 of 9 files at r2, 3 of 3 files at r4. tasker/android.js, line 33 at r4 (raw file):
NB: Since you are running this in real Node why not use the await syntax? It's SOOO much nicer! tasker/android.js, line 101 at r4 (raw file):
NB: What original implementation? Comments from Reviewable |
|
Review status: 16 of 18 files reviewed at latest revision, 12 unresolved discussions. db_actions.js, line 1 at r4 (raw file): Previously, jareksl (Jarosław Słota) wrote…
Done. db_actions.js, line 9 at r4 (raw file): Previously, jareksl (Jarosław Słota) wrote…
Done. tasker/android.js, line 33 at r4 (raw file): Previously, yaronyg (Yaron Y Goland) wrote…
I absolutely agree. I was initially using Promises when I didn't expect that I would use node. tasker/android.js, line 101 at r4 (raw file): Previously, yaronyg (Yaron Y Goland) wrote…
This's unnecessary TODO I forgot to remove. Comments from Reviewable |
|
Reviewed 1 of 9 files at r2. Comments from Reviewable |
|
Review status: 16 of 18 files reviewed at latest revision, 13 unresolved discussions. tasker/android.js, line 216 at r5 (raw file):
We need to make sure that before the test app is started the coordination server is running (in case it is needed). You can check the following issue for details: #97. Branch master_97_rework contains a temporary solution which introduces a timeout. We need to fix this here. In worst case it could be timeout as well but the best option would be to wait till coordination server is started. The server starts after this call but it takes some time as it includes npm install. We need some mechanism in ____.js so that we can ask the server if the coordination server has been started. Then we may continue. Comments from Reviewable |
|
Review status: 16 of 18 files reviewed at latest revision, 13 unresolved discussions. tasker/android.js, line 216 at r5 (raw file): Previously, czyzm wrote…
what if we just add Comments from Reviewable |
|
Reviewed 1 of 15 files at r1, 2 of 9 files at r2, 1 of 2 files at r5. db_actions.js, line 23 at r5 (raw file):
NB: Leaving a commented code is usually not good, we have version control to handle such cases. I'd prefer to remove it from here. builder/virtual.js, line 330 at r5 (raw file):
The == and != operators do type coercion and should not be used. Please fix this issue in all places in this file hook/git_actions.js, line 12 at r5 (raw file):
Please add missing semicolon. hook/git_actions.js, line 154 at r5 (raw file):
The return statement is not needed here. You can also leave it and get rid of succeeding "else" leaving the content, which would simplify the code a bit by removing one intent. hook/git_request.js, line 25 at r5 (raw file):
The != operators do type coercion and should not be used. Use !== instead. hook/git_request.js, line 60 at r5 (raw file):
We can get rid of the second part of the if statement: hook/git_request.js, line 62 at r5 (raw file):
Why not simply check for negative and log it? like: Additionally this statement could be combined with the one from the line 54 hook/git_request.js, line 78 at r5 (raw file):
Variables repo_name, branch and user are declared again here. Better would be to declare all variables at the beginning of the file. Vars don't have block scope, so defining variables in blocks can be confusing. internal/tester.js, line 223 at r5 (raw file):
Variable res is declared again internal/tester.js, line 226 at r5 (raw file):
Variables str and fname are declared again. The same for variable o. They should be declared once at the beginning of the file. Comments from Reviewable |
|
@jareksl Please note that CI has a lot of crappy code, which was introduced before we took the project. This's definitely MUST be fixed. But I think that this should not be the focus of this PR review. At least because this PR will last forever and fixing warnings / bad code isn't the goal of this PR. I think that code cleanup should be another PR. Review status: 17 of 18 files reviewed at latest revision, 23 unresolved discussions. Comments from Reviewable |
|
Review status: 17 of 18 files reviewed at latest revision, 23 unresolved discussions. tasker/android.js, line 216 at r5 (raw file): Previously, larryonoff (larryonoff) wrote…
No need to handle it. Fixed by thaliproject/Thali_CordovaPlugin#1712 Comments from Reviewable |
|
I agree, I have just reported issues to not forget about them, I'll create separate issue to refactor the CI code Review status: 17 of 18 files reviewed at latest revision, 23 unresolved discussions. Comments from Reviewable |
|
Review status: 17 of 18 files reviewed at latest revision, 23 unresolved discussions. tasker/android.js, line 216 at r5 (raw file): Previously, czyzm wrote…
this's very good! Comments from Reviewable |
|
The issue #99 is meant to be used for code cleanup. Reviewed 6 of 15 files at r1, 4 of 9 files at r2, 3 of 3 files at r4, 1 of 2 files at r5. tools/android/adb.js, line 15 at r5 (raw file):
NB: not needed semicolon Comments from Reviewable |
|
We need to adapt CI infrastructure for those changes. The main change is installing node on RaspberryPI modules. This needs to wait for now. |
The most breaking changes are in
tools/android/*andtasker/android.js. I generaltasker/android.jswas rewritten into promises.This change is