{"action":"created","comment":{"url":"https://api.github.com/repos/dart-lang/pub/pulls/comments/108777803","pull_request_review_id":29609418,"id":108777803,"diff_hunk":"@@ -44,6 +57,11 @@ abstract class BarbackCommand extends PubCommand {\n         help: \"Use all default source directories.\",\n         defaultsTo: false,\n         negatable: false);\n+\n+    argParser.addOption(\"compiler\",\n+        allowed: const ['dartdevc', 'dart2js', 'none'],\n+        defaultsTo: 'dart2js',\n+        help: 'The js compiler to use to build the app.');","path":"lib/src/command/barback.dart","position":42,"original_position":42,"commit_id":"9facf83f1c905a15fad2f4d9205d8869f161a58c","original_commit_id":"9facf83f1c905a15fad2f4d9205d8869f161a58c","user":{"login":"munificent","id":46275,"avatar_url":"https://avatars3.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/received_events","type":"User","site_admin":false},"body":"Nit: \"js\" -> \"JavaScript\".","created_at":"2017-03-29T20:24:27Z","updated_at":"2017-03-29T20:28:42Z","html_url":"https://github.com/dart-lang/pub/pull/1541#discussion_r108777803","pull_request_url":"https://api.github.com/repos/dart-lang/pub/pulls/1541","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/pub/pulls/comments/108777803"},"html":{"href":"https://github.com/dart-lang/pub/pull/1541#discussion_r108777803"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/pub/pulls/1541"}}},"pull_request":{"url":"https://api.github.com/repos/dart-lang/pub/pulls/1541","id":112345282,"html_url":"https://github.com/dart-lang/pub/pull/1541","diff_url":"https://github.com/dart-lang/pub/pull/1541.diff","patch_url":"https://github.com/dart-lang/pub/pull/1541.patch","issue_url":"https://api.github.com/repos/dart-lang/pub/issues/1541","number":1541,"state":"open","locked":false,"title":"Add --compiler=dartdevc|dart2js|none flag to pub serve/build.","user":{"login":"jakemac53","id":984921,"avatar_url":"https://avatars0.githubusercontent.com/u/984921?v=3","gravatar_id":"","url":"https://api.github.com/users/jakemac53","html_url":"https://github.com/jakemac53","followers_url":"https://api.github.com/users/jakemac53/followers","following_url":"https://api.github.com/users/jakemac53/following{/other_user}","gists_url":"https://api.github.com/users/jakemac53/gists{/gist_id}","starred_url":"https://api.github.com/users/jakemac53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakemac53/subscriptions","organizations_url":"https://api.github.com/users/jakemac53/orgs","repos_url":"https://api.github.com/users/jakemac53/repos","events_url":"https://api.github.com/users/jakemac53/events{/privacy}","received_events_url":"https://api.github.com/users/jakemac53/received_events","type":"User","site_admin":false},"body":"This is somewhat of a WIP, but it does enable the basic functionality (this is why I am merging into a separate branch though). I will follow up with some more tests and also the configuration required to pass the remaining tests. \r\n\r\nMostly I wanted to get this in your hands so you can take a look at the general strategy I am using and provide some early feedback.\r\n\r\nAt a high level this does a few things:\r\n\r\n1. Adds a notion of `transitiveBuiltInTransformers` that are added to all packages.\r\n\r\n    - There is one of these, the `DevCompilerPackageModuleTransformer`. This runs on each package's `lib` folder and creates a single module containing all the Dart files in that package.\r\n    - Note that I also had to effectively disable the notion of static packages, since any package may have a transformer added via `transitiveBuiltInTransformers`. I have not measured the effects of this in a meaningful way (part of why I am just pushing this to a branch).\r\n    - I also had to change `getBuiltInTransformers` to return multiple phases of transformers. The transitive transformers are added in the first phase, and then the regular built in ones in the next phase.\r\n\r\n2. Adds several new `builtInTransformers` that only apply to the root package:\r\n\r\n    - DevCompilerHtmlTransformer: Rewrites your html files to use require.js and load the proper entry point module.\r\n    - DevCompilerResourceTransformer: Copies the dart_sdk.js script from your sdk into each non-lib directory that contains a dart file, and does the same with the require.js script if available.\r\n    - DevCompilerEntryPointModuleTransformer: For each dart file outside of lib, this creates a module for that file and all its relative imports (`*.module.js`), as well as a bootstrap script that loads that module and calls its main (`*.js`).  \r\n\r\n3. Added `CompilerMode` enum and replaced all usages of `enableDart2JS` or similar parameters to use this. This is generally set by the `--compiler=X` flag.","created_at":"2017-03-23T21:45:30Z","updated_at":"2017-03-29T20:28:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b4f5ae0f27c04d40dfbb03d333227d499346a62","assignee":{"login":"munificent","id":46275,"avatar_url":"https://avatars3.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/received_events","type":"User","site_admin":false},"assignees":[{"login":"munificent","id":46275,"avatar_url":"https://avatars3.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dart-lang/pub/pulls/1541/commits","review_comments_url":"https://api.github.com/repos/dart-lang/pub/pulls/1541/comments","review_comment_url":"https://api.github.com/repos/dart-lang/pub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/1541/comments","statuses_url":"https://api.github.com/repos/dart-lang/pub/statuses/9facf83f1c905a15fad2f4d9205d8869f161a58c","head":{"label":"jakemac53:ddc","ref":"ddc","sha":"9facf83f1c905a15fad2f4d9205d8869f161a58c","user":{"login":"jakemac53","id":984921,"avatar_url":"https://avatars0.githubusercontent.com/u/984921?v=3","gravatar_id":"","url":"https://api.github.com/users/jakemac53","html_url":"https://github.com/jakemac53","followers_url":"https://api.github.com/users/jakemac53/followers","following_url":"https://api.github.com/users/jakemac53/following{/other_user}","gists_url":"https://api.github.com/users/jakemac53/gists{/gist_id}","starred_url":"https://api.github.com/users/jakemac53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakemac53/subscriptions","organizations_url":"https://api.github.com/users/jakemac53/orgs","repos_url":"https://api.github.com/users/jakemac53/repos","events_url":"https://api.github.com/users/jakemac53/events{/privacy}","received_events_url":"https://api.github.com/users/jakemac53/received_events","type":"User","site_admin":false},"repo":{"id":85633628,"name":"pub","full_name":"jakemac53/pub","owner":{"login":"jakemac53","id":984921,"avatar_url":"https://avatars0.githubusercontent.com/u/984921?v=3","gravatar_id":"","url":"https://api.github.com/users/jakemac53","html_url":"https://github.com/jakemac53","followers_url":"https://api.github.com/users/jakemac53/followers","following_url":"https://api.github.com/users/jakemac53/following{/other_user}","gists_url":"https://api.github.com/users/jakemac53/gists{/gist_id}","starred_url":"https://api.github.com/users/jakemac53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakemac53/subscriptions","organizations_url":"https://api.github.com/users/jakemac53/orgs","repos_url":"https://api.github.com/users/jakemac53/repos","events_url":"https://api.github.com/users/jakemac53/events{/privacy}","received_events_url":"https://api.github.com/users/jakemac53/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakemac53/pub","description":"The package manager for Dart","fork":true,"url":"https://api.github.com/repos/jakemac53/pub","forks_url":"https://api.github.com/repos/jakemac53/pub/forks","keys_url":"https://api.github.com/repos/jakemac53/pub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakemac53/pub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakemac53/pub/teams","hooks_url":"https://api.github.com/repos/jakemac53/pub/hooks","issue_events_url":"https://api.github.com/repos/jakemac53/pub/issues/events{/number}","events_url":"https://api.github.com/repos/jakemac53/pub/events","assignees_url":"https://api.github.com/repos/jakemac53/pub/assignees{/user}","branches_url":"https://api.github.com/repos/jakemac53/pub/branches{/branch}","tags_url":"https://api.github.com/repos/jakemac53/pub/tags","blobs_url":"https://api.github.com/repos/jakemac53/pub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakemac53/pub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakemac53/pub/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakemac53/pub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakemac53/pub/statuses/{sha}","languages_url":"https://api.github.com/repos/jakemac53/pub/languages","stargazers_url":"https://api.github.com/repos/jakemac53/pub/stargazers","contributors_url":"https://api.github.com/repos/jakemac53/pub/contributors","subscribers_url":"https://api.github.com/repos/jakemac53/pub/subscribers","subscription_url":"https://api.github.com/repos/jakemac53/pub/subscription","commits_url":"https://api.github.com/repos/jakemac53/pub/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakemac53/pub/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakemac53/pub/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakemac53/pub/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakemac53/pub/contents/{+path}","compare_url":"https://api.github.com/repos/jakemac53/pub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakemac53/pub/merges","archive_url":"https://api.github.com/repos/jakemac53/pub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakemac53/pub/downloads","issues_url":"https://api.github.com/repos/jakemac53/pub/issues{/number}","pulls_url":"https://api.github.com/repos/jakemac53/pub/pulls{/number}","milestones_url":"https://api.github.com/repos/jakemac53/pub/milestones{/number}","notifications_url":"https://api.github.com/repos/jakemac53/pub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakemac53/pub/labels{/name}","releases_url":"https://api.github.com/repos/jakemac53/pub/releases{/id}","deployments_url":"https://api.github.com/repos/jakemac53/pub/deployments","created_at":"2017-03-20T22:29:46Z","updated_at":"2017-03-20T22:29:48Z","pushed_at":"2017-03-28T19:14:29Z","git_url":"git://github.com/jakemac53/pub.git","ssh_url":"git@github.com:jakemac53/pub.git","clone_url":"https://github.com/jakemac53/pub.git","svn_url":"https://github.com/jakemac53/pub","homepage":"https://pub.dartlang.org","size":4835,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_projects":true,"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":"dart-lang:ddc-transformer","ref":"ddc-transformer","sha":"1218853e57594c2117b8acaf6a65a43f8698d8c7","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars3.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":35700184,"name":"pub","full_name":"dart-lang/pub","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars3.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/pub","description":"The package manager for Dart","fork":false,"url":"https://api.github.com/repos/dart-lang/pub","forks_url":"https://api.github.com/repos/dart-lang/pub/forks","keys_url":"https://api.github.com/repos/dart-lang/pub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/pub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/pub/teams","hooks_url":"https://api.github.com/repos/dart-lang/pub/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/pub/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/pub/events","assignees_url":"https://api.github.com/repos/dart-lang/pub/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/pub/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/pub/tags","blobs_url":"https://api.github.com/repos/dart-lang/pub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/pub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/pub/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/pub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/pub/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/pub/languages","stargazers_url":"https://api.github.com/repos/dart-lang/pub/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/pub/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/pub/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/pub/subscription","commits_url":"https://api.github.com/repos/dart-lang/pub/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/pub/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/pub/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/pub/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/pub/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/pub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/pub/merges","archive_url":"https://api.github.com/repos/dart-lang/pub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/pub/downloads","issues_url":"https://api.github.com/repos/dart-lang/pub/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/pub/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/pub/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/pub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/pub/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/pub/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/pub/deployments","created_at":"2015-05-15T22:36:26Z","updated_at":"2017-03-20T17:52:42Z","pushed_at":"2017-03-28T19:55:34Z","git_url":"git://github.com/dart-lang/pub.git","ssh_url":"git@github.com:dart-lang/pub.git","clone_url":"https://github.com/dart-lang/pub.git","svn_url":"https://github.com/dart-lang/pub","homepage":"https://pub.dartlang.org","size":4780,"stargazers_count":37,"watchers_count":37,"language":"Dart","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":117,"forks":26,"open_issues":117,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dart-lang/pub/pulls/1541"},"html":{"href":"https://github.com/dart-lang/pub/pull/1541"},"issue":{"href":"https://api.github.com/repos/dart-lang/pub/issues/1541"},"comments":{"href":"https://api.github.com/repos/dart-lang/pub/issues/1541/comments"},"review_comments":{"href":"https://api.github.com/repos/dart-lang/pub/pulls/1541/comments"},"review_comment":{"href":"https://api.github.com/repos/dart-lang/pub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dart-lang/pub/pulls/1541/commits"},"statuses":{"href":"https://api.github.com/repos/dart-lang/pub/statuses/9facf83f1c905a15fad2f4d9205d8869f161a58c"}}}}
{"actor":{"display_login":"munificent"}}