{"action":"created","comment":{"url":"https://api.github.com/repos/flutter/flutter/pulls/comments/75549450","id":75549450,"diff_hunk":"@@ -192,98 +289,226 @@ class _LogMessage {\n     String prefix = '${millis.toString().padLeft(4)} ms • ';\n     String indent = ''.padLeft(prefix.length);\n     if (millis >= 100)\n-      prefix = terminal.writeBold(prefix.substring(0, prefix.length - 3)) + ' • ';\n+      prefix = terminal.toBold(prefix.substring(0, prefix.length - 3)) + ' • ';\n     String indentMessage = message.replaceAll('\\n', '\\n$indent');\n \n     if (type == _LogType.error) {\n-      stderr.writeln(prefix + terminal.writeBold(indentMessage));\n+      stderr.writeln(prefix + terminal.toBold(indentMessage));\n       if (stackTrace != null)\n         stderr.writeln(indent + stackTrace.toString().replaceAll('\\n', '\\n$indent'));\n     } else if (type == _LogType.status) {\n-      print(prefix + terminal.writeBold(indentMessage));\n+      print(prefix + terminal.toBold(indentMessage));\n     } else {\n       print(prefix + indentMessage);\n     }\n   }\n }\n \n+String _tputGetSequence(String capName, {String orElse}) {\n+  if (AnsiTerminal._testMode) {\n+    return '[$capName]';\n+  }\n+  if (Platform.isWindows) {\n+    return orElse;\n+  }\n+  ProcessResult result =\n+      Process.runSync('tput',  <String>['$capName'], stdoutEncoding:UTF8);","path":"packages/flutter_tools/lib/src/base/logger.dart","position":295,"original_position":295,"commit_id":"f76011e07fa288f4f31e63a3e396f19e74a430cf","original_commit_id":"f76011e07fa288f4f31e63a3e396f19e74a430cf","user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars.githubusercontent.com/u/551196?v=3","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"body":"Spawning a bunch of processes at startup seems inefficient. Can't we run it once and cache the results?","created_at":"2016-08-19T20:50:53Z","updated_at":"2016-08-19T20:50:53Z","html_url":"https://github.com/flutter/flutter/pull/5516#discussion_r75549450","pull_request_url":"https://api.github.com/repos/flutter/flutter/pulls/5516","_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments/75549450"},"html":{"href":"https://github.com/flutter/flutter/pull/5516#discussion_r75549450"},"pull_request":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5516"}}},"pull_request":{"url":"https://api.github.com/repos/flutter/flutter/pulls/5516","id":82041704,"html_url":"https://github.com/flutter/flutter/pull/5516","diff_url":"https://github.com/flutter/flutter/pull/5516.diff","patch_url":"https://github.com/flutter/flutter/pull/5516.patch","issue_url":"https://api.github.com/repos/flutter/flutter/issues/5516","number":5516,"state":"open","locked":false,"title":"Smart command line interface for flutter run.","user":{"login":"turnidge","id":4804200,"avatar_url":"https://avatars.githubusercontent.com/u/4804200?v=3","gravatar_id":"","url":"https://api.github.com/users/turnidge","html_url":"https://github.com/turnidge","followers_url":"https://api.github.com/users/turnidge/followers","following_url":"https://api.github.com/users/turnidge/following{/other_user}","gists_url":"https://api.github.com/users/turnidge/gists{/gist_id}","starred_url":"https://api.github.com/users/turnidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turnidge/subscriptions","organizations_url":"https://api.github.com/users/turnidge/orgs","repos_url":"https://api.github.com/users/turnidge/repos","events_url":"https://api.github.com/users/turnidge/events{/privacy}","received_events_url":"https://api.github.com/users/turnidge/received_events","type":"User","site_admin":false},"body":"New command line code is in the lib/src/cli directory and is a port of\r\nsome Observatory and old ddbg (dart command line debugger) code.\r\n\r\nSome highlights:\r\n\r\n- Emacs-ish command line editing (^A, ^E, ^F, ^B, ^K, left/right arrows, etc.)\r\n- Command history (up/down arrows)\r\n- Command completion (tab)\r\n- Command help system\r\n\r\nAs part of the change, I rewrote AnsiTerminal to get the relevant\r\ntermcap strings from tput directly.\r\n\r\nTested in smart and dumb terminal modes.\r\n\r\nProgress spinners now hide/show themselves around log messages, so\r\ngettting a log message while you have an active progress spinner no\r\nlonger looks funny.","created_at":"2016-08-19T20:34:26Z","updated_at":"2016-08-19T20:50:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b7b443c68d96690083394300e68b8c5fdffac60","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/flutter/flutter/pulls/5516/commits","review_comments_url":"https://api.github.com/repos/flutter/flutter/pulls/5516/comments","review_comment_url":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/5516/comments","statuses_url":"https://api.github.com/repos/flutter/flutter/statuses/f76011e07fa288f4f31e63a3e396f19e74a430cf","head":{"label":"turnidge:SmartCommandLine","ref":"SmartCommandLine","sha":"f76011e07fa288f4f31e63a3e396f19e74a430cf","user":{"login":"turnidge","id":4804200,"avatar_url":"https://avatars.githubusercontent.com/u/4804200?v=3","gravatar_id":"","url":"https://api.github.com/users/turnidge","html_url":"https://github.com/turnidge","followers_url":"https://api.github.com/users/turnidge/followers","following_url":"https://api.github.com/users/turnidge/following{/other_user}","gists_url":"https://api.github.com/users/turnidge/gists{/gist_id}","starred_url":"https://api.github.com/users/turnidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turnidge/subscriptions","organizations_url":"https://api.github.com/users/turnidge/orgs","repos_url":"https://api.github.com/users/turnidge/repos","events_url":"https://api.github.com/users/turnidge/events{/privacy}","received_events_url":"https://api.github.com/users/turnidge/received_events","type":"User","site_admin":false},"repo":{"id":46366691,"name":"flutter","full_name":"turnidge/flutter","owner":{"login":"turnidge","id":4804200,"avatar_url":"https://avatars.githubusercontent.com/u/4804200?v=3","gravatar_id":"","url":"https://api.github.com/users/turnidge","html_url":"https://github.com/turnidge","followers_url":"https://api.github.com/users/turnidge/followers","following_url":"https://api.github.com/users/turnidge/following{/other_user}","gists_url":"https://api.github.com/users/turnidge/gists{/gist_id}","starred_url":"https://api.github.com/users/turnidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turnidge/subscriptions","organizations_url":"https://api.github.com/users/turnidge/orgs","repos_url":"https://api.github.com/users/turnidge/repos","events_url":"https://api.github.com/users/turnidge/events{/privacy}","received_events_url":"https://api.github.com/users/turnidge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/turnidge/flutter","description":"The Flutter framework","fork":true,"url":"https://api.github.com/repos/turnidge/flutter","forks_url":"https://api.github.com/repos/turnidge/flutter/forks","keys_url":"https://api.github.com/repos/turnidge/flutter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/turnidge/flutter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/turnidge/flutter/teams","hooks_url":"https://api.github.com/repos/turnidge/flutter/hooks","issue_events_url":"https://api.github.com/repos/turnidge/flutter/issues/events{/number}","events_url":"https://api.github.com/repos/turnidge/flutter/events","assignees_url":"https://api.github.com/repos/turnidge/flutter/assignees{/user}","branches_url":"https://api.github.com/repos/turnidge/flutter/branches{/branch}","tags_url":"https://api.github.com/repos/turnidge/flutter/tags","blobs_url":"https://api.github.com/repos/turnidge/flutter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/turnidge/flutter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/turnidge/flutter/git/refs{/sha}","trees_url":"https://api.github.com/repos/turnidge/flutter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/turnidge/flutter/statuses/{sha}","languages_url":"https://api.github.com/repos/turnidge/flutter/languages","stargazers_url":"https://api.github.com/repos/turnidge/flutter/stargazers","contributors_url":"https://api.github.com/repos/turnidge/flutter/contributors","subscribers_url":"https://api.github.com/repos/turnidge/flutter/subscribers","subscription_url":"https://api.github.com/repos/turnidge/flutter/subscription","commits_url":"https://api.github.com/repos/turnidge/flutter/commits{/sha}","git_commits_url":"https://api.github.com/repos/turnidge/flutter/git/commits{/sha}","comments_url":"https://api.github.com/repos/turnidge/flutter/comments{/number}","issue_comment_url":"https://api.github.com/repos/turnidge/flutter/issues/comments{/number}","contents_url":"https://api.github.com/repos/turnidge/flutter/contents/{+path}","compare_url":"https://api.github.com/repos/turnidge/flutter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/turnidge/flutter/merges","archive_url":"https://api.github.com/repos/turnidge/flutter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/turnidge/flutter/downloads","issues_url":"https://api.github.com/repos/turnidge/flutter/issues{/number}","pulls_url":"https://api.github.com/repos/turnidge/flutter/pulls{/number}","milestones_url":"https://api.github.com/repos/turnidge/flutter/milestones{/number}","notifications_url":"https://api.github.com/repos/turnidge/flutter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/turnidge/flutter/labels{/name}","releases_url":"https://api.github.com/repos/turnidge/flutter/releases{/id}","deployments_url":"https://api.github.com/repos/turnidge/flutter/deployments","created_at":"2015-11-17T18:26:01Z","updated_at":"2016-08-19T20:31:07Z","pushed_at":"2016-08-19T20:44:52Z","git_url":"git://github.com/turnidge/flutter.git","ssh_url":"git@github.com:turnidge/flutter.git","clone_url":"https://github.com/turnidge/flutter.git","svn_url":"https://github.com/turnidge/flutter","homepage":"http://flutter.io","size":13499,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flutter:master","ref":"master","sha":"b8a60f5bbdc5ebfbec3c370caeb18918ab08b19f","user":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"repo":{"id":31792824,"name":"flutter","full_name":"flutter/flutter","owner":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flutter/flutter","description":"Framework for building high-performance, high-fidelity iOS and Android apps.","fork":false,"url":"https://api.github.com/repos/flutter/flutter","forks_url":"https://api.github.com/repos/flutter/flutter/forks","keys_url":"https://api.github.com/repos/flutter/flutter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flutter/flutter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flutter/flutter/teams","hooks_url":"https://api.github.com/repos/flutter/flutter/hooks","issue_events_url":"https://api.github.com/repos/flutter/flutter/issues/events{/number}","events_url":"https://api.github.com/repos/flutter/flutter/events","assignees_url":"https://api.github.com/repos/flutter/flutter/assignees{/user}","branches_url":"https://api.github.com/repos/flutter/flutter/branches{/branch}","tags_url":"https://api.github.com/repos/flutter/flutter/tags","blobs_url":"https://api.github.com/repos/flutter/flutter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flutter/flutter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flutter/flutter/git/refs{/sha}","trees_url":"https://api.github.com/repos/flutter/flutter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flutter/flutter/statuses/{sha}","languages_url":"https://api.github.com/repos/flutter/flutter/languages","stargazers_url":"https://api.github.com/repos/flutter/flutter/stargazers","contributors_url":"https://api.github.com/repos/flutter/flutter/contributors","subscribers_url":"https://api.github.com/repos/flutter/flutter/subscribers","subscription_url":"https://api.github.com/repos/flutter/flutter/subscription","commits_url":"https://api.github.com/repos/flutter/flutter/commits{/sha}","git_commits_url":"https://api.github.com/repos/flutter/flutter/git/commits{/sha}","comments_url":"https://api.github.com/repos/flutter/flutter/comments{/number}","issue_comment_url":"https://api.github.com/repos/flutter/flutter/issues/comments{/number}","contents_url":"https://api.github.com/repos/flutter/flutter/contents/{+path}","compare_url":"https://api.github.com/repos/flutter/flutter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flutter/flutter/merges","archive_url":"https://api.github.com/repos/flutter/flutter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flutter/flutter/downloads","issues_url":"https://api.github.com/repos/flutter/flutter/issues{/number}","pulls_url":"https://api.github.com/repos/flutter/flutter/pulls{/number}","milestones_url":"https://api.github.com/repos/flutter/flutter/milestones{/number}","notifications_url":"https://api.github.com/repos/flutter/flutter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flutter/flutter/labels{/name}","releases_url":"https://api.github.com/repos/flutter/flutter/releases{/id}","deployments_url":"https://api.github.com/repos/flutter/flutter/deployments","created_at":"2015-03-06T22:54:58Z","updated_at":"2016-08-19T20:29:58Z","pushed_at":"2016-08-19T20:49:27Z","git_url":"git://github.com/flutter/flutter.git","ssh_url":"git@github.com:flutter/flutter.git","clone_url":"https://github.com/flutter/flutter.git","svn_url":"https://github.com/flutter/flutter","homepage":"https://flutter.io","size":115553,"stargazers_count":3134,"watchers_count":3134,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":337,"mirror_url":null,"open_issues_count":1283,"forks":337,"open_issues":1283,"watchers":3134,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5516"},"html":{"href":"https://github.com/flutter/flutter/pull/5516"},"issue":{"href":"https://api.github.com/repos/flutter/flutter/issues/5516"},"comments":{"href":"https://api.github.com/repos/flutter/flutter/issues/5516/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5516/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5516/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/flutter/statuses/f76011e07fa288f4f31e63a3e396f19e74a430cf"}}}}
{"actor":{"display_login":"Hixie"}}