-
Notifications
You must be signed in to change notification settings - Fork 87
migrate the build command to use the build daemon #298
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
Conversation
grouma
left a comment
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.
I'm surprised there are no test changes. They all work as expected?
I was just letting travis find the errors and ill fix them up - but there don't seem to be a lot, mostly logging related. |
grouma
left a comment
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.
LGTM. Ping me when you have fixed the tests.
| 'directory.')); | ||
|
|
||
| await process.shouldExit(73); | ||
| await process.shouldExit(isNot(0)); |
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.
Is this technically a breaking change?
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.
This was potentially valuable, though I don't know if there were any actual users. Is it possible to still support it?
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.
We can't reasonably support it as it stands right now I don't think, we don't get exit codes from the build daemon as far as I could tell.
|
Do we want to get this in for v2? |
| var log = serverLog.log; | ||
| Level recordLevel; | ||
| for (var level in Level.LEVELS) { | ||
| if (log.startsWith('[$level]')) { |
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.
We're going to end up building this string over and over. I wonder if we want something like:
final levelsByLabel = Map.fromIterable(Level.LEVELS, key: (l) => '[$l]'); // should be static
...
var messageLabel = levelsByLabel.keys.firstWhere(log.startsWith);
return messageLabel == null ? null : levelsByLabel[messageLabel];Then we can look forward to writing it instead as
var levelsByLabel = {for (var l in Level.LEVELS) '[$l]': l};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.
I just moved these utilities around in this pr since they aren't specific to the serve command any more, we could follow up with something but I think we have a lot of other much slower things going on in the logging than this :D.
Also probably a switch statement or something would probably be faster than a map for that if we are concerned about perf?
yes |
No description provided.