{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/120967164","pull_request_review_id":42978074,"id":120967164,"diff_hunk":"@@ -19,21 +19,33 @@ namespace Microsoft.CodeAnalysis.Diagnostics\n     /// </summary>\n     internal partial class AnalyzerManager\n     {\n-        /// <summary>\n-        /// Gets the default instance of the AnalyzerManager for the lifetime of the analyzer host process.\n-        /// </summary>\n-        public static readonly AnalyzerManager Instance = new AnalyzerManager();\n+        private readonly object _gate = new object();\n \n         // This cache stores the analyzer execution context per-analyzer (i.e. registered actions, supported descriptors, etc.).\n-        private readonly ConditionalWeakTable<DiagnosticAnalyzer, AnalyzerExecutionContext> _analyzerExecutionContextMap =\n-            new ConditionalWeakTable<DiagnosticAnalyzer, AnalyzerExecutionContext>();\n+        private readonly Dictionary<DiagnosticAnalyzer, AnalyzerExecutionContext> _analyzerExecutionContextMap =","path":"src/Compilers/Core/Portable/DiagnosticAnalyzer/AnalyzerManager.cs","position":13,"original_position":13,"commit_id":"106fe577615bc6c29271d2abb15e5d67771609c1","original_commit_id":"106fe577615bc6c29271d2abb15e5d67771609c1","user":{"login":"heejaechang","id":1333179,"avatar_url":"https://avatars0.githubusercontent.com/u/1333179?v=3","gravatar_id":"","url":"https://api.github.com/users/heejaechang","html_url":"https://github.com/heejaechang","followers_url":"https://api.github.com/users/heejaechang/followers","following_url":"https://api.github.com/users/heejaechang/following{/other_user}","gists_url":"https://api.github.com/users/heejaechang/gists{/gist_id}","starred_url":"https://api.github.com/users/heejaechang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heejaechang/subscriptions","organizations_url":"https://api.github.com/users/heejaechang/orgs","repos_url":"https://api.github.com/users/heejaechang/repos","events_url":"https://api.github.com/users/heejaechang/events{/privacy}","received_events_url":"https://api.github.com/users/heejaechang/received_events","type":"User","site_admin":false},"body":"concurrent dictionary and remove the lock? or just create whole map in immutable map at once might better? since this seems get called many times?","created_at":"2017-06-08T18:39:52Z","updated_at":"2017-06-08T18:39:53Z","html_url":"https://github.com/dotnet/roslyn/pull/20109#discussion_r120967164","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20109","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/120967164"},"html":{"href":"https://github.com/dotnet/roslyn/pull/20109#discussion_r120967164"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20109"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/20109","id":124715186,"html_url":"https://github.com/dotnet/roslyn/pull/20109","diff_url":"https://github.com/dotnet/roslyn/pull/20109.diff","patch_url":"https://github.com/dotnet/roslyn/pull/20109.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/20109","number":20109,"state":"open","locked":false,"title":"Remove the AnalyzerManager singleton to prevent storing analyzer exec…","user":{"login":"mavasani","id":10605811,"avatar_url":"https://avatars1.githubusercontent.com/u/10605811?v=3","gravatar_id":"","url":"https://api.github.com/users/mavasani","html_url":"https://github.com/mavasani","followers_url":"https://api.github.com/users/mavasani/followers","following_url":"https://api.github.com/users/mavasani/following{/other_user}","gists_url":"https://api.github.com/users/mavasani/gists{/gist_id}","starred_url":"https://api.github.com/users/mavasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavasani/subscriptions","organizations_url":"https://api.github.com/users/mavasani/orgs","repos_url":"https://api.github.com/users/mavasani/repos","events_url":"https://api.github.com/users/mavasani/events{/privacy}","received_events_url":"https://api.github.com/users/mavasani/received_events","type":"User","site_admin":false},"body":"…ution state across compilations\r\n\r\nNow we throw away all the analyzer execution state once the CompilationWithAnalyzers goes out of scope.","created_at":"2017-06-08T18:29:28Z","updated_at":"2017-06-08T18:39:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4595876a266cfaf4170bf86073cfba571f35a60b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jinujoseph","id":12449387,"avatar_url":"https://avatars0.githubusercontent.com/u/12449387?v=3","gravatar_id":"","url":"https://api.github.com/users/jinujoseph","html_url":"https://github.com/jinujoseph","followers_url":"https://api.github.com/users/jinujoseph/followers","following_url":"https://api.github.com/users/jinujoseph/following{/other_user}","gists_url":"https://api.github.com/users/jinujoseph/gists{/gist_id}","starred_url":"https://api.github.com/users/jinujoseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinujoseph/subscriptions","organizations_url":"https://api.github.com/users/jinujoseph/orgs","repos_url":"https://api.github.com/users/jinujoseph/repos","events_url":"https://api.github.com/users/jinujoseph/events{/privacy}","received_events_url":"https://api.github.com/users/jinujoseph/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20109/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20109/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/20109/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/106fe577615bc6c29271d2abb15e5d67771609c1","head":{"label":"mavasani:AnalyzerContext","ref":"AnalyzerContext","sha":"106fe577615bc6c29271d2abb15e5d67771609c1","user":{"login":"mavasani","id":10605811,"avatar_url":"https://avatars1.githubusercontent.com/u/10605811?v=3","gravatar_id":"","url":"https://api.github.com/users/mavasani","html_url":"https://github.com/mavasani","followers_url":"https://api.github.com/users/mavasani/followers","following_url":"https://api.github.com/users/mavasani/following{/other_user}","gists_url":"https://api.github.com/users/mavasani/gists{/gist_id}","starred_url":"https://api.github.com/users/mavasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavasani/subscriptions","organizations_url":"https://api.github.com/users/mavasani/orgs","repos_url":"https://api.github.com/users/mavasani/repos","events_url":"https://api.github.com/users/mavasani/events{/privacy}","received_events_url":"https://api.github.com/users/mavasani/received_events","type":"User","site_admin":false},"repo":{"id":30584055,"name":"roslyn","full_name":"mavasani/roslyn","owner":{"login":"mavasani","id":10605811,"avatar_url":"https://avatars1.githubusercontent.com/u/10605811?v=3","gravatar_id":"","url":"https://api.github.com/users/mavasani","html_url":"https://github.com/mavasani","followers_url":"https://api.github.com/users/mavasani/followers","following_url":"https://api.github.com/users/mavasani/following{/other_user}","gists_url":"https://api.github.com/users/mavasani/gists{/gist_id}","starred_url":"https://api.github.com/users/mavasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavasani/subscriptions","organizations_url":"https://api.github.com/users/mavasani/orgs","repos_url":"https://api.github.com/users/mavasani/repos","events_url":"https://api.github.com/users/mavasani/events{/privacy}","received_events_url":"https://api.github.com/users/mavasani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mavasani/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/mavasani/roslyn","forks_url":"https://api.github.com/repos/mavasani/roslyn/forks","keys_url":"https://api.github.com/repos/mavasani/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavasani/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavasani/roslyn/teams","hooks_url":"https://api.github.com/repos/mavasani/roslyn/hooks","issue_events_url":"https://api.github.com/repos/mavasani/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/mavasani/roslyn/events","assignees_url":"https://api.github.com/repos/mavasani/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/mavasani/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/mavasani/roslyn/tags","blobs_url":"https://api.github.com/repos/mavasani/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavasani/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavasani/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavasani/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavasani/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/mavasani/roslyn/languages","stargazers_url":"https://api.github.com/repos/mavasani/roslyn/stargazers","contributors_url":"https://api.github.com/repos/mavasani/roslyn/contributors","subscribers_url":"https://api.github.com/repos/mavasani/roslyn/subscribers","subscription_url":"https://api.github.com/repos/mavasani/roslyn/subscription","commits_url":"https://api.github.com/repos/mavasani/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavasani/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavasani/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavasani/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavasani/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/mavasani/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavasani/roslyn/merges","archive_url":"https://api.github.com/repos/mavasani/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavasani/roslyn/downloads","issues_url":"https://api.github.com/repos/mavasani/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/mavasani/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/mavasani/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/mavasani/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavasani/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/mavasani/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/mavasani/roslyn/deployments","created_at":"2015-02-10T09:12:41Z","updated_at":"2016-02-05T19:05:21Z","pushed_at":"2017-06-08T18:26:43Z","git_url":"git://github.com/mavasani/roslyn.git","ssh_url":"git@github.com:mavasani/roslyn.git","clone_url":"https://github.com/mavasani/roslyn.git","svn_url":"https://github.com/mavasani/roslyn","homepage":"","size":208348,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:dev15.6","ref":"dev15.6","sha":"1c4fe8e8378475b8f1b3ce958b1a17183d3c6b90","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars3.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://avatars3.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}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2017-06-08T12:32:06Z","pushed_at":"2017-06-08T18:38:22Z","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":216605,"stargazers_count":7608,"watchers_count":7608,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1865,"mirror_url":null,"open_issues_count":3689,"forks":1865,"open_issues":3689,"watchers":7608,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20109"},"html":{"href":"https://github.com/dotnet/roslyn/pull/20109"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/20109"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/20109/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20109/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20109/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/106fe577615bc6c29271d2abb15e5d67771609c1"}}}}
{"actor":{"display_login":"heejaechang"}}