{"action":"created","comment":{"url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/comments/86779202","pull_request_review_id":7418359,"id":86779202,"diff_hunk":"@@ -1,23 +1,30 @@\n import sublime, sublime_plugin\n from .fuse_util import *\n \n-paths = []\n-buildResultPanel = None\n-\n def NameRegions(view):\n \treturn view.find_by_selector(\"entity.name.filename.find-in-files.warning\") + view.find_by_selector(\"entity.name.tag.error\")\n \n+def tryHandleBuildEvent(event):\n+\tif event.type == \"Fuse.BuildStarted\":\n+\t\tif event.data[\"BuildType\"] == \"LoadMarkup\":\n+\t\t\tBuildResults.instance = BuildResults()\n+\t\treturn True\n+\telif event.type == \"Fuse.BuildIssueDetected\":\n+\t\tBuildResults.instance.tryHandleBuildEvent(event)\n+\t\treturn True\n+\treturn False\n+\n class BuildResults:\n-\tdef __init__(self, window, buildId):\n-\t\tglobal paths\t\n-\t\tpaths = []\n \n-\t\tglobal buildResultPanel\n-\t\tbuildResultPanel = window.create_output_panel(\"FuseBuildResults\")\n-\t\tbuildResultPanel.set_name(\"Fuse - Auto Reload Result\")\n-\t\tbuildResultPanel.set_syntax_file(\"Packages/Fuse/BuildResults.hidden-tmLanguage\")\n+\tinstance = None","path":"build_results.py","position":29,"original_position":29,"commit_id":"833852ef9efd1dd1948c8e10f17b52f8115da17c","original_commit_id":"833852ef9efd1dd1948c8e10f17b52f8115da17c","user":{"login":"Tapped","id":1014854,"avatar_url":"https://avatars.githubusercontent.com/u/1014854?v=3","gravatar_id":"","url":"https://api.github.com/users/Tapped","html_url":"https://github.com/Tapped","followers_url":"https://api.github.com/users/Tapped/followers","following_url":"https://api.github.com/users/Tapped/following{/other_user}","gists_url":"https://api.github.com/users/Tapped/gists{/gist_id}","starred_url":"https://api.github.com/users/Tapped/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tapped/subscriptions","organizations_url":"https://api.github.com/users/Tapped/orgs","repos_url":"https://api.github.com/users/Tapped/repos","events_url":"https://api.github.com/users/Tapped/events{/privacy}","received_events_url":"https://api.github.com/users/Tapped/received_events","type":"User","site_admin":false},"body":"Looks like `instance` is not used anywhere?","created_at":"2016-11-07T13:57:01Z","updated_at":"2016-11-07T13:57:01Z","html_url":"https://github.com/fusetools/Fuse.SublimePlugin/pull/29#discussion_r86779202","pull_request_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/comments/86779202"},"html":{"href":"https://github.com/fusetools/Fuse.SublimePlugin/pull/29#discussion_r86779202"},"pull_request":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/29","id":92540945,"html_url":"https://github.com/fusetools/Fuse.SublimePlugin/pull/29","diff_url":"https://github.com/fusetools/Fuse.SublimePlugin/pull/29.diff","patch_url":"https://github.com/fusetools/Fuse.SublimePlugin/pull/29.patch","issue_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/issues/29","number":29,"state":"open","locked":false,"title":"Feature stdout","user":{"login":"knatten","id":727543,"avatar_url":"https://avatars.githubusercontent.com/u/727543?v=3","gravatar_id":"","url":"https://api.github.com/users/knatten","html_url":"https://github.com/knatten","followers_url":"https://api.github.com/users/knatten/followers","following_url":"https://api.github.com/users/knatten/following{/other_user}","gists_url":"https://api.github.com/users/knatten/gists{/gist_id}","starred_url":"https://api.github.com/users/knatten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knatten/subscriptions","organizations_url":"https://api.github.com/users/knatten/orgs","repos_url":"https://api.github.com/users/knatten/repos","events_url":"https://api.github.com/users/knatten/events{/privacy}","received_events_url":"https://api.github.com/users/knatten/received_events","type":"User","site_admin":false},"body":"This changes from using Fuse Protocol events to stdout for output in calls to `fuse preview` and `fuse build`. Note that we still use the Fuse Protocol for `BuildIssueDetected` events, to be able to pop up the build results panel with links to the errors.\r\n\r\nThe biggest change is the removal of  `build_view.py` and the introduction of `BuildManager`. `BuildManager` is in charge of managing build processes and output tabs. Each build process gets an output tab. If a new build is started with the same target, the old build is stopped, and the old tab closed. This way we avoid spamming tabs.\r\n\r\nI've also done a little bit of other cleanup:\r\n- In `build_results.py` I've removed a few global variables and use a singleton instead, to make the code a bit easier to understand.\r\n- I've updated `Fuse.sublime-build` to use the new build target names from Uno\r\n\r\n(See also the internal issue https://github.com/fusetools/Fuse/issues/2520)","created_at":"2016-11-07T08:27:43Z","updated_at":"2016-11-07T13:57:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c8c258109ea33ddcdcf296163814cefcb4ab88a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/29/commits","review_comments_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/29/comments","review_comment_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/issues/29/comments","statuses_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/statuses/833852ef9efd1dd1948c8e10f17b52f8115da17c","head":{"label":"knatten:feature-stdout","ref":"feature-stdout","sha":"833852ef9efd1dd1948c8e10f17b52f8115da17c","user":{"login":"knatten","id":727543,"avatar_url":"https://avatars.githubusercontent.com/u/727543?v=3","gravatar_id":"","url":"https://api.github.com/users/knatten","html_url":"https://github.com/knatten","followers_url":"https://api.github.com/users/knatten/followers","following_url":"https://api.github.com/users/knatten/following{/other_user}","gists_url":"https://api.github.com/users/knatten/gists{/gist_id}","starred_url":"https://api.github.com/users/knatten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knatten/subscriptions","organizations_url":"https://api.github.com/users/knatten/orgs","repos_url":"https://api.github.com/users/knatten/repos","events_url":"https://api.github.com/users/knatten/events{/privacy}","received_events_url":"https://api.github.com/users/knatten/received_events","type":"User","site_admin":false},"repo":{"id":72546678,"name":"Fuse.SublimePlugin","full_name":"knatten/Fuse.SublimePlugin","owner":{"login":"knatten","id":727543,"avatar_url":"https://avatars.githubusercontent.com/u/727543?v=3","gravatar_id":"","url":"https://api.github.com/users/knatten","html_url":"https://github.com/knatten","followers_url":"https://api.github.com/users/knatten/followers","following_url":"https://api.github.com/users/knatten/following{/other_user}","gists_url":"https://api.github.com/users/knatten/gists{/gist_id}","starred_url":"https://api.github.com/users/knatten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knatten/subscriptions","organizations_url":"https://api.github.com/users/knatten/orgs","repos_url":"https://api.github.com/users/knatten/repos","events_url":"https://api.github.com/users/knatten/events{/privacy}","received_events_url":"https://api.github.com/users/knatten/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/knatten/Fuse.SublimePlugin","description":null,"fork":true,"url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin","forks_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/forks","keys_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/teams","hooks_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/hooks","issue_events_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/issues/events{/number}","events_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/events","assignees_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/assignees{/user}","branches_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/branches{/branch}","tags_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/tags","blobs_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/statuses/{sha}","languages_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/languages","stargazers_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/stargazers","contributors_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/contributors","subscribers_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/subscribers","subscription_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/subscription","commits_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/contents/{+path}","compare_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/merges","archive_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/downloads","issues_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/issues{/number}","pulls_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/pulls{/number}","milestones_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/milestones{/number}","notifications_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/labels{/name}","releases_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/releases{/id}","deployments_url":"https://api.github.com/repos/knatten/Fuse.SublimePlugin/deployments","created_at":"2016-11-01T14:57:25Z","updated_at":"2016-11-01T14:57:26Z","pushed_at":"2016-11-07T08:24:02Z","git_url":"git://github.com/knatten/Fuse.SublimePlugin.git","ssh_url":"git@github.com:knatten/Fuse.SublimePlugin.git","clone_url":"https://github.com/knatten/Fuse.SublimePlugin.git","svn_url":"https://github.com/knatten/Fuse.SublimePlugin","homepage":null,"size":231,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"fusetools:master","ref":"master","sha":"780006db9bfc7147af00d80d129275a86cced04b","user":{"login":"fusetools","id":10243317,"avatar_url":"https://avatars.githubusercontent.com/u/10243317?v=3","gravatar_id":"","url":"https://api.github.com/users/fusetools","html_url":"https://github.com/fusetools","followers_url":"https://api.github.com/users/fusetools/followers","following_url":"https://api.github.com/users/fusetools/following{/other_user}","gists_url":"https://api.github.com/users/fusetools/gists{/gist_id}","starred_url":"https://api.github.com/users/fusetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusetools/subscriptions","organizations_url":"https://api.github.com/users/fusetools/orgs","repos_url":"https://api.github.com/users/fusetools/repos","events_url":"https://api.github.com/users/fusetools/events{/privacy}","received_events_url":"https://api.github.com/users/fusetools/received_events","type":"Organization","site_admin":false},"repo":{"id":25250298,"name":"Fuse.SublimePlugin","full_name":"fusetools/Fuse.SublimePlugin","owner":{"login":"fusetools","id":10243317,"avatar_url":"https://avatars.githubusercontent.com/u/10243317?v=3","gravatar_id":"","url":"https://api.github.com/users/fusetools","html_url":"https://github.com/fusetools","followers_url":"https://api.github.com/users/fusetools/followers","following_url":"https://api.github.com/users/fusetools/following{/other_user}","gists_url":"https://api.github.com/users/fusetools/gists{/gist_id}","starred_url":"https://api.github.com/users/fusetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusetools/subscriptions","organizations_url":"https://api.github.com/users/fusetools/orgs","repos_url":"https://api.github.com/users/fusetools/repos","events_url":"https://api.github.com/users/fusetools/events{/privacy}","received_events_url":"https://api.github.com/users/fusetools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusetools/Fuse.SublimePlugin","description":null,"fork":false,"url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin","forks_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/forks","keys_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/teams","hooks_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/hooks","issue_events_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/issues/events{/number}","events_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/events","assignees_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/assignees{/user}","branches_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/branches{/branch}","tags_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/tags","blobs_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/statuses/{sha}","languages_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/languages","stargazers_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/stargazers","contributors_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/contributors","subscribers_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/subscribers","subscription_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/subscription","commits_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/contents/{+path}","compare_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/merges","archive_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/downloads","issues_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/issues{/number}","pulls_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls{/number}","milestones_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/milestones{/number}","notifications_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/labels{/name}","releases_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/releases{/id}","deployments_url":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/deployments","created_at":"2014-10-15T10:41:52Z","updated_at":"2016-10-05T19:21:14Z","pushed_at":"2016-11-07T08:27:43Z","git_url":"git://github.com/fusetools/Fuse.SublimePlugin.git","ssh_url":"git@github.com:fusetools/Fuse.SublimePlugin.git","clone_url":"https://github.com/fusetools/Fuse.SublimePlugin.git","svn_url":"https://github.com/fusetools/Fuse.SublimePlugin","homepage":null,"size":207,"stargazers_count":20,"watchers_count":20,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/29"},"html":{"href":"https://github.com/fusetools/Fuse.SublimePlugin/pull/29"},"issue":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/issues/29"},"comments":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/fusetools/Fuse.SublimePlugin/statuses/833852ef9efd1dd1948c8e10f17b52f8115da17c"}}}}
{"actor":{"display_login":"Tapped"}}