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
feat(#93) add compilation status messages #98
Conversation
@yegor256 pls, take a look |
src/mvnw.js
Outdated
]); | ||
const cmd = bin + ' ' + params.join(' '); | ||
console.debug('+ %s', cmd); | ||
const result = spawn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@volodya-lombrozo somewhere you indent by two spaces, somewhere by four. I'm surprised eslint
doesn't catch you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yegor256 Please, check |
src/commands/audit.js
Outdated
@@ -31,5 +31,5 @@ const parserVersion = require('../parser-version'); | |||
*/ | |||
module.exports = function(opts) { | |||
parserVersion(); | |||
mvnwSync(['--version']); | |||
mvnw(['--version']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@volodya-lombrozo why don't you use then
here? Without it, if I understand correctly, the execution in this parallel "process" will still be running, while the function the audit
will exist. Or I'm wrong? (I'm not an expert in JS)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yegor256 We can use Promises
without then and everything will works fine. Moreover, our tests prove that everything works fine. Anyway I've added the return
statement for audit
to give a caller the chance to call .then
- perhaps it will be useful in the future.
src/status.js
Outdated
@@ -0,0 +1,95 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@volodya-lombrozo what's the point of making it a separate file/module? We use it only in mvnw.js
? I think it will be more compact to put all this code in to mvnw.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yegor256 yes, it looks better now. Please check.
@yegor256 have a look |
@rultor merge |
I've added some information about compilation process, now it looks like:
It's important to notice that since
spawn
function is asynchronous and by that reason I have to wrap it and all calls using async-style chains (andPromise
), it looks like:Closes: #93