{"action":"created","comment":{"url":"https://api.github.com/repos/atom/xray/pulls/comments/172880319","pull_request_review_id":101973201,"id":172880319,"diff_hunk":"@@ -24,12 +24,30 @@ const moduleName = path.basename(process.cwd());\n process.env.NODE_INCLUDE_PATH = nodeIncludePath\n process.env.NODE_MAJOR_VERSION = nodeMajorVersion\n \n+const platform = os.platform()\n+var libExt = ''\n+\n+switch(platform) {\n+\tcase 'darwin':\n+\t\tlibExt = '.dylib'\n+\t\tbreak;\n+\tcase 'win32':\n+\t\tlibExt = '.dll'\n+\t\tbreak;\n+\tcase 'linux':\n+\t\tlibExt = '.so'\n+\t\tbreak;\n+\tdefault:\n+\t\tconsole.error('Operating system not currently supported or recognized by the build script')\n+\t\tprocess.exit(1)\n+}\n+\n switch (subcommand) {\n   case 'build':\n     const releaseFlag = argv.release ? '--release' : ''\n     const targetDir = argv.release ? 'release' : 'debug'\n-    cp.execSync(`cargo rustc ${releaseFlag} -- -Clink-args=\\\"-undefined dynamic_lookup -export_dynamic\\\"`, {stdio: 'inherit'})\n-    cp.execSync(`cp target/${targetDir}/{lib${moduleName}.dylib,${moduleName}.node}`, {stdio: 'inherit'})\n+    cp.execSync(`cargo rustc ${releaseFlag} -- -Clink-args=\\\"-undefined=dynamic_lookup -export_dynamic\\\"`, {stdio: 'inherit'})","path":"napi/scripts/napi.js","position":37,"original_position":37,"commit_id":"4a3c538a740edf97eb1e070e17187544a1c43cc4","original_commit_id":"4a3c538a740edf97eb1e070e17187544a1c43cc4","user":{"login":"apcragg","id":6251047,"avatar_url":"https://avatars2.githubusercontent.com/u/6251047?v=4","gravatar_id":"","url":"https://api.github.com/users/apcragg","html_url":"https://github.com/apcragg","followers_url":"https://api.github.com/users/apcragg/followers","following_url":"https://api.github.com/users/apcragg/following{/other_user}","gists_url":"https://api.github.com/users/apcragg/gists{/gist_id}","starred_url":"https://api.github.com/users/apcragg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcragg/subscriptions","organizations_url":"https://api.github.com/users/apcragg/orgs","repos_url":"https://api.github.com/users/apcragg/repos","events_url":"https://api.github.com/users/apcragg/events{/privacy}","received_events_url":"https://api.github.com/users/apcragg/received_events","type":"User","site_admin":false},"body":"Does it work for you with `-undefined,dynamic_lookup` as that also works with Linux.","created_at":"2018-03-07T15:31:21Z","updated_at":"2018-03-07T15:31:21Z","html_url":"https://github.com/atom/xray/pull/25#discussion_r172880319","pull_request_url":"https://api.github.com/repos/atom/xray/pulls/25","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/atom/xray/pulls/comments/172880319"},"html":{"href":"https://github.com/atom/xray/pull/25#discussion_r172880319"},"pull_request":{"href":"https://api.github.com/repos/atom/xray/pulls/25"}},"in_reply_to_id":172876437},"pull_request":{"url":"https://api.github.com/repos/atom/xray/pulls/25","id":173331818,"html_url":"https://github.com/atom/xray/pull/25","diff_url":"https://github.com/atom/xray/pull/25.diff","patch_url":"https://github.com/atom/xray/pull/25.patch","issue_url":"https://api.github.com/repos/atom/xray/issues/25","number":25,"state":"open","locked":false,"title":"Linux Build Compatibility ","user":{"login":"apcragg","id":6251047,"avatar_url":"https://avatars2.githubusercontent.com/u/6251047?v=4","gravatar_id":"","url":"https://api.github.com/users/apcragg","html_url":"https://github.com/apcragg","followers_url":"https://api.github.com/users/apcragg/followers","following_url":"https://api.github.com/users/apcragg/following{/other_user}","gists_url":"https://api.github.com/users/apcragg/gists{/gist_id}","starred_url":"https://api.github.com/users/apcragg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcragg/subscriptions","organizations_url":"https://api.github.com/users/apcragg/orgs","repos_url":"https://api.github.com/users/apcragg/repos","events_url":"https://api.github.com/users/apcragg/events{/privacy}","received_events_url":"https://api.github.com/users/apcragg/received_events","type":"User","site_admin":false},"body":"I changed the `napi` build script to work on Linux platforms in addition to MacOS. I am using the built-in Node.js `os` module to detect the user's system type in order to copy the correct dynamic library file. I also included `<string.h>` as I was having issues with `memcpy` not working on Ubuntu 16.04 LTS.\r\n\r\nThis address comments in #15 ","created_at":"2018-03-07T01:48:48Z","updated_at":"2018-03-07T15:31:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7414a78d383567328a5eae377c99c5cf657df62a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/atom/xray/pulls/25/commits","review_comments_url":"https://api.github.com/repos/atom/xray/pulls/25/comments","review_comment_url":"https://api.github.com/repos/atom/xray/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/xray/issues/25/comments","statuses_url":"https://api.github.com/repos/atom/xray/statuses/4a3c538a740edf97eb1e070e17187544a1c43cc4","head":{"label":"apcragg:master","ref":"master","sha":"4a3c538a740edf97eb1e070e17187544a1c43cc4","user":{"login":"apcragg","id":6251047,"avatar_url":"https://avatars2.githubusercontent.com/u/6251047?v=4","gravatar_id":"","url":"https://api.github.com/users/apcragg","html_url":"https://github.com/apcragg","followers_url":"https://api.github.com/users/apcragg/followers","following_url":"https://api.github.com/users/apcragg/following{/other_user}","gists_url":"https://api.github.com/users/apcragg/gists{/gist_id}","starred_url":"https://api.github.com/users/apcragg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcragg/subscriptions","organizations_url":"https://api.github.com/users/apcragg/orgs","repos_url":"https://api.github.com/users/apcragg/repos","events_url":"https://api.github.com/users/apcragg/events{/privacy}","received_events_url":"https://api.github.com/users/apcragg/received_events","type":"User","site_admin":false},"repo":{"id":124139852,"name":"xray","full_name":"apcragg/xray","owner":{"login":"apcragg","id":6251047,"avatar_url":"https://avatars2.githubusercontent.com/u/6251047?v=4","gravatar_id":"","url":"https://api.github.com/users/apcragg","html_url":"https://github.com/apcragg","followers_url":"https://api.github.com/users/apcragg/followers","following_url":"https://api.github.com/users/apcragg/following{/other_user}","gists_url":"https://api.github.com/users/apcragg/gists{/gist_id}","starred_url":"https://api.github.com/users/apcragg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcragg/subscriptions","organizations_url":"https://api.github.com/users/apcragg/orgs","repos_url":"https://api.github.com/users/apcragg/repos","events_url":"https://api.github.com/users/apcragg/events{/privacy}","received_events_url":"https://api.github.com/users/apcragg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/apcragg/xray","description":"An experimental next-generation Electron-based text editor","fork":true,"url":"https://api.github.com/repos/apcragg/xray","forks_url":"https://api.github.com/repos/apcragg/xray/forks","keys_url":"https://api.github.com/repos/apcragg/xray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apcragg/xray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apcragg/xray/teams","hooks_url":"https://api.github.com/repos/apcragg/xray/hooks","issue_events_url":"https://api.github.com/repos/apcragg/xray/issues/events{/number}","events_url":"https://api.github.com/repos/apcragg/xray/events","assignees_url":"https://api.github.com/repos/apcragg/xray/assignees{/user}","branches_url":"https://api.github.com/repos/apcragg/xray/branches{/branch}","tags_url":"https://api.github.com/repos/apcragg/xray/tags","blobs_url":"https://api.github.com/repos/apcragg/xray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apcragg/xray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apcragg/xray/git/refs{/sha}","trees_url":"https://api.github.com/repos/apcragg/xray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apcragg/xray/statuses/{sha}","languages_url":"https://api.github.com/repos/apcragg/xray/languages","stargazers_url":"https://api.github.com/repos/apcragg/xray/stargazers","contributors_url":"https://api.github.com/repos/apcragg/xray/contributors","subscribers_url":"https://api.github.com/repos/apcragg/xray/subscribers","subscription_url":"https://api.github.com/repos/apcragg/xray/subscription","commits_url":"https://api.github.com/repos/apcragg/xray/commits{/sha}","git_commits_url":"https://api.github.com/repos/apcragg/xray/git/commits{/sha}","comments_url":"https://api.github.com/repos/apcragg/xray/comments{/number}","issue_comment_url":"https://api.github.com/repos/apcragg/xray/issues/comments{/number}","contents_url":"https://api.github.com/repos/apcragg/xray/contents/{+path}","compare_url":"https://api.github.com/repos/apcragg/xray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apcragg/xray/merges","archive_url":"https://api.github.com/repos/apcragg/xray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apcragg/xray/downloads","issues_url":"https://api.github.com/repos/apcragg/xray/issues{/number}","pulls_url":"https://api.github.com/repos/apcragg/xray/pulls{/number}","milestones_url":"https://api.github.com/repos/apcragg/xray/milestones{/number}","notifications_url":"https://api.github.com/repos/apcragg/xray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apcragg/xray/labels{/name}","releases_url":"https://api.github.com/repos/apcragg/xray/releases{/id}","deployments_url":"https://api.github.com/repos/apcragg/xray/deployments","created_at":"2018-03-06T21:18:06Z","updated_at":"2018-03-06T21:18:08Z","pushed_at":"2018-03-07T14:42:14Z","git_url":"git://github.com/apcragg/xray.git","ssh_url":"git@github.com:apcragg/xray.git","clone_url":"https://github.com/apcragg/xray.git","svn_url":"https://github.com/apcragg/xray","homepage":"","size":415,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"d653d13872363004f6d691059015cfaf6aa45c62","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars2.githubusercontent.com/u/1089146?v=4","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":113402414,"name":"xray","full_name":"atom/xray","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars2.githubusercontent.com/u/1089146?v=4","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/xray","description":"An experimental next-generation Electron-based text editor","fork":false,"url":"https://api.github.com/repos/atom/xray","forks_url":"https://api.github.com/repos/atom/xray/forks","keys_url":"https://api.github.com/repos/atom/xray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/xray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/xray/teams","hooks_url":"https://api.github.com/repos/atom/xray/hooks","issue_events_url":"https://api.github.com/repos/atom/xray/issues/events{/number}","events_url":"https://api.github.com/repos/atom/xray/events","assignees_url":"https://api.github.com/repos/atom/xray/assignees{/user}","branches_url":"https://api.github.com/repos/atom/xray/branches{/branch}","tags_url":"https://api.github.com/repos/atom/xray/tags","blobs_url":"https://api.github.com/repos/atom/xray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/xray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/xray/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/xray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/xray/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/xray/languages","stargazers_url":"https://api.github.com/repos/atom/xray/stargazers","contributors_url":"https://api.github.com/repos/atom/xray/contributors","subscribers_url":"https://api.github.com/repos/atom/xray/subscribers","subscription_url":"https://api.github.com/repos/atom/xray/subscription","commits_url":"https://api.github.com/repos/atom/xray/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/xray/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/xray/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/xray/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/xray/contents/{+path}","compare_url":"https://api.github.com/repos/atom/xray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/xray/merges","archive_url":"https://api.github.com/repos/atom/xray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/xray/downloads","issues_url":"https://api.github.com/repos/atom/xray/issues{/number}","pulls_url":"https://api.github.com/repos/atom/xray/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/xray/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/xray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/xray/labels{/name}","releases_url":"https://api.github.com/repos/atom/xray/releases{/id}","deployments_url":"https://api.github.com/repos/atom/xray/deployments","created_at":"2017-12-07T04:23:04Z","updated_at":"2018-03-07T15:29:43Z","pushed_at":"2018-03-07T15:23:13Z","git_url":"git://github.com/atom/xray.git","ssh_url":"git@github.com:atom/xray.git","clone_url":"https://github.com/atom/xray.git","svn_url":"https://github.com/atom/xray","homepage":"","size":416,"stargazers_count":3524,"watchers_count":3524,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":48,"open_issues":11,"watchers":3524,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/xray/pulls/25"},"html":{"href":"https://github.com/atom/xray/pull/25"},"issue":{"href":"https://api.github.com/repos/atom/xray/issues/25"},"comments":{"href":"https://api.github.com/repos/atom/xray/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/xray/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/xray/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/xray/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/atom/xray/statuses/4a3c538a740edf97eb1e070e17187544a1c43cc4"}},"author_association":"NONE"}}
{"actor":{"display_login":"apcragg"}}