{"action":"created","comment":{"url":"https://api.github.com/repos/scala/scala/pulls/comments/92484730","pull_request_review_id":13001403,"id":92484730,"diff_hunk":"@@ -413,6 +414,38 @@ class Global(var currentSettings: Settings, var reporter: Reporter)\n \n   import syntaxAnalyzer.{ UnitScanner, UnitParser, JavaUnitParser }\n \n+  private def resolveSettingImports(settingValue: String, settingName: String): List[Import] = {","path":"src/compiler/scala/tools/nsc/Global.scala","position":12,"original_position":12,"commit_id":"365be0b2948ddd19cb06175d6a1e24bc9d240102","original_commit_id":"365be0b2948ddd19cb06175d6a1e24bc9d240102","user":{"login":"andyscott","id":310363,"avatar_url":"https://avatars.githubusercontent.com/u/310363?v=3","gravatar_id":"","url":"https://api.github.com/users/andyscott","html_url":"https://github.com/andyscott","followers_url":"https://api.github.com/users/andyscott/followers","following_url":"https://api.github.com/users/andyscott/following{/other_user}","gists_url":"https://api.github.com/users/andyscott/gists{/gist_id}","starred_url":"https://api.github.com/users/andyscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyscott/subscriptions","organizations_url":"https://api.github.com/users/andyscott/orgs","repos_url":"https://api.github.com/users/andyscott/repos","events_url":"https://api.github.com/users/andyscott/events{/privacy}","received_events_url":"https://api.github.com/users/andyscott/received_events","type":"User","site_admin":false},"body":"Got it. I have to use a type projection `ScalaSettings#StringSetting` instead of `settings.StringSetting`, otherwise scalac laments about it not being a stable identifier.","created_at":"2016-12-14T20:42:54Z","updated_at":"2016-12-14T20:42:54Z","html_url":"https://github.com/scala/scala/pull/5350#discussion_r92484730","pull_request_url":"https://api.github.com/repos/scala/scala/pulls/5350","_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/comments/92484730"},"html":{"href":"https://github.com/scala/scala/pull/5350#discussion_r92484730"},"pull_request":{"href":"https://api.github.com/repos/scala/scala/pulls/5350"}}},"pull_request":{"url":"https://api.github.com/repos/scala/scala/pulls/5350","id":81905661,"html_url":"https://github.com/scala/scala/pull/5350","diff_url":"https://github.com/scala/scala/pull/5350.diff","patch_url":"https://github.com/scala/scala/pull/5350.patch","issue_url":"https://api.github.com/repos/scala/scala/issues/5350","number":5350,"state":"open","locked":false,"title":"Add flags -Ysysdef and -Ypredef to configure root imports [ci: last-only]","user":{"login":"andyscott","id":310363,"avatar_url":"https://avatars.githubusercontent.com/u/310363?v=3","gravatar_id":"","url":"https://api.github.com/users/andyscott","html_url":"https://github.com/andyscott","followers_url":"https://api.github.com/users/andyscott/followers","following_url":"https://api.github.com/users/andyscott/following{/other_user}","gists_url":"https://api.github.com/users/andyscott/gists{/gist_id}","starred_url":"https://api.github.com/users/andyscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyscott/subscriptions","organizations_url":"https://api.github.com/users/andyscott/orgs","repos_url":"https://api.github.com/users/andyscott/repos","events_url":"https://api.github.com/users/andyscott/events{/privacy}","received_events_url":"https://api.github.com/users/andyscott/received_events","type":"User","site_admin":false},"body":"This adds a `-Ysysdef` and `-Ypredef` flag to give you full control over global imports for Scala compilation units.\r\n\r\n_Background information:_\r\n\r\nBy default, scalac imports `java.lang._`, `scala._`, and `scala.Predef._` into the namespace of Scala compilation units.\r\n\r\nAs it stands, we have two existing flags that adjust the behavior of predefined imports.\r\n- `-Yno-imports` disables all of these.\r\n- `-Yno-predef` disables `scala.Predef._`.\r\n\r\nThere are a few other nuances to the behavior of imports. The most important behavior is that `scala.Predef._` is unimported/evicted if there are any direct leading imports for anything within `scala.Predef`. For example, an import to `scala.Predef.DummyImplicit` will cause everything else normally imported by predef to be unimported.\r\n\r\n#### Changes\r\n- Introduces the notion of \"sysdefs\" and \"predefs\" for Scala compilation units. Sysdefs are global imports that are imported at the top of all Scala compilation units _under all circumstances_. Predefs are imported after sysdefs and can be masked by top level imports in the source file (to match the existing behavior of directly importing from `scala.Predef`).\r\n- Adds `-Ysysdef` which controls the global sysdef imports for all Scala compilation units. The default value is set to `java.lang._; scala._`.\r\n- Added `-Ypredef` which controls the predef imports for Scala compilation units. The default value is set to `scala.Predef._`.\r\n#### Usage\r\n\r\n***Note: This table below is now inaccurate due to the recent update ***\r\n\r\n| Value for `-Ypredef:[VALUE]` | Result |\r\n| --- | --- |\r\n| `` | No predefined imports. Same behavior as existing flag `-Yno-imports`. |\r\n| `java.lang._;scala._` | Don't import `scala.Predef._`. This is the same behavior as `-Yno-predef`. |\r\n| `java.lang._;scala._;scala.Predef._` | Default behavior. |\r\n| `java.lang._;scala._;com.my.Minidef._` | Imports all of `com.my.Minidef` instead of `scala.Predef` |\r\n| `scala.Predef.{String=>STRING}` | Imports all of 'scala.Predef.String`as`STRING` |\r\n\r\nI'd be great to get any feedback. I would also to back port this to 2.11.\r\n","created_at":"2016-08-18T23:34:03Z","updated_at":"2016-12-14T20:42:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ef375ebbfb38d799e09e795bc7b6d26822ffe3a","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scala/scala/milestones/59","html_url":"https://github.com/scala/scala/milestone/59","labels_url":"https://api.github.com/repos/scala/scala/milestones/59/labels","id":2100825,"number":59,"title":"2.12.2","description":"Merge to 2.12.x. ","creator":{"login":"adriaanm","id":91083,"avatar_url":"https://avatars.githubusercontent.com/u/91083?v=3","gravatar_id":"","url":"https://api.github.com/users/adriaanm","html_url":"https://github.com/adriaanm","followers_url":"https://api.github.com/users/adriaanm/followers","following_url":"https://api.github.com/users/adriaanm/following{/other_user}","gists_url":"https://api.github.com/users/adriaanm/gists{/gist_id}","starred_url":"https://api.github.com/users/adriaanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adriaanm/subscriptions","organizations_url":"https://api.github.com/users/adriaanm/orgs","repos_url":"https://api.github.com/users/adriaanm/repos","events_url":"https://api.github.com/users/adriaanm/events{/privacy}","received_events_url":"https://api.github.com/users/adriaanm/received_events","type":"User","site_admin":false},"open_issues":32,"closed_issues":21,"state":"open","created_at":"2016-10-28T22:48:34Z","updated_at":"2016-12-14T11:16:03Z","due_on":"2017-02-27T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scala/scala/pulls/5350/commits","review_comments_url":"https://api.github.com/repos/scala/scala/pulls/5350/comments","review_comment_url":"https://api.github.com/repos/scala/scala/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scala/scala/issues/5350/comments","statuses_url":"https://api.github.com/repos/scala/scala/statuses/365be0b2948ddd19cb06175d6a1e24bc9d240102","head":{"label":"andyscott:as-Ypredef","ref":"as-Ypredef","sha":"365be0b2948ddd19cb06175d6a1e24bc9d240102","user":{"login":"andyscott","id":310363,"avatar_url":"https://avatars.githubusercontent.com/u/310363?v=3","gravatar_id":"","url":"https://api.github.com/users/andyscott","html_url":"https://github.com/andyscott","followers_url":"https://api.github.com/users/andyscott/followers","following_url":"https://api.github.com/users/andyscott/following{/other_user}","gists_url":"https://api.github.com/users/andyscott/gists{/gist_id}","starred_url":"https://api.github.com/users/andyscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyscott/subscriptions","organizations_url":"https://api.github.com/users/andyscott/orgs","repos_url":"https://api.github.com/users/andyscott/repos","events_url":"https://api.github.com/users/andyscott/events{/privacy}","received_events_url":"https://api.github.com/users/andyscott/received_events","type":"User","site_admin":false},"repo":{"id":55555389,"name":"scala","full_name":"andyscott/scala","owner":{"login":"andyscott","id":310363,"avatar_url":"https://avatars.githubusercontent.com/u/310363?v=3","gravatar_id":"","url":"https://api.github.com/users/andyscott","html_url":"https://github.com/andyscott","followers_url":"https://api.github.com/users/andyscott/followers","following_url":"https://api.github.com/users/andyscott/following{/other_user}","gists_url":"https://api.github.com/users/andyscott/gists{/gist_id}","starred_url":"https://api.github.com/users/andyscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyscott/subscriptions","organizations_url":"https://api.github.com/users/andyscott/orgs","repos_url":"https://api.github.com/users/andyscott/repos","events_url":"https://api.github.com/users/andyscott/events{/privacy}","received_events_url":"https://api.github.com/users/andyscott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andyscott/scala","description":"The Scala programming language","fork":true,"url":"https://api.github.com/repos/andyscott/scala","forks_url":"https://api.github.com/repos/andyscott/scala/forks","keys_url":"https://api.github.com/repos/andyscott/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andyscott/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andyscott/scala/teams","hooks_url":"https://api.github.com/repos/andyscott/scala/hooks","issue_events_url":"https://api.github.com/repos/andyscott/scala/issues/events{/number}","events_url":"https://api.github.com/repos/andyscott/scala/events","assignees_url":"https://api.github.com/repos/andyscott/scala/assignees{/user}","branches_url":"https://api.github.com/repos/andyscott/scala/branches{/branch}","tags_url":"https://api.github.com/repos/andyscott/scala/tags","blobs_url":"https://api.github.com/repos/andyscott/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andyscott/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andyscott/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/andyscott/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andyscott/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/andyscott/scala/languages","stargazers_url":"https://api.github.com/repos/andyscott/scala/stargazers","contributors_url":"https://api.github.com/repos/andyscott/scala/contributors","subscribers_url":"https://api.github.com/repos/andyscott/scala/subscribers","subscription_url":"https://api.github.com/repos/andyscott/scala/subscription","commits_url":"https://api.github.com/repos/andyscott/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/andyscott/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/andyscott/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/andyscott/scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/andyscott/scala/contents/{+path}","compare_url":"https://api.github.com/repos/andyscott/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andyscott/scala/merges","archive_url":"https://api.github.com/repos/andyscott/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andyscott/scala/downloads","issues_url":"https://api.github.com/repos/andyscott/scala/issues{/number}","pulls_url":"https://api.github.com/repos/andyscott/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/andyscott/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/andyscott/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andyscott/scala/labels{/name}","releases_url":"https://api.github.com/repos/andyscott/scala/releases{/id}","deployments_url":"https://api.github.com/repos/andyscott/scala/deployments","created_at":"2016-04-05T21:40:51Z","updated_at":"2016-04-05T21:41:16Z","pushed_at":"2016-11-22T16:48:12Z","git_url":"git://github.com/andyscott/scala.git","ssh_url":"git@github.com:andyscott/scala.git","clone_url":"https://github.com/andyscott/scala.git","svn_url":"https://github.com/andyscott/scala","homepage":"http://www.scala-lang.org/","size":80511,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.12.x"}},"base":{"label":"scala:2.12.x","ref":"2.12.x","sha":"371bc2c7fcd128deb61e8249588138b7e2b0d2b0","user":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"repo":{"id":2888818,"name":"scala","full_name":"scala/scala","owner":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scala/scala","description":"The Scala programming language","fork":false,"url":"https://api.github.com/repos/scala/scala","forks_url":"https://api.github.com/repos/scala/scala/forks","keys_url":"https://api.github.com/repos/scala/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scala/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scala/scala/teams","hooks_url":"https://api.github.com/repos/scala/scala/hooks","issue_events_url":"https://api.github.com/repos/scala/scala/issues/events{/number}","events_url":"https://api.github.com/repos/scala/scala/events","assignees_url":"https://api.github.com/repos/scala/scala/assignees{/user}","branches_url":"https://api.github.com/repos/scala/scala/branches{/branch}","tags_url":"https://api.github.com/repos/scala/scala/tags","blobs_url":"https://api.github.com/repos/scala/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scala/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scala/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/scala/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scala/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/scala/scala/languages","stargazers_url":"https://api.github.com/repos/scala/scala/stargazers","contributors_url":"https://api.github.com/repos/scala/scala/contributors","subscribers_url":"https://api.github.com/repos/scala/scala/subscribers","subscription_url":"https://api.github.com/repos/scala/scala/subscription","commits_url":"https://api.github.com/repos/scala/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/scala/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/scala/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/scala/scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/scala/scala/contents/{+path}","compare_url":"https://api.github.com/repos/scala/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scala/scala/merges","archive_url":"https://api.github.com/repos/scala/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scala/scala/downloads","issues_url":"https://api.github.com/repos/scala/scala/issues{/number}","pulls_url":"https://api.github.com/repos/scala/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/scala/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/scala/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scala/scala/labels{/name}","releases_url":"https://api.github.com/repos/scala/scala/releases{/id}","deployments_url":"https://api.github.com/repos/scala/scala/deployments","created_at":"2011-12-01T05:02:34Z","updated_at":"2016-12-14T16:26:04Z","pushed_at":"2016-12-14T20:34:17Z","git_url":"git://github.com/scala/scala.git","ssh_url":"git@github.com:scala/scala.git","clone_url":"https://github.com/scala/scala.git","svn_url":"https://github.com/scala/scala","homepage":"http://www.scala-lang.org/","size":81440,"stargazers_count":7334,"watchers_count":7334,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1884,"mirror_url":null,"open_issues_count":56,"forks":1884,"open_issues":56,"watchers":7334,"default_branch":"2.12.x"}},"_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/5350"},"html":{"href":"https://github.com/scala/scala/pull/5350"},"issue":{"href":"https://api.github.com/repos/scala/scala/issues/5350"},"comments":{"href":"https://api.github.com/repos/scala/scala/issues/5350/comments"},"review_comments":{"href":"https://api.github.com/repos/scala/scala/pulls/5350/comments"},"review_comment":{"href":"https://api.github.com/repos/scala/scala/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scala/scala/pulls/5350/commits"},"statuses":{"href":"https://api.github.com/repos/scala/scala/statuses/365be0b2948ddd19cb06175d6a1e24bc9d240102"}}}}
{"actor":{"display_login":"andyscott"}}