{"action":"created","comment":{"url":"https://api.github.com/repos/performancecopilot/speed/pulls/comments/104461903","pull_request_review_id":25300673,"id":104461903,"diff_hunk":"@@ -3,8 +3,8 @@ package bytewriter\n import (\n \t\"fmt\"\n \t\"os\"\n-\t\"path\"\n-\t\"syscall\"\n+\tpath \"path/filepath\"","path":"bytewriter/memorymappedwriter.go","position":6,"original_position":6,"commit_id":"bad22e79569cea94816709c6b1c7ecfb02fe36d9","original_commit_id":"bad22e79569cea94816709c6b1c7ecfb02fe36d9","user":{"login":"suyash","id":16324837,"avatar_url":"https://avatars1.githubusercontent.com/u/16324837?v=3","gravatar_id":"","url":"https://api.github.com/users/suyash","html_url":"https://github.com/suyash","followers_url":"https://api.github.com/users/suyash/followers","following_url":"https://api.github.com/users/suyash/following{/other_user}","gists_url":"https://api.github.com/users/suyash/gists{/gist_id}","starred_url":"https://api.github.com/users/suyash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suyash/subscriptions","organizations_url":"https://api.github.com/users/suyash/orgs","repos_url":"https://api.github.com/users/suyash/repos","events_url":"https://api.github.com/users/suyash/events{/privacy}","received_events_url":"https://api.github.com/users/suyash/received_events","type":"User","site_admin":false},"body":"Don't do this. In go, path and filepath are separate packages and the distinction is important in code. Instead replace all occurrences of `path` with `filepath`","created_at":"2017-03-06T16:46:50Z","updated_at":"2017-03-06T16:46:50Z","html_url":"https://github.com/performancecopilot/speed/pull/41#discussion_r104461903","pull_request_url":"https://api.github.com/repos/performancecopilot/speed/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/performancecopilot/speed/pulls/comments/104461903"},"html":{"href":"https://github.com/performancecopilot/speed/pull/41#discussion_r104461903"},"pull_request":{"href":"https://api.github.com/repos/performancecopilot/speed/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/performancecopilot/speed/pulls/41","id":109296710,"html_url":"https://github.com/performancecopilot/speed/pull/41","diff_url":"https://github.com/performancecopilot/speed/pull/41.diff","patch_url":"https://github.com/performancecopilot/speed/pull/41.patch","issue_url":"https://api.github.com/repos/performancecopilot/speed/issues/41","number":41,"state":"open","locked":false,"title":"Port Speed to Windows","user":{"login":"saurvs","id":12742708,"avatar_url":"https://avatars2.githubusercontent.com/u/12742708?v=3","gravatar_id":"","url":"https://api.github.com/users/saurvs","html_url":"https://github.com/saurvs","followers_url":"https://api.github.com/users/saurvs/followers","following_url":"https://api.github.com/users/saurvs/following{/other_user}","gists_url":"https://api.github.com/users/saurvs/gists{/gist_id}","starred_url":"https://api.github.com/users/saurvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saurvs/subscriptions","organizations_url":"https://api.github.com/users/saurvs/orgs","repos_url":"https://api.github.com/users/saurvs/repos","events_url":"https://api.github.com/users/saurvs/events{/privacy}","received_events_url":"https://api.github.com/users/saurvs/received_events","type":"User","site_admin":false},"body":"This makes Speed compile and pass all tests on Windows.\r\n\r\nThe following chances were made:\r\n\r\n- Use `mmap-go` instead of `syscall` in `memorymappedwriter.go`.\r\n- Import `path/filepath` instead of `path` in multiple files to make path-related functionality OS-independent.\r\n- And this is something I discovered while working on this. On Unix, you can call `remove` on a file that is still opened and have everything go smoothly; the file gets deleted when all it's handles are closed. But on Windows, trying to remove a file that's still open results in a `The process cannot access the file because it is being used by another process` error. Hence, file handles need to be closed at two places in the code.\r\n\r\nI also added the printing of an `err` message in a `t.Errorf` call which helped me while debugging the third issue.","created_at":"2017-03-06T16:33:44Z","updated_at":"2017-03-06T16:46:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"162e68ba651a3a806308634e1eeeb7401697bdb6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/performancecopilot/speed/pulls/41/commits","review_comments_url":"https://api.github.com/repos/performancecopilot/speed/pulls/41/comments","review_comment_url":"https://api.github.com/repos/performancecopilot/speed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/performancecopilot/speed/issues/41/comments","statuses_url":"https://api.github.com/repos/performancecopilot/speed/statuses/bad22e79569cea94816709c6b1c7ecfb02fe36d9","head":{"label":"saurvs:master","ref":"master","sha":"bad22e79569cea94816709c6b1c7ecfb02fe36d9","user":{"login":"saurvs","id":12742708,"avatar_url":"https://avatars2.githubusercontent.com/u/12742708?v=3","gravatar_id":"","url":"https://api.github.com/users/saurvs","html_url":"https://github.com/saurvs","followers_url":"https://api.github.com/users/saurvs/followers","following_url":"https://api.github.com/users/saurvs/following{/other_user}","gists_url":"https://api.github.com/users/saurvs/gists{/gist_id}","starred_url":"https://api.github.com/users/saurvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saurvs/subscriptions","organizations_url":"https://api.github.com/users/saurvs/orgs","repos_url":"https://api.github.com/users/saurvs/repos","events_url":"https://api.github.com/users/saurvs/events{/privacy}","received_events_url":"https://api.github.com/users/saurvs/received_events","type":"User","site_admin":false},"repo":{"id":81795469,"name":"speed","full_name":"saurvs/speed","owner":{"login":"saurvs","id":12742708,"avatar_url":"https://avatars2.githubusercontent.com/u/12742708?v=3","gravatar_id":"","url":"https://api.github.com/users/saurvs","html_url":"https://github.com/saurvs","followers_url":"https://api.github.com/users/saurvs/followers","following_url":"https://api.github.com/users/saurvs/following{/other_user}","gists_url":"https://api.github.com/users/saurvs/gists{/gist_id}","starred_url":"https://api.github.com/users/saurvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saurvs/subscriptions","organizations_url":"https://api.github.com/users/saurvs/orgs","repos_url":"https://api.github.com/users/saurvs/repos","events_url":"https://api.github.com/users/saurvs/events{/privacy}","received_events_url":"https://api.github.com/users/saurvs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/saurvs/speed","description":"A golang implementation of the PCP instrumentation API","fork":true,"url":"https://api.github.com/repos/saurvs/speed","forks_url":"https://api.github.com/repos/saurvs/speed/forks","keys_url":"https://api.github.com/repos/saurvs/speed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saurvs/speed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saurvs/speed/teams","hooks_url":"https://api.github.com/repos/saurvs/speed/hooks","issue_events_url":"https://api.github.com/repos/saurvs/speed/issues/events{/number}","events_url":"https://api.github.com/repos/saurvs/speed/events","assignees_url":"https://api.github.com/repos/saurvs/speed/assignees{/user}","branches_url":"https://api.github.com/repos/saurvs/speed/branches{/branch}","tags_url":"https://api.github.com/repos/saurvs/speed/tags","blobs_url":"https://api.github.com/repos/saurvs/speed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saurvs/speed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saurvs/speed/git/refs{/sha}","trees_url":"https://api.github.com/repos/saurvs/speed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saurvs/speed/statuses/{sha}","languages_url":"https://api.github.com/repos/saurvs/speed/languages","stargazers_url":"https://api.github.com/repos/saurvs/speed/stargazers","contributors_url":"https://api.github.com/repos/saurvs/speed/contributors","subscribers_url":"https://api.github.com/repos/saurvs/speed/subscribers","subscription_url":"https://api.github.com/repos/saurvs/speed/subscription","commits_url":"https://api.github.com/repos/saurvs/speed/commits{/sha}","git_commits_url":"https://api.github.com/repos/saurvs/speed/git/commits{/sha}","comments_url":"https://api.github.com/repos/saurvs/speed/comments{/number}","issue_comment_url":"https://api.github.com/repos/saurvs/speed/issues/comments{/number}","contents_url":"https://api.github.com/repos/saurvs/speed/contents/{+path}","compare_url":"https://api.github.com/repos/saurvs/speed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saurvs/speed/merges","archive_url":"https://api.github.com/repos/saurvs/speed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saurvs/speed/downloads","issues_url":"https://api.github.com/repos/saurvs/speed/issues{/number}","pulls_url":"https://api.github.com/repos/saurvs/speed/pulls{/number}","milestones_url":"https://api.github.com/repos/saurvs/speed/milestones{/number}","notifications_url":"https://api.github.com/repos/saurvs/speed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saurvs/speed/labels{/name}","releases_url":"https://api.github.com/repos/saurvs/speed/releases{/id}","deployments_url":"https://api.github.com/repos/saurvs/speed/deployments","created_at":"2017-02-13T07:08:11Z","updated_at":"2017-02-13T07:08:12Z","pushed_at":"2017-03-06T16:42:34Z","git_url":"git://github.com/saurvs/speed.git","ssh_url":"git@github.com:saurvs/speed.git","clone_url":"https://github.com/saurvs/speed.git","svn_url":"https://github.com/saurvs/speed","homepage":"","size":954,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"performancecopilot:master","ref":"master","sha":"91b42e56e578351f7aa848382c59efde30e4bf7a","user":{"login":"performancecopilot","id":8467970,"avatar_url":"https://avatars3.githubusercontent.com/u/8467970?v=3","gravatar_id":"","url":"https://api.github.com/users/performancecopilot","html_url":"https://github.com/performancecopilot","followers_url":"https://api.github.com/users/performancecopilot/followers","following_url":"https://api.github.com/users/performancecopilot/following{/other_user}","gists_url":"https://api.github.com/users/performancecopilot/gists{/gist_id}","starred_url":"https://api.github.com/users/performancecopilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/performancecopilot/subscriptions","organizations_url":"https://api.github.com/users/performancecopilot/orgs","repos_url":"https://api.github.com/users/performancecopilot/repos","events_url":"https://api.github.com/users/performancecopilot/events{/privacy}","received_events_url":"https://api.github.com/users/performancecopilot/received_events","type":"Organization","site_admin":false},"repo":{"id":61606887,"name":"speed","full_name":"performancecopilot/speed","owner":{"login":"performancecopilot","id":8467970,"avatar_url":"https://avatars3.githubusercontent.com/u/8467970?v=3","gravatar_id":"","url":"https://api.github.com/users/performancecopilot","html_url":"https://github.com/performancecopilot","followers_url":"https://api.github.com/users/performancecopilot/followers","following_url":"https://api.github.com/users/performancecopilot/following{/other_user}","gists_url":"https://api.github.com/users/performancecopilot/gists{/gist_id}","starred_url":"https://api.github.com/users/performancecopilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/performancecopilot/subscriptions","organizations_url":"https://api.github.com/users/performancecopilot/orgs","repos_url":"https://api.github.com/users/performancecopilot/repos","events_url":"https://api.github.com/users/performancecopilot/events{/privacy}","received_events_url":"https://api.github.com/users/performancecopilot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/performancecopilot/speed","description":"A golang implementation of the PCP instrumentation API","fork":false,"url":"https://api.github.com/repos/performancecopilot/speed","forks_url":"https://api.github.com/repos/performancecopilot/speed/forks","keys_url":"https://api.github.com/repos/performancecopilot/speed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/performancecopilot/speed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/performancecopilot/speed/teams","hooks_url":"https://api.github.com/repos/performancecopilot/speed/hooks","issue_events_url":"https://api.github.com/repos/performancecopilot/speed/issues/events{/number}","events_url":"https://api.github.com/repos/performancecopilot/speed/events","assignees_url":"https://api.github.com/repos/performancecopilot/speed/assignees{/user}","branches_url":"https://api.github.com/repos/performancecopilot/speed/branches{/branch}","tags_url":"https://api.github.com/repos/performancecopilot/speed/tags","blobs_url":"https://api.github.com/repos/performancecopilot/speed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/performancecopilot/speed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/performancecopilot/speed/git/refs{/sha}","trees_url":"https://api.github.com/repos/performancecopilot/speed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/performancecopilot/speed/statuses/{sha}","languages_url":"https://api.github.com/repos/performancecopilot/speed/languages","stargazers_url":"https://api.github.com/repos/performancecopilot/speed/stargazers","contributors_url":"https://api.github.com/repos/performancecopilot/speed/contributors","subscribers_url":"https://api.github.com/repos/performancecopilot/speed/subscribers","subscription_url":"https://api.github.com/repos/performancecopilot/speed/subscription","commits_url":"https://api.github.com/repos/performancecopilot/speed/commits{/sha}","git_commits_url":"https://api.github.com/repos/performancecopilot/speed/git/commits{/sha}","comments_url":"https://api.github.com/repos/performancecopilot/speed/comments{/number}","issue_comment_url":"https://api.github.com/repos/performancecopilot/speed/issues/comments{/number}","contents_url":"https://api.github.com/repos/performancecopilot/speed/contents/{+path}","compare_url":"https://api.github.com/repos/performancecopilot/speed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/performancecopilot/speed/merges","archive_url":"https://api.github.com/repos/performancecopilot/speed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/performancecopilot/speed/downloads","issues_url":"https://api.github.com/repos/performancecopilot/speed/issues{/number}","pulls_url":"https://api.github.com/repos/performancecopilot/speed/pulls{/number}","milestones_url":"https://api.github.com/repos/performancecopilot/speed/milestones{/number}","notifications_url":"https://api.github.com/repos/performancecopilot/speed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/performancecopilot/speed/labels{/name}","releases_url":"https://api.github.com/repos/performancecopilot/speed/releases{/id}","deployments_url":"https://api.github.com/repos/performancecopilot/speed/deployments","created_at":"2016-06-21T06:10:54Z","updated_at":"2017-03-01T21:42:46Z","pushed_at":"2017-03-06T16:42:35Z","git_url":"git://github.com/performancecopilot/speed.git","ssh_url":"git@github.com:performancecopilot/speed.git","clone_url":"https://github.com/performancecopilot/speed.git","svn_url":"https://github.com/performancecopilot/speed","homepage":"","size":951,"stargazers_count":18,"watchers_count":18,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":14,"forks":5,"open_issues":14,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/performancecopilot/speed/pulls/41"},"html":{"href":"https://github.com/performancecopilot/speed/pull/41"},"issue":{"href":"https://api.github.com/repos/performancecopilot/speed/issues/41"},"comments":{"href":"https://api.github.com/repos/performancecopilot/speed/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/performancecopilot/speed/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/performancecopilot/speed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/performancecopilot/speed/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/performancecopilot/speed/statuses/bad22e79569cea94816709c6b1c7ecfb02fe36d9"}}}}
{"actor":{"display_login":"suyash"}}