{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1926","repository_url":"https://api.github.com/repos/Microsoft/visualfsharp","labels_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1926/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1926/comments","events_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1926/events","html_url":"https://github.com/Microsoft/visualfsharp/pull/1926","id":193279266,"number":1926,"title":"Do not throw exception if LanguageDebugInfoService.GetDataTipInfoAsync do not run to completion","user":{"login":"vasily-kirichenko","id":873919,"avatar_url":"https://avatars.githubusercontent.com/u/873919?v=3","gravatar_id":"","url":"https://api.github.com/users/vasily-kirichenko","html_url":"https://github.com/vasily-kirichenko","followers_url":"https://api.github.com/users/vasily-kirichenko/followers","following_url":"https://api.github.com/users/vasily-kirichenko/following{/other_user}","gists_url":"https://api.github.com/users/vasily-kirichenko/gists{/gist_id}","starred_url":"https://api.github.com/users/vasily-kirichenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasily-kirichenko/subscriptions","organizations_url":"https://api.github.com/users/vasily-kirichenko/orgs","repos_url":"https://api.github.com/users/vasily-kirichenko/repos","events_url":"https://api.github.com/users/vasily-kirichenko/events{/privacy}","received_events_url":"https://api.github.com/users/vasily-kirichenko/received_events","type":"User","site_admin":false},"labels":[{"id":197650126,"url":"https://api.github.com/repos/Microsoft/visualfsharp/labels/cla-already-signed","name":"cla-already-signed","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-03T10:26:27Z","updated_at":"2016-12-04T07:40:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/1926","html_url":"https://github.com/Microsoft/visualfsharp/pull/1926","diff_url":"https://github.com/Microsoft/visualfsharp/pull/1926.diff","patch_url":"https://github.com/Microsoft/visualfsharp/pull/1926.patch"},"body":"This fixes https://github.com/Microsoft/visualfsharp/issues/1915\r\n\r\nBasically, it turned out we should not (re) throw exceptions if the task has not run to completion. Previously, we ran the async computation with `StartAsyncAsTask` https://github.com/Microsoft/visualfsharp/blob/master/vsintegration/src/FSharp.Editor/CommonRoslynHelpers.fs#L31\r\n\r\n```fsharp\r\nlet GetCompletedTaskResult(task: Task<'TResult>) =\r\n        if task.Status = TaskStatus.RanToCompletion then\r\n            task.Result\r\n        else\r\n            Assert.Exception(task.Exception.GetBaseException())\r\n            raise(task.Exception.GetBaseException())\r\n\r\nlet StartAsyncAsTask cancellationToken computation =\r\n        Async.StartAsTask(computation, TaskCreationOptions.None, cancellationToken)\r\n             .ContinueWith(GetCompletedTaskResult, cancellationToken)\r\n```\r\nI'm not sure I understand why we have that `else` branch where we throw the base exception. Could anybody explain this? Should we remove it as it may cause other code misbehavior? "},"comment":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/comments/264689427","html_url":"https://github.com/Microsoft/visualfsharp/pull/1926#issuecomment-264689427","issue_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1926","id":264689427,"user":{"login":"vasily-kirichenko","id":873919,"avatar_url":"https://avatars.githubusercontent.com/u/873919?v=3","gravatar_id":"","url":"https://api.github.com/users/vasily-kirichenko","html_url":"https://github.com/vasily-kirichenko","followers_url":"https://api.github.com/users/vasily-kirichenko/followers","following_url":"https://api.github.com/users/vasily-kirichenko/following{/other_user}","gists_url":"https://api.github.com/users/vasily-kirichenko/gists{/gist_id}","starred_url":"https://api.github.com/users/vasily-kirichenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasily-kirichenko/subscriptions","organizations_url":"https://api.github.com/users/vasily-kirichenko/orgs","repos_url":"https://api.github.com/users/vasily-kirichenko/repos","events_url":"https://api.github.com/users/vasily-kirichenko/events{/privacy}","received_events_url":"https://api.github.com/users/vasily-kirichenko/received_events","type":"User","site_admin":false},"created_at":"2016-12-04T07:40:34Z","updated_at":"2016-12-04T07:40:34Z","body":"@dsyme Done. I've just removed `ContinueWith` and use async's `try..with` instead."}}
{"actor":{"display_login":"vasily-kirichenko"}}