{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/356","labels_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/356/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/356/comments","events_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/356/events","html_url":"https://github.com/Microsoft/visualfsharp/pull/356","id":67563010,"number":356,"title":"Fix #337: skip interfaces-that-lie-outside-the-set-of-referenced-assemblies","user":{"login":"dsyme","id":7204669,"avatar_url":"https://avatars.githubusercontent.com/u/7204669?v=3","gravatar_id":"","url":"https://api.github.com/users/dsyme","html_url":"https://github.com/dsyme","followers_url":"https://api.github.com/users/dsyme/followers","following_url":"https://api.github.com/users/dsyme/following{/other_user}","gists_url":"https://api.github.com/users/dsyme/gists{/gist_id}","starred_url":"https://api.github.com/users/dsyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsyme/subscriptions","organizations_url":"https://api.github.com/users/dsyme/orgs","repos_url":"https://api.github.com/users/dsyme/repos","events_url":"https://api.github.com/users/dsyme/events{/privacy}","received_events_url":"https://api.github.com/users/dsyme/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/visualfsharp/labels/cla-not-required","name":"cla-not-required","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-10T10:25:31Z","updated_at":"2015-04-24T13:58:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/356","html_url":"https://github.com/Microsoft/visualfsharp/pull/356","diff_url":"https://github.com/Microsoft/visualfsharp/pull/356.diff","patch_url":"https://github.com/Microsoft/visualfsharp/pull/356.patch"},"body":"When the assembly reference set for the compilation is incomplete, some interfaces to types relevant to compilation may lie in assemblies outside the assembly reference set.  This applies particularly to private (\"internals visible to\") interfaces found in .NET assemblies.\r\n\r\nThis causes very substantial usability bugs in practice as various parts of type inference and other checking \"give up\" when you get this condition. The C# compiler doesn't give up in the same way.\r\n\r\nIn most cases it is reasonable to simply skip interfaces-that-lie-outside-the-set-of-referenced-assemblies during F# compilation.  Skipping unresolvable interfaces is pretty much harmless: any substantive analysis on the interface type (such as implementing it) will require the assembly holding the interface type.\r\n\r\nThere are some exceptions: if an interface I1 lies outside the referenceable set and you try to implement I2 inheriting from I1 then we'd better not skip I1.  Indeed if you even try to find the methods on I2 then we'd better not skip I1.  These are covered by \"FoldPrimaryHierarchyOfType\" in the code.\r\n\r\nI've tested this manually on the example in #337, though not added testing as part of this fix.  Constructing compilations with incomplete reference sets is a bit of a PITA - @latkin, do we have any of these compilations already?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/comments/95942304","html_url":"https://github.com/Microsoft/visualfsharp/pull/356#issuecomment-95942304","issue_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/356","id":95942304,"user":{"login":"dsyme","id":7204669,"avatar_url":"https://avatars.githubusercontent.com/u/7204669?v=3","gravatar_id":"","url":"https://api.github.com/users/dsyme","html_url":"https://github.com/dsyme","followers_url":"https://api.github.com/users/dsyme/followers","following_url":"https://api.github.com/users/dsyme/following{/other_user}","gists_url":"https://api.github.com/users/dsyme/gists{/gist_id}","starred_url":"https://api.github.com/users/dsyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsyme/subscriptions","organizations_url":"https://api.github.com/users/dsyme/orgs","repos_url":"https://api.github.com/users/dsyme/repos","events_url":"https://api.github.com/users/dsyme/events{/privacy}","received_events_url":"https://api.github.com/users/dsyme/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T13:58:06Z","updated_at":"2015-04-24T13:58:06Z","body":"I'm pretty sure that will still ask for the reference to be added.  "}}