{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/43540909","id":43540909,"diff_hunk":"@@ -647,6 +650,9 @@ public void SetTestObjectFormattingOptions()\n                                 {\n                                     rspState = rspState.WithScriptState(newScriptState);\n                                 }\n+\n+                                // remove references and imports from the options, they have been applied and will be inherited from now on:\n+                                rspState = rspState.WithOptions(rspState.ScriptOptions.WithReferences(Array.Empty<MetadataReference>()).WithImports(Array.Empty<string>()));","path":"src/Interactive/Features/Interactive/Core/InteractiveHost.Service.cs","position":16,"original_position":16,"commit_id":"fc8f1fc94b956e7acfc3a09340d6a39833ce17b0","original_commit_id":"fc8f1fc94b956e7acfc3a09340d6a39833ce17b0","user":{"login":"cston","id":10732005,"avatar_url":"https://avatars.githubusercontent.com/u/10732005?v=3","gravatar_id":"","url":"https://api.github.com/users/cston","html_url":"https://github.com/cston","followers_url":"https://api.github.com/users/cston/followers","following_url":"https://api.github.com/users/cston/following{/other_user}","gists_url":"https://api.github.com/users/cston/gists{/gist_id}","starred_url":"https://api.github.com/users/cston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cston/subscriptions","organizations_url":"https://api.github.com/users/cston/orgs","repos_url":"https://api.github.com/users/cston/repos","events_url":"https://api.github.com/users/cston/events{/privacy}","received_events_url":"https://api.github.com/users/cston/received_events","type":"User","site_admin":false},"body":"Perhaps add an ```EvaluationState.WithNoReferencesOrImports()``` helper method.","created_at":"2015-10-30T19:06:42Z","updated_at":"2015-10-30T19:06:42Z","html_url":"https://github.com/dotnet/roslyn/pull/6458#discussion_r43540909","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/6458","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/43540909"},"html":{"href":"https://github.com/dotnet/roslyn/pull/6458#discussion_r43540909"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/6458"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/6458","id":49234762,"html_url":"https://github.com/dotnet/roslyn/pull/6458","diff_url":"https://github.com/dotnet/roslyn/pull/6458.diff","patch_url":"https://github.com/dotnet/roslyn/pull/6458.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/6458","number":6458,"state":"open","locked":false,"title":"Inherit references from previous submissions","user":{"login":"tmat","id":41759,"avatar_url":"https://avatars.githubusercontent.com/u/41759?v=3","gravatar_id":"","url":"https://api.github.com/users/tmat","html_url":"https://github.com/tmat","followers_url":"https://api.github.com/users/tmat/followers","following_url":"https://api.github.com/users/tmat/following{/other_user}","gists_url":"https://api.github.com/users/tmat/gists{/gist_id}","starred_url":"https://api.github.com/users/tmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmat/subscriptions","organizations_url":"https://api.github.com/users/tmat/orgs","repos_url":"https://api.github.com/users/tmat/repos","events_url":"https://api.github.com/users/tmat/events{/privacy}","received_events_url":"https://api.github.com/users/tmat/received_events","type":"User","site_admin":false},"body":"Moves the logic of reusing metadata references from Script down to ReferenceManager. This is necessary to avoid duplication of PE assembly symbols due to repeatedly resolved missing references. \r\n\r\nThe metadata resolver creates a new reference whenever asked to resolve a missing assembly identity. That results in creating new PE assembly symbol. We could implement deduplication in the resolver. However the lifetime of the resolver isn't necessarily related to the lifetime of the interactive session. hence it is better to implement it in the ReferenceManager. This work item was previously suggested for U1 but postponed for U2 (#5301) since the thinking was that it only affects performance. However, as described in #6457 it is critical for correctness of basic scenarios in csi and Hosting APIs, which don't use shadow copying.","created_at":"2015-10-30T06:08:32Z","updated_at":"2015-10-30T19:06:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36518e5550f7f3d18a979d17a6f7a5687874f827","assignee":{"login":"tmat","id":41759,"avatar_url":"https://avatars.githubusercontent.com/u/41759?v=3","gravatar_id":"","url":"https://api.github.com/users/tmat","html_url":"https://github.com/tmat","followers_url":"https://api.github.com/users/tmat/followers","following_url":"https://api.github.com/users/tmat/following{/other_user}","gists_url":"https://api.github.com/users/tmat/gists{/gist_id}","starred_url":"https://api.github.com/users/tmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmat/subscriptions","organizations_url":"https://api.github.com/users/tmat/orgs","repos_url":"https://api.github.com/users/tmat/repos","events_url":"https://api.github.com/users/tmat/events{/privacy}","received_events_url":"https://api.github.com/users/tmat/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/3","html_url":"https://github.com/dotnet/roslyn/milestones/1.1","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/3/labels","id":937401,"number":3,"title":"1.1","description":"This is our 1.1 Milestone.\r\n\r\n<!---\r\n@huboard:{\"order\":1.5}\r\n-->\r\n","creator":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":64,"closed_issues":730,"state":"open","created_at":"2015-01-15T20:48:41Z","updated_at":"2015-10-30T18:25:10Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/6458/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/6458/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/6458/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/fc8f1fc94b956e7acfc3a09340d6a39833ce17b0","head":{"label":"tmat:DuplicatePESymbols","ref":"DuplicatePESymbols","sha":"fc8f1fc94b956e7acfc3a09340d6a39833ce17b0","user":{"login":"tmat","id":41759,"avatar_url":"https://avatars.githubusercontent.com/u/41759?v=3","gravatar_id":"","url":"https://api.github.com/users/tmat","html_url":"https://github.com/tmat","followers_url":"https://api.github.com/users/tmat/followers","following_url":"https://api.github.com/users/tmat/following{/other_user}","gists_url":"https://api.github.com/users/tmat/gists{/gist_id}","starred_url":"https://api.github.com/users/tmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmat/subscriptions","organizations_url":"https://api.github.com/users/tmat/orgs","repos_url":"https://api.github.com/users/tmat/repos","events_url":"https://api.github.com/users/tmat/events{/privacy}","received_events_url":"https://api.github.com/users/tmat/received_events","type":"User","site_admin":false},"repo":{"id":30440379,"name":"roslyn","full_name":"tmat/roslyn","owner":{"login":"tmat","id":41759,"avatar_url":"https://avatars.githubusercontent.com/u/41759?v=3","gravatar_id":"","url":"https://api.github.com/users/tmat","html_url":"https://github.com/tmat","followers_url":"https://api.github.com/users/tmat/followers","following_url":"https://api.github.com/users/tmat/following{/other_user}","gists_url":"https://api.github.com/users/tmat/gists{/gist_id}","starred_url":"https://api.github.com/users/tmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmat/subscriptions","organizations_url":"https://api.github.com/users/tmat/orgs","repos_url":"https://api.github.com/users/tmat/repos","events_url":"https://api.github.com/users/tmat/events{/privacy}","received_events_url":"https://api.github.com/users/tmat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmat/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/tmat/roslyn","forks_url":"https://api.github.com/repos/tmat/roslyn/forks","keys_url":"https://api.github.com/repos/tmat/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmat/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmat/roslyn/teams","hooks_url":"https://api.github.com/repos/tmat/roslyn/hooks","issue_events_url":"https://api.github.com/repos/tmat/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/tmat/roslyn/events","assignees_url":"https://api.github.com/repos/tmat/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/tmat/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/tmat/roslyn/tags","blobs_url":"https://api.github.com/repos/tmat/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmat/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmat/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmat/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmat/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/tmat/roslyn/languages","stargazers_url":"https://api.github.com/repos/tmat/roslyn/stargazers","contributors_url":"https://api.github.com/repos/tmat/roslyn/contributors","subscribers_url":"https://api.github.com/repos/tmat/roslyn/subscribers","subscription_url":"https://api.github.com/repos/tmat/roslyn/subscription","commits_url":"https://api.github.com/repos/tmat/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmat/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmat/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmat/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmat/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/tmat/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmat/roslyn/merges","archive_url":"https://api.github.com/repos/tmat/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmat/roslyn/downloads","issues_url":"https://api.github.com/repos/tmat/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/tmat/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/tmat/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/tmat/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmat/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/tmat/roslyn/releases{/id}","created_at":"2015-02-07T01:09:01Z","updated_at":"2015-05-08T18:44:57Z","pushed_at":"2015-10-30T16:21:57Z","git_url":"git://github.com/tmat/roslyn.git","ssh_url":"git@github.com:tmat/roslyn.git","clone_url":"https://github.com/tmat/roslyn.git","svn_url":"https://github.com/tmat/roslyn","homepage":"","size":109484,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"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":"dotnet:stabilization","ref":"stabilization","sha":"83600a89fcecb0669d53aa03b19f13307c6853b5","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-10-30T16:11:20Z","pushed_at":"2015-10-30T19:05:38Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":217728,"stargazers_count":3625,"watchers_count":3625,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":855,"mirror_url":null,"open_issues_count":1565,"forks":855,"open_issues":1565,"watchers":3625,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/6458"},"html":{"href":"https://github.com/dotnet/roslyn/pull/6458"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/6458"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/6458/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/6458/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/6458/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/fc8f1fc94b956e7acfc3a09340d6a39833ce17b0"}}}}