{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/122519113","pull_request_review_id":44647791,"id":122519113,"diff_hunk":"@@ -83,69 +84,78 @@ protected override Task ProduceTagsAsync(TaggerContext<TTag> context, DocumentSn\n \n             private void ProduceTags(TaggerContext<TTag> context, DocumentSnapshotSpan spanToTag)\n             {\n-                if (!_owner.IsEnabled)\n+                try\n                 {\n-                    return;\n-                }\n+                    if (!_owner.IsEnabled)\n+                    {\n+                        return;\n+                    }\n \n-                var document = spanToTag.Document;\n-                if (document == null)\n-                {\n-                    return;\n-                }\n+                    var document = spanToTag.Document;\n+                    if (document == null)\n+                    {\n+                        return;\n+                    }\n \n-                // See if we've marked any spans as those we want to suppress diagnostics for.\n-                // This can happen for buffers used in the preview workspace where some feature\n-                // is generating code that it doesn't want errors shown for.\n-                var buffer = spanToTag.SnapshotSpan.Snapshot.TextBuffer;\n-                var suppressedDiagnosticsSpans = default(NormalizedSnapshotSpanCollection);\n-                buffer?.Properties.TryGetProperty(PredefinedPreviewTaggerKeys.SuppressDiagnosticsSpansKey, out suppressedDiagnosticsSpans);\n-\n-                // Producing tags is simple.  We just grab the diagnostics we were already told about,\n-                // and we convert them to tag spans.\n-                object id;\n-                ImmutableArray<DiagnosticData> diagnostics;\n-                SourceText sourceText;\n-                ITextSnapshot editorSnapshot;\n-                lock (_gate)\n-                {\n-                    id = _latestId;\n-                    diagnostics = _latestDiagnostics;\n-                    sourceText = _latestSourceText;\n-                    editorSnapshot = _latestEditorSnapshot;\n-                }\n+                    // See if we've marked any spans as those we want to suppress diagnostics for.\n+                    // This can happen for buffers used in the preview workspace where some feature\n+                    // is generating code that it doesn't want errors shown for.\n+                    var buffer = spanToTag.SnapshotSpan.Snapshot.TextBuffer;\n+                    var suppressedDiagnosticsSpans = default(NormalizedSnapshotSpanCollection);\n+                    buffer?.Properties.TryGetProperty(PredefinedPreviewTaggerKeys.SuppressDiagnosticsSpansKey, out suppressedDiagnosticsSpans);\n+\n+                    // Producing tags is simple.  We just grab the diagnostics we were already told about,\n+                    // and we convert them to tag spans.\n+                    object id;\n+                    ImmutableArray<DiagnosticData> diagnostics;\n+                    SourceText sourceText;\n+                    ITextSnapshot editorSnapshot;\n+                    lock (_gate)\n+                    {\n+                        id = _latestId;\n+                        diagnostics = _latestDiagnostics;\n+                        sourceText = _latestSourceText;\n+                        editorSnapshot = _latestEditorSnapshot;\n+                    }\n \n-                if (sourceText == null || editorSnapshot == null)\n-                {\n-                    return;\n-                }\n+                    if (sourceText == null || editorSnapshot == null)\n+                    {\n+                        return;\n+                    }\n \n-                var project = document.Project;\n+                    var project = document.Project;\n \n-                var requestedSnapshot = spanToTag.SnapshotSpan.Snapshot;\n-                var requestedSpan = spanToTag.SnapshotSpan;\n-                var isLiveUpdate = id is ISupportLiveUpdate;\n+                    var requestedSnapshot = spanToTag.SnapshotSpan.Snapshot;\n+                    var requestedSpan = spanToTag.SnapshotSpan;\n+                    var isLiveUpdate = id is ISupportLiveUpdate;\n \n-                foreach (var diagnosticData in diagnostics)\n-                {\n-                    if (_owner.IncludeDiagnostic(diagnosticData))\n+                    foreach (var diagnosticData in diagnostics)\n                     {\n-                        var actualSpan = diagnosticData\n-                            .GetExistingOrCalculatedTextSpan(sourceText)\n-                            .ToSnapshotSpan(editorSnapshot)\n-                            .TranslateTo(requestedSnapshot, SpanTrackingMode.EdgeExclusive);\n-\n-                        if (actualSpan.IntersectsWith(requestedSpan) &&\n-                            !IsSuppressed(suppressedDiagnosticsSpans, actualSpan))\n+                        if (_owner.IncludeDiagnostic(diagnosticData))\n                         {\n-                            var tagSpan = _owner.CreateTagSpan(isLiveUpdate, actualSpan, diagnosticData);\n-                            if (tagSpan != null)\n+                            var actualSpan = diagnosticData\n+                                .GetExistingOrCalculatedTextSpan(sourceText)\n+                                .ToSnapshotSpan(editorSnapshot)\n+                                .TranslateTo(requestedSnapshot, SpanTrackingMode.EdgeExclusive);\n+\n+                            if (actualSpan.IntersectsWith(requestedSpan) &&\n+                                !IsSuppressed(suppressedDiagnosticsSpans, actualSpan))\n                             {\n-                                context.AddTag(tagSpan);\n+                                var tagSpan = _owner.CreateTagSpan(isLiveUpdate, actualSpan, diagnosticData);\n+                                if (tagSpan != null)\n+                                {\n+                                    context.AddTag(tagSpan);\n+                                }\n                             }\n                         }\n                     }\n                 }\n+                catch (ArgumentOutOfRangeException ex) when (FatalError.ReportWithoutCrash(ex))\n+                {\n+                    // explicitly report NFW to find out what is causing us for out of range.","path":"src/EditorFeatures/Core/Implementation/Diagnostics/AbstractDiagnosticsTaggerProvider.TaggerProvider.cs","position":138,"original_position":138,"commit_id":"85f198b665f3b56cb7f91e7c3bf747d48a2c339d","original_commit_id":"85f198b665f3b56cb7f91e7c3bf747d48a2c339d","user":{"login":"jasonmalinowski","id":201340,"avatar_url":"https://avatars0.githubusercontent.com/u/201340?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmalinowski","html_url":"https://github.com/jasonmalinowski","followers_url":"https://api.github.com/users/jasonmalinowski/followers","following_url":"https://api.github.com/users/jasonmalinowski/following{/other_user}","gists_url":"https://api.github.com/users/jasonmalinowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmalinowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmalinowski/subscriptions","organizations_url":"https://api.github.com/users/jasonmalinowski/orgs","repos_url":"https://api.github.com/users/jasonmalinowski/repos","events_url":"https://api.github.com/users/jasonmalinowski/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmalinowski/received_events","type":"User","site_admin":false},"body":"Is there a bug tracking this we can put in a comment here?","created_at":"2017-06-16T19:41:59Z","updated_at":"2017-06-16T19:41:59Z","html_url":"https://github.com/dotnet/roslyn/pull/20277#discussion_r122519113","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20277","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/122519113"},"html":{"href":"https://github.com/dotnet/roslyn/pull/20277#discussion_r122519113"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20277"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/20277","id":126097397,"html_url":"https://github.com/dotnet/roslyn/pull/20277","diff_url":"https://github.com/dotnet/roslyn/pull/20277.diff","patch_url":"https://github.com/dotnet/roslyn/pull/20277.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/20277","number":20277,"state":"open","locked":false,"title":"made diagnostic engine to verify span given to diagnostic from analyz…","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":"…ers. and added explicit check in tagger for out of range\r\n\r\n**Customer scenario**\r\n\r\nWhat does the customer do to get into this situation, and why do we think this\r\nis common enough to address for this release.  (Granted, sometimes this will be\r\nobvious \"Open project, VS crashes\" but in general, I need to understand how\r\ncommon a scenario is)\r\n\r\n**Bugs this fixes:**\r\n\r\n(either VSO or GitHub links)\r\n\r\n**Workarounds, if any**\r\n\r\nAlso, why we think they are insufficient for RC vs. RC2, RC3, or RTW\r\n\r\n**Risk**\r\n\r\nThis is generally a measure our how central the affected code is to adjacent\r\nscenarios and thus how likely your fix is to destabilize a broader area of code\r\n\r\n**Performance impact**\r\n\r\n(with a brief justification for that assessment (e.g. \"Low perf impact because no extra allocations/no complexity changes\" vs. \"Low\")\r\n\r\n**Is this a regression from a previous update?**\r\n\r\n**Root cause analysis:**\r\n\r\nHow did we miss it?  What tests are we adding to guard against it in the future?\r\n\r\n**How was the bug found?**\r\n\r\n(E.g. customer reported it vs. ad hoc testing)\r\n","created_at":"2017-06-16T19:15:05Z","updated_at":"2017-06-16T19:41:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d61cc7d5a48f8103711650a057f61cee7a476bb1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20277/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20277/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/20277/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/85f198b665f3b56cb7f91e7c3bf747d48a2c339d","head":{"label":"heejaechang:OORange","ref":"OORange","sha":"85f198b665f3b56cb7f91e7c3bf747d48a2c339d","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},"repo":{"id":30170221,"name":"roslyn","full_name":"heejaechang/roslyn","owner":{"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},"private":false,"html_url":"https://github.com/heejaechang/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/heejaechang/roslyn","forks_url":"https://api.github.com/repos/heejaechang/roslyn/forks","keys_url":"https://api.github.com/repos/heejaechang/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heejaechang/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heejaechang/roslyn/teams","hooks_url":"https://api.github.com/repos/heejaechang/roslyn/hooks","issue_events_url":"https://api.github.com/repos/heejaechang/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/heejaechang/roslyn/events","assignees_url":"https://api.github.com/repos/heejaechang/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/heejaechang/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/heejaechang/roslyn/tags","blobs_url":"https://api.github.com/repos/heejaechang/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heejaechang/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heejaechang/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/heejaechang/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heejaechang/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/heejaechang/roslyn/languages","stargazers_url":"https://api.github.com/repos/heejaechang/roslyn/stargazers","contributors_url":"https://api.github.com/repos/heejaechang/roslyn/contributors","subscribers_url":"https://api.github.com/repos/heejaechang/roslyn/subscribers","subscription_url":"https://api.github.com/repos/heejaechang/roslyn/subscription","commits_url":"https://api.github.com/repos/heejaechang/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/heejaechang/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/heejaechang/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/heejaechang/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/heejaechang/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/heejaechang/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heejaechang/roslyn/merges","archive_url":"https://api.github.com/repos/heejaechang/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heejaechang/roslyn/downloads","issues_url":"https://api.github.com/repos/heejaechang/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/heejaechang/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/heejaechang/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/heejaechang/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heejaechang/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/heejaechang/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/heejaechang/roslyn/deployments","created_at":"2015-02-02T03:54:43Z","updated_at":"2016-03-09T20:46:51Z","pushed_at":"2017-06-16T19:20:44Z","git_url":"git://github.com/heejaechang/roslyn.git","ssh_url":"git@github.com:heejaechang/roslyn.git","clone_url":"https://github.com/heejaechang/roslyn.git","svn_url":"https://github.com/heejaechang/roslyn","homepage":"","size":209243,"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":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":"33296a186ee2743e6fd2dc70f98cb2dca784dc22","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-16T12:49:13Z","pushed_at":"2017-06-16T19:35:33Z","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":215653,"stargazers_count":7641,"watchers_count":7641,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1872,"mirror_url":null,"open_issues_count":3722,"forks":1872,"open_issues":3722,"watchers":7641,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20277"},"html":{"href":"https://github.com/dotnet/roslyn/pull/20277"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/20277"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/20277/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20277/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20277/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/85f198b665f3b56cb7f91e7c3bf747d48a2c339d"}}}}
{"actor":{"display_login":"jasonmalinowski"}}