{"action":"created","comment":{"url":"https://api.github.com/repos/status-im/status-go/pulls/comments/205972199","pull_request_review_id":141345765,"id":205972199,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTk3MjE5OQ==","diff_hunk":"@@ -0,0 +1,101 @@\n+// +build library,!darwin","path":"signal/signals_library.go","position":1,"original_position":1,"commit_id":"6e173bc31da4fc12e9e6d4c8391f149f81e49bd2","original_commit_id":"6e173bc31da4fc12e9e6d4c8391f149f81e49bd2","user":{"login":"divan","id":880202,"node_id":"MDQ6VXNlcjg4MDIwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/880202?v=4","gravatar_id":"","url":"https://api.github.com/users/divan","html_url":"https://github.com/divan","followers_url":"https://api.github.com/users/divan/followers","following_url":"https://api.github.com/users/divan/following{/other_user}","gists_url":"https://api.github.com/users/divan/gists{/gist_id}","starred_url":"https://api.github.com/users/divan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divan/subscriptions","organizations_url":"https://api.github.com/users/divan/orgs","repos_url":"https://api.github.com/users/divan/repos","events_url":"https://api.github.com/users/divan/events{/privacy}","received_events_url":"https://api.github.com/users/divan/received_events","type":"User","site_admin":false},"body":"So `signals_library.go` is for both Desktop and Android builds.\r\n\r\nIt's interesting how only three dimensions of build options can create so much confusion :)","created_at":"2018-07-29T12:37:39Z","updated_at":"2018-07-29T12:37:39Z","html_url":"https://github.com/status-im/status-go/pull/1119#discussion_r205972199","pull_request_url":"https://api.github.com/repos/status-im/status-go/pulls/1119","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/status-im/status-go/pulls/comments/205972199"},"html":{"href":"https://github.com/status-im/status-go/pull/1119#discussion_r205972199"},"pull_request":{"href":"https://api.github.com/repos/status-im/status-go/pulls/1119"}},"in_reply_to_id":205941865},"pull_request":{"url":"https://api.github.com/repos/status-im/status-go/pulls/1119","id":204215598,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MjE1NTk4","html_url":"https://github.com/status-im/status-go/pull/1119","diff_url":"https://github.com/status-im/status-go/pull/1119.diff","patch_url":"https://github.com/status-im/status-go/pull/1119.patch","issue_url":"https://api.github.com/repos/status-im/status-go/issues/1119","number":1119,"state":"open","locked":false,"title":"Add build tags to signal package","user":{"login":"divan","id":880202,"node_id":"MDQ6VXNlcjg4MDIwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/880202?v=4","gravatar_id":"","url":"https://api.github.com/users/divan","html_url":"https://github.com/divan","followers_url":"https://api.github.com/users/divan/followers","following_url":"https://api.github.com/users/divan/following{/other_user}","gists_url":"https://api.github.com/users/divan/gists{/gist_id}","starred_url":"https://api.github.com/users/divan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divan/subscriptions","organizations_url":"https://api.github.com/users/divan/orgs","repos_url":"https://api.github.com/users/divan/repos","events_url":"https://api.github.com/users/divan/events{/privacy}","received_events_url":"https://api.github.com/users/divan/received_events","type":"User","site_admin":false},"body":"This PR introduces build tags (or build constraints) to the `signal` package. The code is this package differs for different platforms and build modes, namely:\r\n - iOS build as a library (require CGo)\r\n - Android build as a library  (require CGo)\r\n - Desktop build as a library  (require CGo)\r\n - normal build of statusd or running local tests (not requiring CGo)\r\n\r\nIt remove CGo dependency on signal package for `statusd` and tests. (Also, part of the memleak mitigation (\r\nhttps://github.com/status-im/status-go/issues/1067#issuecomment-407567649).\r\n\r\nAlso, it would be nice to have non-Cgo variant a default (easier with `go get`, tests, vendoring, etc.)\r\n\r\n - [x] a new build tag introduced - `library`. No need to use it manually, it's added to Makefile for commands `statusgo-library`, `statusgo-ios` and `statusgo-android`.\r\n - [x] Android and iOS specific C code moved to `signals_android.c` and `signals_darwin_arm.c` respectively\r\n - [x] Library/CGo-specific code moved to `signals_library.go` (and `signals_darwin.go` because of two iOS specific CGo imports that need to be in that Go file for CGo magic to work)\r\n - [x] non-library (default) signals implementation that doesn't link with CGo is moved to `signals.go`\r\n\r\nMore info on build tags: https://golang.org/pkg/go/build/#hdr-Build_Constraints and https://dave.cheney.net/2013/10/12/how-to-use-conditional-compilation-with-the-go-build-tool\r\n\r\nAs there is a build code changes involved and file layout changed, I would be pleasantly surprised if CI, tests and cross build with status-react and status-desktop will Go smoothly :)\r\n\r\nCloses #1115 \n\n<blockquote><div><strong><a href=\"https://golang.org/pkg/go/build/#hdr-Build_Constraints\">build - The Go Programming Language</a></strong></div></blockquote>\n<blockquote><div><strong><a href=\"https://dave.cheney.net/2013/10/12/how-to-use-conditional-compilation-with-the-go-build-tool\">How to use conditional compilation with the go build tool | Dave Cheney</a></strong></div></blockquote>","created_at":"2018-07-26T17:38:18Z","updated_at":"2018-07-29T12:37:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b79ea691afbba74005514981053ed0f6384f2cae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/status-im/status-go/pulls/1119/commits","review_comments_url":"https://api.github.com/repos/status-im/status-go/pulls/1119/comments","review_comment_url":"https://api.github.com/repos/status-im/status-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/status-im/status-go/issues/1119/comments","statuses_url":"https://api.github.com/repos/status-im/status-go/statuses/6e173bc31da4fc12e9e6d4c8391f149f81e49bd2","head":{"label":"status-im:signal_tags","ref":"signal_tags","sha":"6e173bc31da4fc12e9e6d4c8391f149f81e49bd2","user":{"login":"status-im","id":11767950,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzY3OTUw","avatar_url":"https://avatars1.githubusercontent.com/u/11767950?v=4","gravatar_id":"","url":"https://api.github.com/users/status-im","html_url":"https://github.com/status-im","followers_url":"https://api.github.com/users/status-im/followers","following_url":"https://api.github.com/users/status-im/following{/other_user}","gists_url":"https://api.github.com/users/status-im/gists{/gist_id}","starred_url":"https://api.github.com/users/status-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/status-im/subscriptions","organizations_url":"https://api.github.com/users/status-im/orgs","repos_url":"https://api.github.com/users/status-im/repos","events_url":"https://api.github.com/users/status-im/events{/privacy}","received_events_url":"https://api.github.com/users/status-im/received_events","type":"Organization","site_admin":false},"repo":{"id":61047867,"node_id":"MDEwOlJlcG9zaXRvcnk2MTA0Nzg2Nw==","name":"status-go","full_name":"status-im/status-go","owner":{"login":"status-im","id":11767950,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzY3OTUw","avatar_url":"https://avatars1.githubusercontent.com/u/11767950?v=4","gravatar_id":"","url":"https://api.github.com/users/status-im","html_url":"https://github.com/status-im","followers_url":"https://api.github.com/users/status-im/followers","following_url":"https://api.github.com/users/status-im/following{/other_user}","gists_url":"https://api.github.com/users/status-im/gists{/gist_id}","starred_url":"https://api.github.com/users/status-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/status-im/subscriptions","organizations_url":"https://api.github.com/users/status-im/orgs","repos_url":"https://api.github.com/users/status-im/repos","events_url":"https://api.github.com/users/status-im/events{/privacy}","received_events_url":"https://api.github.com/users/status-im/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/status-im/status-go","description":"The Status module that consumes go-ethereum","fork":false,"url":"https://api.github.com/repos/status-im/status-go","forks_url":"https://api.github.com/repos/status-im/status-go/forks","keys_url":"https://api.github.com/repos/status-im/status-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/status-im/status-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/status-im/status-go/teams","hooks_url":"https://api.github.com/repos/status-im/status-go/hooks","issue_events_url":"https://api.github.com/repos/status-im/status-go/issues/events{/number}","events_url":"https://api.github.com/repos/status-im/status-go/events","assignees_url":"https://api.github.com/repos/status-im/status-go/assignees{/user}","branches_url":"https://api.github.com/repos/status-im/status-go/branches{/branch}","tags_url":"https://api.github.com/repos/status-im/status-go/tags","blobs_url":"https://api.github.com/repos/status-im/status-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/status-im/status-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/status-im/status-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/status-im/status-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/status-im/status-go/statuses/{sha}","languages_url":"https://api.github.com/repos/status-im/status-go/languages","stargazers_url":"https://api.github.com/repos/status-im/status-go/stargazers","contributors_url":"https://api.github.com/repos/status-im/status-go/contributors","subscribers_url":"https://api.github.com/repos/status-im/status-go/subscribers","subscription_url":"https://api.github.com/repos/status-im/status-go/subscription","commits_url":"https://api.github.com/repos/status-im/status-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/status-im/status-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/status-im/status-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/status-im/status-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/status-im/status-go/contents/{+path}","compare_url":"https://api.github.com/repos/status-im/status-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/status-im/status-go/merges","archive_url":"https://api.github.com/repos/status-im/status-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/status-im/status-go/downloads","issues_url":"https://api.github.com/repos/status-im/status-go/issues{/number}","pulls_url":"https://api.github.com/repos/status-im/status-go/pulls{/number}","milestones_url":"https://api.github.com/repos/status-im/status-go/milestones{/number}","notifications_url":"https://api.github.com/repos/status-im/status-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/status-im/status-go/labels{/name}","releases_url":"https://api.github.com/repos/status-im/status-go/releases{/id}","deployments_url":"https://api.github.com/repos/status-im/status-go/deployments","created_at":"2016-06-13T15:32:03Z","updated_at":"2018-07-29T01:28:30Z","pushed_at":"2018-07-29T10:52:18Z","git_url":"git://github.com/status-im/status-go.git","ssh_url":"git@github.com:status-im/status-go.git","clone_url":"https://github.com/status-im/status-go.git","svn_url":"https://github.com/status-im/status-go","homepage":"https://status.im","size":40895,"stargazers_count":436,"watchers_count":436,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":133,"open_issues":67,"watchers":436,"default_branch":"develop"}},"base":{"label":"status-im:develop","ref":"develop","sha":"60249e46824492db503d29913f7d663f5a762724","user":{"login":"status-im","id":11767950,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzY3OTUw","avatar_url":"https://avatars1.githubusercontent.com/u/11767950?v=4","gravatar_id":"","url":"https://api.github.com/users/status-im","html_url":"https://github.com/status-im","followers_url":"https://api.github.com/users/status-im/followers","following_url":"https://api.github.com/users/status-im/following{/other_user}","gists_url":"https://api.github.com/users/status-im/gists{/gist_id}","starred_url":"https://api.github.com/users/status-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/status-im/subscriptions","organizations_url":"https://api.github.com/users/status-im/orgs","repos_url":"https://api.github.com/users/status-im/repos","events_url":"https://api.github.com/users/status-im/events{/privacy}","received_events_url":"https://api.github.com/users/status-im/received_events","type":"Organization","site_admin":false},"repo":{"id":61047867,"node_id":"MDEwOlJlcG9zaXRvcnk2MTA0Nzg2Nw==","name":"status-go","full_name":"status-im/status-go","owner":{"login":"status-im","id":11767950,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzY3OTUw","avatar_url":"https://avatars1.githubusercontent.com/u/11767950?v=4","gravatar_id":"","url":"https://api.github.com/users/status-im","html_url":"https://github.com/status-im","followers_url":"https://api.github.com/users/status-im/followers","following_url":"https://api.github.com/users/status-im/following{/other_user}","gists_url":"https://api.github.com/users/status-im/gists{/gist_id}","starred_url":"https://api.github.com/users/status-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/status-im/subscriptions","organizations_url":"https://api.github.com/users/status-im/orgs","repos_url":"https://api.github.com/users/status-im/repos","events_url":"https://api.github.com/users/status-im/events{/privacy}","received_events_url":"https://api.github.com/users/status-im/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/status-im/status-go","description":"The Status module that consumes go-ethereum","fork":false,"url":"https://api.github.com/repos/status-im/status-go","forks_url":"https://api.github.com/repos/status-im/status-go/forks","keys_url":"https://api.github.com/repos/status-im/status-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/status-im/status-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/status-im/status-go/teams","hooks_url":"https://api.github.com/repos/status-im/status-go/hooks","issue_events_url":"https://api.github.com/repos/status-im/status-go/issues/events{/number}","events_url":"https://api.github.com/repos/status-im/status-go/events","assignees_url":"https://api.github.com/repos/status-im/status-go/assignees{/user}","branches_url":"https://api.github.com/repos/status-im/status-go/branches{/branch}","tags_url":"https://api.github.com/repos/status-im/status-go/tags","blobs_url":"https://api.github.com/repos/status-im/status-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/status-im/status-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/status-im/status-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/status-im/status-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/status-im/status-go/statuses/{sha}","languages_url":"https://api.github.com/repos/status-im/status-go/languages","stargazers_url":"https://api.github.com/repos/status-im/status-go/stargazers","contributors_url":"https://api.github.com/repos/status-im/status-go/contributors","subscribers_url":"https://api.github.com/repos/status-im/status-go/subscribers","subscription_url":"https://api.github.com/repos/status-im/status-go/subscription","commits_url":"https://api.github.com/repos/status-im/status-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/status-im/status-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/status-im/status-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/status-im/status-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/status-im/status-go/contents/{+path}","compare_url":"https://api.github.com/repos/status-im/status-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/status-im/status-go/merges","archive_url":"https://api.github.com/repos/status-im/status-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/status-im/status-go/downloads","issues_url":"https://api.github.com/repos/status-im/status-go/issues{/number}","pulls_url":"https://api.github.com/repos/status-im/status-go/pulls{/number}","milestones_url":"https://api.github.com/repos/status-im/status-go/milestones{/number}","notifications_url":"https://api.github.com/repos/status-im/status-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/status-im/status-go/labels{/name}","releases_url":"https://api.github.com/repos/status-im/status-go/releases{/id}","deployments_url":"https://api.github.com/repos/status-im/status-go/deployments","created_at":"2016-06-13T15:32:03Z","updated_at":"2018-07-29T01:28:30Z","pushed_at":"2018-07-29T10:52:18Z","git_url":"git://github.com/status-im/status-go.git","ssh_url":"git@github.com:status-im/status-go.git","clone_url":"https://github.com/status-im/status-go.git","svn_url":"https://github.com/status-im/status-go","homepage":"https://status.im","size":40895,"stargazers_count":436,"watchers_count":436,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":133,"open_issues":67,"watchers":436,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/status-im/status-go/pulls/1119"},"html":{"href":"https://github.com/status-im/status-go/pull/1119"},"issue":{"href":"https://api.github.com/repos/status-im/status-go/issues/1119"},"comments":{"href":"https://api.github.com/repos/status-im/status-go/issues/1119/comments"},"review_comments":{"href":"https://api.github.com/repos/status-im/status-go/pulls/1119/comments"},"review_comment":{"href":"https://api.github.com/repos/status-im/status-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/status-im/status-go/pulls/1119/commits"},"statuses":{"href":"https://api.github.com/repos/status-im/status-go/statuses/6e173bc31da4fc12e9e6d4c8391f149f81e49bd2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"divan"}}