{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/1124","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/1124/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/1124/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/1124/events","html_url":"https://github.com/dart-lang/pub/issues/1124","id":85646074,"number":1124,"title":"support omitting lazy transformers in pub build","user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/pub/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/Pub-Build","name":"Pub-Build","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-05T22:22:32Z","updated_at":"2015-06-05T22:22:32Z","closed_at":null,"body":"<a href=\"https://github.com/sigmundch\"><img src=\"https://avatars.githubusercontent.com/u/2049220?v=3\" align=\"left\" width=\"96\" height=\"96\"hspace=\"10\"></img></a> **Issue by [sigmundch](https://github.com/sigmundch)**\n_Originally opened as dart-lang/sdk#20887_\n\n----\n\npub-build runs all transformers eagerly (even if they are lazy transformers), while pub-serve runs only non-lazy transformers first and then runs lazy transformers on demand.\n\nOmitting lazy transformers in pub-build could be a way to support tailoring the build if a user specifies that they care mainly about building one asset. For example, you could run this:\n\n&nbsp;&nbsp;pub build web/index.dart.js\n\nand only invoke dart2js on index.dart, but not on index2.dart (if there is one in the same package).\n\nNote that with this suggestion pub's logic will not be specific to dart2js, but generic for any lazy transformer."},"comment":{"url":"https://api.github.com/repos/dart-lang/pub/issues/comments/109460835","html_url":"https://github.com/dart-lang/pub/issues/1124#issuecomment-109460835","issue_url":"https://api.github.com/repos/dart-lang/pub/issues/1124","id":109460835,"user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T22:22:32Z","updated_at":"2015-06-05T22:22:32Z","body":"<a href=\"https://github.com/nex3\"><img src=\"https://avatars.githubusercontent.com/u/188?v=3\" align=\"left\" width=\"48\" height=\"48\"hspace=\"10\"></img></a> **Comment by [nex3](https://github.com/nex3)**\n\n----\n\nThat's not the behavior I'd expect from seeing that invocation; it looks like it will just generate \"build/web/index.dart.js\" and nothing else.\n\nAlso, this seems like a hijacking of the lazy transformer semantics to mean something different than what they otherwise mean. Making a transformer lazy indicates that it can be slow, not that its outputs are superfluous in any sense. If we're only including lazy assets that are explicitly touched by the build process, why are we including eager assets that aren't?\n\nFinally, this seems like the wrong granularity for saying \"only build a subset of my application\". There are plenty of cases where this will result in an unusable application due to asset dependencies that are invisible to barback."}}