{"action":"created","comment":{"url":"https://api.github.com/repos/dlang/dmd/pulls/comments/134288646","pull_request_review_id":57563440,"id":134288646,"diff_hunk":"@@ -371,7 +371,76 @@ private int tryMain(size_t argc, const(char)** argv)\n     updateRealEnvironment(&environment);\n     environment.reset(1); // don't need environment cache any more\n \n-    parseCommandLine(arguments, argc, global.params, files);\n+    if (parseCommandLine(arguments, argc, global.params, files))\n+    {\n+        Loc loc;\n+        errorSupplemental(loc, \"run 'dmd -man' to open browser on manual\");\n+        return EXIT_FAILURE;\n+    }\n+\n+    if (global.params.usage)\n+    {\n+        usage();\n+        return EXIT_SUCCESS;\n+    }\n+\n+    if (global.params.logo)\n+    {\n+        logo();\n+        return EXIT_SUCCESS;\n+    }\n+\n+    if (global.params.mcpuUsage)\n+    {\n+        printf(\"\n+CPU architectures supported by -mcpu=id:\n+  =?             list information on all architecture choices\n+  =baseline      use default architecture as determined by target\n+  =avx           use AVX 1 instructions\n+  =avx2          use AVX 2 instructions\n+  =native        use CPU architecture that this compiler is running on\n+\");\n+        return EXIT_SUCCESS;\n+    }\n+\n+    if (global.params.transitionUsage)\n+    {\n+         printf(\"\n+Language changes listed by -transition=id:\n+  =all           list information on all language changes\n+  =checkimports  give deprecation messages about 10378 anomalies\n+  =complex,14488 list all usages of complex or imaginary types\n+  =field,3449    list all non-mutable fields which occupy an object instance\n+  =import,10378  revert to single phase name lookup\n+  =tls           list all variables going into thread local storage\n+\");\n+        return EXIT_SUCCESS;\n+    }\n+\n+    if (global.params.manual)\n+    {\n+        version (Windows)\n+        {\n+            browse(\"http://dlang.org/dmd-windows.html\");","path":"src/ddmd/mars.d","position":55,"original_position":55,"commit_id":"fb703d8948f49f8596e36d03f334d52060f97d36","original_commit_id":"fb703d8948f49f8596e36d03f334d52060f97d36","user":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars3.githubusercontent.com/u/4370550?v=4","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"body":"FYI: https://dlang.org/dmd.html redirects to the corresponding OS automatically, but there is no harm in being explicit here","created_at":"2017-08-21T17:32:47Z","updated_at":"2017-08-21T17:33:17Z","html_url":"https://github.com/dlang/dmd/pull/7088#discussion_r134288646","pull_request_url":"https://api.github.com/repos/dlang/dmd/pulls/7088","_links":{"self":{"href":"https://api.github.com/repos/dlang/dmd/pulls/comments/134288646"},"html":{"href":"https://github.com/dlang/dmd/pull/7088#discussion_r134288646"},"pull_request":{"href":"https://api.github.com/repos/dlang/dmd/pulls/7088"}}},"pull_request":{"url":"https://api.github.com/repos/dlang/dmd/pulls/7088","id":136628106,"html_url":"https://github.com/dlang/dmd/pull/7088","diff_url":"https://github.com/dlang/dmd/pull/7088.diff","patch_url":"https://github.com/dlang/dmd/pull/7088.patch","issue_url":"https://api.github.com/repos/dlang/dmd/issues/7088","number":7088,"state":"open","locked":false,"title":"refactor: better encapsulate parseCommandLine()","user":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars0.githubusercontent.com/u/568298?v=4","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"body":"This moves towards making `parseCommandLine()` into a more pure, encapsulated function by:\r\n\r\n1. pushing decisions about exiting the compiler up to the caller\r\n\r\n2. pushing some requested actions up to the caller\r\n\r\n3. detecting the existence of errors with return value rather than a global\r\n\r\nError messages are consolidated into a single nested function.\r\n\r\nError messages about command line are followed by a supplemental message about how to open a browser on the manual.\r\n\r\nThere are remaining problems with setting `debuglevel` and `versionlevel` via globals that should be addressed separately.","created_at":"2017-08-20T02:22:19Z","updated_at":"2017-08-21T17:33:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2fcec5b3294578fb3257b10a20d2be87aaa60ffd","assignee":null,"assignees":[],"requested_reviewers":[{"login":"MartinNowak","id":288976,"avatar_url":"https://avatars0.githubusercontent.com/u/288976?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinNowak","html_url":"https://github.com/MartinNowak","followers_url":"https://api.github.com/users/MartinNowak/followers","following_url":"https://api.github.com/users/MartinNowak/following{/other_user}","gists_url":"https://api.github.com/users/MartinNowak/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinNowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinNowak/subscriptions","organizations_url":"https://api.github.com/users/MartinNowak/orgs","repos_url":"https://api.github.com/users/MartinNowak/repos","events_url":"https://api.github.com/users/MartinNowak/events{/privacy}","received_events_url":"https://api.github.com/users/MartinNowak/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dlang/dmd/pulls/7088/commits","review_comments_url":"https://api.github.com/repos/dlang/dmd/pulls/7088/comments","review_comment_url":"https://api.github.com/repos/dlang/dmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dlang/dmd/issues/7088/comments","statuses_url":"https://api.github.com/repos/dlang/dmd/statuses/fb703d8948f49f8596e36d03f334d52060f97d36","head":{"label":"WalterBright:mars-encapsulate","ref":"mars-encapsulate","sha":"fb703d8948f49f8596e36d03f334d52060f97d36","user":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars0.githubusercontent.com/u/568298?v=4","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"repo":{"id":7849157,"name":"dmd","full_name":"WalterBright/dmd","owner":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars0.githubusercontent.com/u/568298?v=4","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WalterBright/dmd","description":"dmd D Programming Language compiler","fork":true,"url":"https://api.github.com/repos/WalterBright/dmd","forks_url":"https://api.github.com/repos/WalterBright/dmd/forks","keys_url":"https://api.github.com/repos/WalterBright/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WalterBright/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WalterBright/dmd/teams","hooks_url":"https://api.github.com/repos/WalterBright/dmd/hooks","issue_events_url":"https://api.github.com/repos/WalterBright/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/WalterBright/dmd/events","assignees_url":"https://api.github.com/repos/WalterBright/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/WalterBright/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/WalterBright/dmd/tags","blobs_url":"https://api.github.com/repos/WalterBright/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WalterBright/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WalterBright/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/WalterBright/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WalterBright/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/WalterBright/dmd/languages","stargazers_url":"https://api.github.com/repos/WalterBright/dmd/stargazers","contributors_url":"https://api.github.com/repos/WalterBright/dmd/contributors","subscribers_url":"https://api.github.com/repos/WalterBright/dmd/subscribers","subscription_url":"https://api.github.com/repos/WalterBright/dmd/subscription","commits_url":"https://api.github.com/repos/WalterBright/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/WalterBright/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/WalterBright/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/WalterBright/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/WalterBright/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/WalterBright/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WalterBright/dmd/merges","archive_url":"https://api.github.com/repos/WalterBright/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WalterBright/dmd/downloads","issues_url":"https://api.github.com/repos/WalterBright/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/WalterBright/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/WalterBright/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/WalterBright/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WalterBright/dmd/labels{/name}","releases_url":"https://api.github.com/repos/WalterBright/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/WalterBright/dmd/deployments","created_at":"2013-01-27T06:45:40Z","updated_at":"2015-08-23T08:04:14Z","pushed_at":"2017-08-20T02:57:29Z","git_url":"git://github.com/WalterBright/dmd.git","ssh_url":"git@github.com:WalterBright/dmd.git","clone_url":"https://github.com/WalterBright/dmd.git","svn_url":"https://github.com/WalterBright/dmd","homepage":"d-programming-language.org","size":72847,"stargazers_count":0,"watchers_count":0,"language":"D","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dlang:master","ref":"master","sha":"5e0e3234df64b0c7c4815f54e500cf391ed77cd8","user":{"login":"dlang","id":565913,"avatar_url":"https://avatars3.githubusercontent.com/u/565913?v=4","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"repo":{"id":1257070,"name":"dmd","full_name":"dlang/dmd","owner":{"login":"dlang","id":565913,"avatar_url":"https://avatars3.githubusercontent.com/u/565913?v=4","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dlang/dmd","description":"dmd D Programming Language compiler","fork":false,"url":"https://api.github.com/repos/dlang/dmd","forks_url":"https://api.github.com/repos/dlang/dmd/forks","keys_url":"https://api.github.com/repos/dlang/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlang/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlang/dmd/teams","hooks_url":"https://api.github.com/repos/dlang/dmd/hooks","issue_events_url":"https://api.github.com/repos/dlang/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/dlang/dmd/events","assignees_url":"https://api.github.com/repos/dlang/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/dlang/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/dlang/dmd/tags","blobs_url":"https://api.github.com/repos/dlang/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlang/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlang/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlang/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlang/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/dlang/dmd/languages","stargazers_url":"https://api.github.com/repos/dlang/dmd/stargazers","contributors_url":"https://api.github.com/repos/dlang/dmd/contributors","subscribers_url":"https://api.github.com/repos/dlang/dmd/subscribers","subscription_url":"https://api.github.com/repos/dlang/dmd/subscription","commits_url":"https://api.github.com/repos/dlang/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlang/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlang/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlang/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlang/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/dlang/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlang/dmd/merges","archive_url":"https://api.github.com/repos/dlang/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlang/dmd/downloads","issues_url":"https://api.github.com/repos/dlang/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/dlang/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/dlang/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/dlang/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlang/dmd/labels{/name}","releases_url":"https://api.github.com/repos/dlang/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/dlang/dmd/deployments","created_at":"2011-01-15T06:53:53Z","updated_at":"2017-08-20T01:17:13Z","pushed_at":"2017-08-21T13:13:43Z","git_url":"git://github.com/dlang/dmd.git","ssh_url":"git@github.com:dlang/dmd.git","clone_url":"https://github.com/dlang/dmd.git","svn_url":"https://github.com/dlang/dmd","homepage":"dlang.org","size":75631,"stargazers_count":1644,"watchers_count":1644,"language":"D","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":425,"mirror_url":null,"open_issues_count":183,"forks":425,"open_issues":183,"watchers":1644,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dlang/dmd/pulls/7088"},"html":{"href":"https://github.com/dlang/dmd/pull/7088"},"issue":{"href":"https://api.github.com/repos/dlang/dmd/issues/7088"},"comments":{"href":"https://api.github.com/repos/dlang/dmd/issues/7088/comments"},"review_comments":{"href":"https://api.github.com/repos/dlang/dmd/pulls/7088/comments"},"review_comment":{"href":"https://api.github.com/repos/dlang/dmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dlang/dmd/pulls/7088/commits"},"statuses":{"href":"https://api.github.com/repos/dlang/dmd/statuses/fb703d8948f49f8596e36d03f334d52060f97d36"}}}}
{"actor":{"display_login":"wilzbach"}}