{"action":"created","comment":{"url":"https://api.github.com/repos/chromium/axiom/pulls/comments/28093537","id":28093537,"diff_hunk":"@@ -45,6 +45,74 @@ export {AxiomEvent};\n export default AxiomEvent;\n \n /**\n+ * The returned meta-event will fire as soon as (with opt_fireOnce) or whenever\n+ * (with opt_fireOnce off) one of the sub-events fire.\n+ *\n+ * @param {!Array<!AxiomEvent>} events\n+ * @param {boolean=} opt_fireOnce\n+ * @return {!AxiomEvent}\n+ */\n+AxiomEvent.any = function(events, opt_fireOnce) {","path":"lib/axiom/core/event.js","position":11,"original_position":11,"commit_id":"1a6e21141dd6c72485a3c12a11478441c008ae6b","original_commit_id":"1a6e21141dd6c72485a3c12a11478441c008ae6b","user":{"login":"ussuri","id":5606182,"avatar_url":"https://avatars.githubusercontent.com/u/5606182?v=3","gravatar_id":"","url":"https://api.github.com/users/ussuri","html_url":"https://github.com/ussuri","followers_url":"https://api.github.com/users/ussuri/followers","following_url":"https://api.github.com/users/ussuri/following{/other_user}","gists_url":"https://api.github.com/users/ussuri/gists{/gist_id}","starred_url":"https://api.github.com/users/ussuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ussuri/subscriptions","organizations_url":"https://api.github.com/users/ussuri/orgs","repos_url":"https://api.github.com/users/ussuri/repos","events_url":"https://api.github.com/users/ussuri/events{/privacy}","received_events_url":"https://api.github.com/users/ussuri/received_events","type":"User","site_admin":false},"body":"Absolutely. Will do.","created_at":"2015-04-09T19:19:15Z","updated_at":"2015-04-09T19:19:15Z","html_url":"https://github.com/chromium/axiom/pull/201#discussion_r28093537","pull_request_url":"https://api.github.com/repos/chromium/axiom/pulls/201","_links":{"self":{"href":"https://api.github.com/repos/chromium/axiom/pulls/comments/28093537"},"html":{"href":"https://github.com/chromium/axiom/pull/201#discussion_r28093537"},"pull_request":{"href":"https://api.github.com/repos/chromium/axiom/pulls/201"}}},"pull_request":{"url":"https://api.github.com/repos/chromium/axiom/pulls/201","id":32834983,"html_url":"https://github.com/chromium/axiom/pull/201","diff_url":"https://github.com/chromium/axiom/pull/201.diff","patch_url":"https://github.com/chromium/axiom/pull/201.patch","issue_url":"https://api.github.com/repos/chromium/axiom/issues/201","number":201,"state":"open","locked":false,"title":"I/O redirection part 2: redirecting stdin + large refactoring + exe/sort.js","user":{"login":"ussuri","id":5606182,"avatar_url":"https://avatars.githubusercontent.com/u/5606182?v=3","gravatar_id":"","url":"https://api.github.com/users/ussuri","html_url":"https://github.com/ussuri","followers_url":"https://api.github.com/users/ussuri/followers","following_url":"https://api.github.com/users/ussuri/following{/other_user}","gists_url":"https://api.github.com/users/ussuri/gists{/gist_id}","starred_url":"https://api.github.com/users/ussuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ussuri/subscriptions","organizations_url":"https://api.github.com/users/ussuri/orgs","repos_url":"https://api.github.com/users/ussuri/repos","events_url":"https://api.github.com/users/ussuri/events{/privacy}","received_events_url":"https://api.github.com/users/ussuri/received_events","type":"User","site_admin":false},"body":"@rpaquay \r\n\r\nAgain, sorry for the large PR :)\r\n\r\nSome notes:\r\n\r\n* Added a notion of closing for streams/buffers/stdio:\r\n * This allows a producer or consumer of a stream/buffer to indicate that there is no more data to write (for writable), or that it's no longer interested in the data (for readable), so that the consumer/producer on the other end can stop writing/reading.\r\n * This is critical for filter-like execs.\r\n * The notion of closing right now is just a function call and a corresponding event: it doesn't yet go as far tracking the state of the stream/buffer at all times; and the event can theoretically be fired multiple times.\r\n * I think that to take it further, stdio, streams and buffers should be made proper `Ephemerals`.\r\n * I haven't completely solved the chicken and egg problem where, for example, buffers create streams: it the owned stream gets closed by the client, should the owning buffer close as well? What about the opposite? I've implemented some logic, but I'm not yet 100% sure it's right. We could iterate on this.\r\n* After the first redirection PR, Wash.prototype.dispatch and ExecuteContext.prototype.setCallee ended up created two levels of NestedStdio: after adding the notion of closing for streams, that created problems with various parties listening to `onClose` on one or the other of this two nested `NestedStdio`s.\r\n* Saving both `stdio` and its individual streams on `ExecuteContext` creating an aliasing problem: nothing prevented the client from directly resetting one and getting the whole set out of sync (happened to me during debugging). I'd prefer to keep just the `stdio` member; however, there we so much usage of `stdin` etc. in the code, that I decided to do the opposite for now.\r\n* Added exe/sort.js (used it as a testing tool).\r\n\r\nI'll add more comments directly in the code changes tomorrow.","created_at":"2015-04-08T07:36:07Z","updated_at":"2015-04-09T19:19:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1da677f90e6ef02fb90e255caf8c9e6e1c2ea7d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chromium/axiom/pulls/201/commits","review_comments_url":"https://api.github.com/repos/chromium/axiom/pulls/201/comments","review_comment_url":"https://api.github.com/repos/chromium/axiom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chromium/axiom/issues/201/comments","statuses_url":"https://api.github.com/repos/chromium/axiom/statuses/1a6e21141dd6c72485a3c12a11478441c008ae6b","head":{"label":"ussuri:io-redirection","ref":"io-redirection","sha":"1a6e21141dd6c72485a3c12a11478441c008ae6b","user":{"login":"ussuri","id":5606182,"avatar_url":"https://avatars.githubusercontent.com/u/5606182?v=3","gravatar_id":"","url":"https://api.github.com/users/ussuri","html_url":"https://github.com/ussuri","followers_url":"https://api.github.com/users/ussuri/followers","following_url":"https://api.github.com/users/ussuri/following{/other_user}","gists_url":"https://api.github.com/users/ussuri/gists{/gist_id}","starred_url":"https://api.github.com/users/ussuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ussuri/subscriptions","organizations_url":"https://api.github.com/users/ussuri/orgs","repos_url":"https://api.github.com/users/ussuri/repos","events_url":"https://api.github.com/users/ussuri/events{/privacy}","received_events_url":"https://api.github.com/users/ussuri/received_events","type":"User","site_admin":false},"repo":{"id":32886743,"name":"axiom","full_name":"ussuri/axiom","owner":{"login":"ussuri","id":5606182,"avatar_url":"https://avatars.githubusercontent.com/u/5606182?v=3","gravatar_id":"","url":"https://api.github.com/users/ussuri","html_url":"https://github.com/ussuri","followers_url":"https://api.github.com/users/ussuri/followers","following_url":"https://api.github.com/users/ussuri/following{/other_user}","gists_url":"https://api.github.com/users/ussuri/gists{/gist_id}","starred_url":"https://api.github.com/users/ussuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ussuri/subscriptions","organizations_url":"https://api.github.com/users/ussuri/orgs","repos_url":"https://api.github.com/users/ussuri/repos","events_url":"https://api.github.com/users/ussuri/events{/privacy}","received_events_url":"https://api.github.com/users/ussuri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ussuri/axiom","description":"Axiom Project","fork":true,"url":"https://api.github.com/repos/ussuri/axiom","forks_url":"https://api.github.com/repos/ussuri/axiom/forks","keys_url":"https://api.github.com/repos/ussuri/axiom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ussuri/axiom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ussuri/axiom/teams","hooks_url":"https://api.github.com/repos/ussuri/axiom/hooks","issue_events_url":"https://api.github.com/repos/ussuri/axiom/issues/events{/number}","events_url":"https://api.github.com/repos/ussuri/axiom/events","assignees_url":"https://api.github.com/repos/ussuri/axiom/assignees{/user}","branches_url":"https://api.github.com/repos/ussuri/axiom/branches{/branch}","tags_url":"https://api.github.com/repos/ussuri/axiom/tags","blobs_url":"https://api.github.com/repos/ussuri/axiom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ussuri/axiom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ussuri/axiom/git/refs{/sha}","trees_url":"https://api.github.com/repos/ussuri/axiom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ussuri/axiom/statuses/{sha}","languages_url":"https://api.github.com/repos/ussuri/axiom/languages","stargazers_url":"https://api.github.com/repos/ussuri/axiom/stargazers","contributors_url":"https://api.github.com/repos/ussuri/axiom/contributors","subscribers_url":"https://api.github.com/repos/ussuri/axiom/subscribers","subscription_url":"https://api.github.com/repos/ussuri/axiom/subscription","commits_url":"https://api.github.com/repos/ussuri/axiom/commits{/sha}","git_commits_url":"https://api.github.com/repos/ussuri/axiom/git/commits{/sha}","comments_url":"https://api.github.com/repos/ussuri/axiom/comments{/number}","issue_comment_url":"https://api.github.com/repos/ussuri/axiom/issues/comments{/number}","contents_url":"https://api.github.com/repos/ussuri/axiom/contents/{+path}","compare_url":"https://api.github.com/repos/ussuri/axiom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ussuri/axiom/merges","archive_url":"https://api.github.com/repos/ussuri/axiom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ussuri/axiom/downloads","issues_url":"https://api.github.com/repos/ussuri/axiom/issues{/number}","pulls_url":"https://api.github.com/repos/ussuri/axiom/pulls{/number}","milestones_url":"https://api.github.com/repos/ussuri/axiom/milestones{/number}","notifications_url":"https://api.github.com/repos/ussuri/axiom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ussuri/axiom/labels{/name}","releases_url":"https://api.github.com/repos/ussuri/axiom/releases{/id}","created_at":"2015-03-25T19:39:57Z","updated_at":"2015-03-25T19:39:58Z","pushed_at":"2015-04-09T03:17:49Z","git_url":"git://github.com/ussuri/axiom.git","ssh_url":"git@github.com:ussuri/axiom.git","clone_url":"https://github.com/ussuri/axiom.git","svn_url":"https://github.com/ussuri/axiom","homepage":"","size":10647,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"chromium:master","ref":"master","sha":"b97ad75e86eadf8a788724c1402c097bae5ddf33","user":{"login":"chromium","id":30044,"avatar_url":"https://avatars.githubusercontent.com/u/30044?v=3","gravatar_id":"","url":"https://api.github.com/users/chromium","html_url":"https://github.com/chromium","followers_url":"https://api.github.com/users/chromium/followers","following_url":"https://api.github.com/users/chromium/following{/other_user}","gists_url":"https://api.github.com/users/chromium/gists{/gist_id}","starred_url":"https://api.github.com/users/chromium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chromium/subscriptions","organizations_url":"https://api.github.com/users/chromium/orgs","repos_url":"https://api.github.com/users/chromium/repos","events_url":"https://api.github.com/users/chromium/events{/privacy}","received_events_url":"https://api.github.com/users/chromium/received_events","type":"Organization","site_admin":false},"repo":{"id":29257259,"name":"axiom","full_name":"chromium/axiom","owner":{"login":"chromium","id":30044,"avatar_url":"https://avatars.githubusercontent.com/u/30044?v=3","gravatar_id":"","url":"https://api.github.com/users/chromium","html_url":"https://github.com/chromium","followers_url":"https://api.github.com/users/chromium/followers","following_url":"https://api.github.com/users/chromium/following{/other_user}","gists_url":"https://api.github.com/users/chromium/gists{/gist_id}","starred_url":"https://api.github.com/users/chromium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chromium/subscriptions","organizations_url":"https://api.github.com/users/chromium/orgs","repos_url":"https://api.github.com/users/chromium/repos","events_url":"https://api.github.com/users/chromium/events{/privacy}","received_events_url":"https://api.github.com/users/chromium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chromium/axiom","description":"Axiom Project","fork":false,"url":"https://api.github.com/repos/chromium/axiom","forks_url":"https://api.github.com/repos/chromium/axiom/forks","keys_url":"https://api.github.com/repos/chromium/axiom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chromium/axiom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chromium/axiom/teams","hooks_url":"https://api.github.com/repos/chromium/axiom/hooks","issue_events_url":"https://api.github.com/repos/chromium/axiom/issues/events{/number}","events_url":"https://api.github.com/repos/chromium/axiom/events","assignees_url":"https://api.github.com/repos/chromium/axiom/assignees{/user}","branches_url":"https://api.github.com/repos/chromium/axiom/branches{/branch}","tags_url":"https://api.github.com/repos/chromium/axiom/tags","blobs_url":"https://api.github.com/repos/chromium/axiom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chromium/axiom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chromium/axiom/git/refs{/sha}","trees_url":"https://api.github.com/repos/chromium/axiom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chromium/axiom/statuses/{sha}","languages_url":"https://api.github.com/repos/chromium/axiom/languages","stargazers_url":"https://api.github.com/repos/chromium/axiom/stargazers","contributors_url":"https://api.github.com/repos/chromium/axiom/contributors","subscribers_url":"https://api.github.com/repos/chromium/axiom/subscribers","subscription_url":"https://api.github.com/repos/chromium/axiom/subscription","commits_url":"https://api.github.com/repos/chromium/axiom/commits{/sha}","git_commits_url":"https://api.github.com/repos/chromium/axiom/git/commits{/sha}","comments_url":"https://api.github.com/repos/chromium/axiom/comments{/number}","issue_comment_url":"https://api.github.com/repos/chromium/axiom/issues/comments{/number}","contents_url":"https://api.github.com/repos/chromium/axiom/contents/{+path}","compare_url":"https://api.github.com/repos/chromium/axiom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chromium/axiom/merges","archive_url":"https://api.github.com/repos/chromium/axiom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chromium/axiom/downloads","issues_url":"https://api.github.com/repos/chromium/axiom/issues{/number}","pulls_url":"https://api.github.com/repos/chromium/axiom/pulls{/number}","milestones_url":"https://api.github.com/repos/chromium/axiom/milestones{/number}","notifications_url":"https://api.github.com/repos/chromium/axiom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chromium/axiom/labels{/name}","releases_url":"https://api.github.com/repos/chromium/axiom/releases{/id}","created_at":"2015-01-14T17:48:53Z","updated_at":"2015-04-09T16:46:16Z","pushed_at":"2015-04-09T16:46:16Z","git_url":"git://github.com/chromium/axiom.git","ssh_url":"git@github.com:chromium/axiom.git","clone_url":"https://github.com/chromium/axiom.git","svn_url":"https://github.com/chromium/axiom","homepage":"https://chromium.github.io/axiom/web_shell/","size":12764,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":31,"forks":6,"open_issues":31,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chromium/axiom/pulls/201"},"html":{"href":"https://github.com/chromium/axiom/pull/201"},"issue":{"href":"https://api.github.com/repos/chromium/axiom/issues/201"},"comments":{"href":"https://api.github.com/repos/chromium/axiom/issues/201/comments"},"review_comments":{"href":"https://api.github.com/repos/chromium/axiom/pulls/201/comments"},"review_comment":{"href":"https://api.github.com/repos/chromium/axiom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chromium/axiom/pulls/201/commits"},"statuses":{"href":"https://api.github.com/repos/chromium/axiom/statuses/1a6e21141dd6c72485a3c12a11478441c008ae6b"}}}}