{"action":"created","issue":{"url":"https://api.github.com/repos/scala-js/scala-js-website/issues/278","repository_url":"https://api.github.com/repos/scala-js/scala-js-website","labels_url":"https://api.github.com/repos/scala-js/scala-js-website/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/scala-js/scala-js-website/issues/278/comments","events_url":"https://api.github.com/repos/scala-js/scala-js-website/issues/278/events","html_url":"https://github.com/scala-js/scala-js-website/pull/278","id":158330633,"number":278,"title":"Document impact of export annotations on dead code elimination","user":{"login":"OlivierBlanvillain","id":1085297,"avatar_url":"https://avatars.githubusercontent.com/u/1085297?v=3","gravatar_id":"","url":"https://api.github.com/users/OlivierBlanvillain","html_url":"https://github.com/OlivierBlanvillain","followers_url":"https://api.github.com/users/OlivierBlanvillain/followers","following_url":"https://api.github.com/users/OlivierBlanvillain/following{/other_user}","gists_url":"https://api.github.com/users/OlivierBlanvillain/gists{/gist_id}","starred_url":"https://api.github.com/users/OlivierBlanvillain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlivierBlanvillain/subscriptions","organizations_url":"https://api.github.com/users/OlivierBlanvillain/orgs","repos_url":"https://api.github.com/users/OlivierBlanvillain/repos","events_url":"https://api.github.com/users/OlivierBlanvillain/events{/privacy}","received_events_url":"https://api.github.com/users/OlivierBlanvillain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-03T09:49:01Z","updated_at":"2016-06-03T11:34:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scala-js/scala-js-website/pulls/278","html_url":"https://github.com/scala-js/scala-js-website/pull/278","diff_url":"https://github.com/scala-js/scala-js-website/pull/278.diff","patch_url":"https://github.com/scala-js/scala-js-website/pull/278.patch"},"body":"Hi @sjrd :). I'm not sure everything I wrote is accurate, but I feel that there is some documentation missing on this point."},"comment":{"url":"https://api.github.com/repos/scala-js/scala-js-website/issues/comments/223556534","html_url":"https://github.com/scala-js/scala-js-website/pull/278#issuecomment-223556534","issue_url":"https://api.github.com/repos/scala-js/scala-js-website/issues/278","id":223556534,"user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T11:34:13Z","updated_at":"2016-06-03T11:34:13Z","body":"> Export annotations are the entry point for dead code elimination.\r\n\r\nThis is true. But I'm not sure what the point of the rest of the paragraph is. Although technically correct, it is mostly misleading. Your library is going to require the Scala standard lib anyway, including `Option` or `List`, unless you're going to *great* lengths not to use anything from the Scala lib in your entire program (i.e., that never happens).\r\n\r\n> Library authors are also encouraged to limit their use export annotations to functions returning subtypes of `js.Any`, as doing otherwise will impact the size of binaries generated for all the library users.\r\n\r\nThat's not true. Export what you need. Whether the types are `js.Any` or not has little to do with the decisions one should make.\r\n\r\nBasically, the carefulness about exports is not so much about what *types* appear in the signatures you export. It's what method/class one exports that matters. Most general-purpose libraries should not export anything. But one should export a program's entry points to JavaScript code when that is required. Yes, that will cause everything reachable from there to be included in the binaries, but the types in the signatures are not the main issue."}}
{"actor":{"display_login":"sjrd"}}