{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/38014009","id":38014009,"diff_hunk":"@@ -98,22 +98,13 @@ internal sealed class ContainedDocument : ForegroundThreadAffinitizedObject, IVi\n             _optionService = _workspace.Services.GetService<IOptionService>();\n             _hostType = GetHostType();\n \n-            var rdt = (IVsRunningDocumentTable)componentModel.GetService<SVsServiceProvider>().GetService(typeof(SVsRunningDocumentTable));\n-\n-            IVsHierarchy sharedHierarchy;\n-            uint itemIdInSharedHierarchy;\n-            var isSharedHierarchy = LinkedFileUtilities.TryGetSharedHierarchyAndItemId(hierarchy, itemId, out sharedHierarchy, out itemIdInSharedHierarchy);\n-\n-            var filePath = isSharedHierarchy\n-                ? rdt.GetMonikerForHierarchyAndItemId(sharedHierarchy, itemIdInSharedHierarchy)\n-                : rdt.GetMonikerForHierarchyAndItemId(hierarchy, itemId);\n-\n-            // we couldn't look up the document moniker in RDT for a hierarchy/item pair\n-            // Since we only use this moniker as a key, we could fall back to something else, like the document name.\n-            if (filePath == null)\n+            string filePath;\n+            if (!ErrorHandler.Succeeded(((IVsProject)hierarchy).GetMkDocument(itemId, out filePath)))\n             {\n-                Debug.Assert(false, \"Could not get the document moniker for an item in its hierarchy.\");\n-                filePath = hierarchy.GetDocumentNameForHierarchyAndItemId(itemId);\n+                // we couldn't look up the document moniker from an hierarchy for an itemid.\n+                // Since we only use this moniker as a key, we could fall back to something else, like the document name.\n+                Debug.Assert(false, \"Could not get the document moniker for an item from its hierarchy.\");\n+                hierarchy.TryGetItemName(itemId, out filePath);","path":"src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs","position":25,"original_position":25,"commit_id":"2af178f37d02320696be4a1e91e3763869620905","original_commit_id":"2af178f37d02320696be4a1e91e3763869620905","user":{"login":"dpoeschl","id":235241,"avatar_url":"https://avatars.githubusercontent.com/u/235241?v=3","gravatar_id":"","url":"https://api.github.com/users/dpoeschl","html_url":"https://github.com/dpoeschl","followers_url":"https://api.github.com/users/dpoeschl/followers","following_url":"https://api.github.com/users/dpoeschl/following{/other_user}","gists_url":"https://api.github.com/users/dpoeschl/gists{/gist_id}","starred_url":"https://api.github.com/users/dpoeschl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpoeschl/subscriptions","organizations_url":"https://api.github.com/users/dpoeschl/orgs","repos_url":"https://api.github.com/users/dpoeschl/repos","events_url":"https://api.github.com/users/dpoeschl/events{/privacy}","received_events_url":"https://api.github.com/users/dpoeschl/received_events","type":"User","site_admin":false},"body":"Does this string end up flowing anywhere that gets serialized, like into caches in the .vs folder? If so, we may need to trace it through and update serialization format version numbers to make sure we don't read back in unexpected values after upgrading to a new VS that includes this change.","created_at":"2015-08-26T18:03:32Z","updated_at":"2015-08-26T18:03:32Z","html_url":"https://github.com/dotnet/roslyn/pull/4797#discussion_r38014009","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4797","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/38014009"},"html":{"href":"https://github.com/dotnet/roslyn/pull/4797#discussion_r38014009"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4797"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/4797","id":43347263,"html_url":"https://github.com/dotnet/roslyn/pull/4797","diff_url":"https://github.com/dotnet/roslyn/pull/4797.diff","patch_url":"https://github.com/dotnet/roslyn/pull/4797.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/4797","number":4797,"state":"open","locked":false,"title":"Get document moniker from IVsProject instead of RDT","user":{"login":"balajikris","id":4213867,"avatar_url":"https://avatars.githubusercontent.com/u/4213867?v=3","gravatar_id":"","url":"https://api.github.com/users/balajikris","html_url":"https://github.com/balajikris","followers_url":"https://api.github.com/users/balajikris/followers","following_url":"https://api.github.com/users/balajikris/following{/other_user}","gists_url":"https://api.github.com/users/balajikris/gists{/gist_id}","starred_url":"https://api.github.com/users/balajikris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balajikris/subscriptions","organizations_url":"https://api.github.com/users/balajikris/orgs","repos_url":"https://api.github.com/users/balajikris/repos","events_url":"https://api.github.com/users/balajikris/events{/privacy}","received_events_url":"https://api.github.com/users/balajikris/received_events","type":"User","site_admin":false},"body":"Switching to IVsProject.GetMkDocument to get document moniker instead of\r\niterating through all the entries in the running document table. Also\r\ncleaning up a bit of code while I'm here - It looks like we don't need\r\nto determine Shared Hierarchy & Shared ItemId here anymore. It was there\r\nfor error list and it looks like with PR #2399 error list switched to a\r\ndifferent implementation.\r\n\r\nFixes #3645.\r\n\r\nValidations To Do:\r\n* [x] Run Integration tests: Venus, Razor, LinkedFiles\r\n* [ ] Exploratory testing on Asp Net 5 projects (shared hierarchies!), other Web flavored projects\r\n* [ ] Buddy test, if needed.","created_at":"2015-08-25T23:04:10Z","updated_at":"2015-08-26T18:03:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8947c2617c4cbbaf262a80991d19be0f1d66b3fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4797/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4797/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/4797/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/2af178f37d02320696be4a1e91e3763869620905","head":{"label":"balajikris:RDT-3645","ref":"RDT-3645","sha":"2af178f37d02320696be4a1e91e3763869620905","user":{"login":"balajikris","id":4213867,"avatar_url":"https://avatars.githubusercontent.com/u/4213867?v=3","gravatar_id":"","url":"https://api.github.com/users/balajikris","html_url":"https://github.com/balajikris","followers_url":"https://api.github.com/users/balajikris/followers","following_url":"https://api.github.com/users/balajikris/following{/other_user}","gists_url":"https://api.github.com/users/balajikris/gists{/gist_id}","starred_url":"https://api.github.com/users/balajikris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balajikris/subscriptions","organizations_url":"https://api.github.com/users/balajikris/orgs","repos_url":"https://api.github.com/users/balajikris/repos","events_url":"https://api.github.com/users/balajikris/events{/privacy}","received_events_url":"https://api.github.com/users/balajikris/received_events","type":"User","site_admin":false},"repo":{"id":30552969,"name":"roslyn","full_name":"balajikris/roslyn","owner":{"login":"balajikris","id":4213867,"avatar_url":"https://avatars.githubusercontent.com/u/4213867?v=3","gravatar_id":"","url":"https://api.github.com/users/balajikris","html_url":"https://github.com/balajikris","followers_url":"https://api.github.com/users/balajikris/followers","following_url":"https://api.github.com/users/balajikris/following{/other_user}","gists_url":"https://api.github.com/users/balajikris/gists{/gist_id}","starred_url":"https://api.github.com/users/balajikris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balajikris/subscriptions","organizations_url":"https://api.github.com/users/balajikris/orgs","repos_url":"https://api.github.com/users/balajikris/repos","events_url":"https://api.github.com/users/balajikris/events{/privacy}","received_events_url":"https://api.github.com/users/balajikris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/balajikris/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/balajikris/roslyn","forks_url":"https://api.github.com/repos/balajikris/roslyn/forks","keys_url":"https://api.github.com/repos/balajikris/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/balajikris/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/balajikris/roslyn/teams","hooks_url":"https://api.github.com/repos/balajikris/roslyn/hooks","issue_events_url":"https://api.github.com/repos/balajikris/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/balajikris/roslyn/events","assignees_url":"https://api.github.com/repos/balajikris/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/balajikris/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/balajikris/roslyn/tags","blobs_url":"https://api.github.com/repos/balajikris/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/balajikris/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/balajikris/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/balajikris/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/balajikris/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/balajikris/roslyn/languages","stargazers_url":"https://api.github.com/repos/balajikris/roslyn/stargazers","contributors_url":"https://api.github.com/repos/balajikris/roslyn/contributors","subscribers_url":"https://api.github.com/repos/balajikris/roslyn/subscribers","subscription_url":"https://api.github.com/repos/balajikris/roslyn/subscription","commits_url":"https://api.github.com/repos/balajikris/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/balajikris/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/balajikris/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/balajikris/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/balajikris/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/balajikris/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/balajikris/roslyn/merges","archive_url":"https://api.github.com/repos/balajikris/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/balajikris/roslyn/downloads","issues_url":"https://api.github.com/repos/balajikris/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/balajikris/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/balajikris/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/balajikris/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/balajikris/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/balajikris/roslyn/releases{/id}","created_at":"2015-02-09T19:08:10Z","updated_at":"2015-05-08T19:50:21Z","pushed_at":"2015-08-25T22:10:33Z","git_url":"git://github.com/balajikris/roslyn.git","ssh_url":"git@github.com:balajikris/roslyn.git","clone_url":"https://github.com/balajikris/roslyn.git","svn_url":"https://github.com/balajikris/roslyn","homepage":"","size":92488,"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:master","ref":"master","sha":"9ac63bed5f818cef96d5fb619526eb68cadf63b4","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-08-26T17:58:09Z","pushed_at":"2015-08-26T17:45:13Z","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":170587,"stargazers_count":3089,"watchers_count":3089,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":709,"mirror_url":null,"open_issues_count":1400,"forks":709,"open_issues":1400,"watchers":3089,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4797"},"html":{"href":"https://github.com/dotnet/roslyn/pull/4797"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/4797"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/4797/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4797/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4797/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/2af178f37d02320696be4a1e91e3763869620905"}}}}