{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/comments/39559615","id":39559615,"diff_hunk":"@@ -336,11 +336,11 @@ let convTypeRefAux (cenv:cenv) (tref:ILTypeRef) =\n             | None ->\n                 let asmName    = convAssemblyRef asmref\n                 FileSystem.AssemblyLoad(asmName)\n-        let typT       = assembly.GetType(qualifiedName)\n+        let typT = assembly.GetType(qualifiedName, throwOnError=true)\n         typT |> nonNull \"convTypeRefAux\" \n     | ILScopeRef.Module _ \n     | ILScopeRef.Local _ ->\n-        let typT = Type.GetType(qualifiedName,true) \n+        let typT = Type.GetType(qualifiedName, throwOnError=true) \n         typT |> nonNull \"convTypeRefAux\" ","path":"src/absil/ilreflect.fs","position":11,"original_position":11,"commit_id":"f05d45e91e38184d0ab99e59fde505d80eb92c60","original_commit_id":"f05d45e91e38184d0ab99e59fde505d80eb92c60","user":{"login":"dungpa","id":941060,"avatar_url":"https://avatars.githubusercontent.com/u/941060?v=3","gravatar_id":"","url":"https://api.github.com/users/dungpa","html_url":"https://github.com/dungpa","followers_url":"https://api.github.com/users/dungpa/followers","following_url":"https://api.github.com/users/dungpa/following{/other_user}","gists_url":"https://api.github.com/users/dungpa/gists{/gist_id}","starred_url":"https://api.github.com/users/dungpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dungpa/subscriptions","organizations_url":"https://api.github.com/users/dungpa/orgs","repos_url":"https://api.github.com/users/dungpa/repos","events_url":"https://api.github.com/users/dungpa/events{/privacy}","received_events_url":"https://api.github.com/users/dungpa/received_events","type":"User","site_admin":false},"body":"It might not be needed anymore. Here is the confusing bit from the link you cite:\r\n\r\n> GetType only works on assemblies loaded from disk. If you call GetType to look up a type defined in a dynamic assembly defined using the System.Reflection.Emit services, you might get inconsistent behavior. The behavior depends on whether the dynamic assembly is persistent, that is, created using the RunAndSave or Save access modes of the System.Reflection.Emit.AssemblyBuilderAccess enumeration. If the dynamic assembly is persistent and has been written to disk before GetType is called, the loader finds the saved assembly on disk, loads that assembly, and retrieves the type from that assembly. If the assembly has not been saved to disk when GetType is called, the method returns null. GetType does not understand transient dynamic assemblies; therefore, calling GetType to retrieve a type in a transient dynamic assembly returns null.\r\n\r\nReading the source, I'm not entirely sure the method never returns `null`.\r\n\r\nhttp://referencesource.microsoft.com/#mscorlib/system/reflection/assembly.cs,1454\r\n\r\nSo to be on the safe side, I still left the null check there.","created_at":"2015-09-15T20:21:56Z","updated_at":"2015-09-15T20:21:56Z","html_url":"https://github.com/Microsoft/visualfsharp/pull/626#discussion_r39559615","pull_request_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/626","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/comments/39559615"},"html":{"href":"https://github.com/Microsoft/visualfsharp/pull/626#discussion_r39559615"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/626"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/626","id":44605225,"html_url":"https://github.com/Microsoft/visualfsharp/pull/626","diff_url":"https://github.com/Microsoft/visualfsharp/pull/626.diff","patch_url":"https://github.com/Microsoft/visualfsharp/pull/626.patch","issue_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/626","number":626,"state":"open","locked":false,"title":"Don't suppress missing FSI transitive references","user":{"login":"dungpa","id":941060,"avatar_url":"https://avatars.githubusercontent.com/u/941060?v=3","gravatar_id":"","url":"https://api.github.com/users/dungpa","html_url":"https://github.com/dungpa","followers_url":"https://api.github.com/users/dungpa/followers","following_url":"https://api.github.com/users/dungpa/following{/other_user}","gists_url":"https://api.github.com/users/dungpa/gists{/gist_id}","starred_url":"https://api.github.com/users/dungpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dungpa/subscriptions","organizations_url":"https://api.github.com/users/dungpa/orgs","repos_url":"https://api.github.com/users/dungpa/repos","events_url":"https://api.github.com/users/dungpa/events{/privacy}","received_events_url":"https://api.github.com/users/dungpa/received_events","type":"User","site_admin":false},"body":"Close https://github.com/Microsoft/visualfsharp/issues/509.\r\n\r\nUse `throwOnError` option so that missing reference exception is propagated correctly to the top level.","created_at":"2015-09-09T21:52:19Z","updated_at":"2015-09-15T20:21:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3706c098e874f2013a057dd52e7e19ac0b99f41b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/626/commits","review_comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/626/comments","review_comment_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/626/comments","statuses_url":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/f05d45e91e38184d0ab99e59fde505d80eb92c60","head":{"label":"dungpa:missing-fsi-ref","ref":"missing-fsi-ref","sha":"f05d45e91e38184d0ab99e59fde505d80eb92c60","user":{"login":"dungpa","id":941060,"avatar_url":"https://avatars.githubusercontent.com/u/941060?v=3","gravatar_id":"","url":"https://api.github.com/users/dungpa","html_url":"https://github.com/dungpa","followers_url":"https://api.github.com/users/dungpa/followers","following_url":"https://api.github.com/users/dungpa/following{/other_user}","gists_url":"https://api.github.com/users/dungpa/gists{/gist_id}","starred_url":"https://api.github.com/users/dungpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dungpa/subscriptions","organizations_url":"https://api.github.com/users/dungpa/orgs","repos_url":"https://api.github.com/users/dungpa/repos","events_url":"https://api.github.com/users/dungpa/events{/privacy}","received_events_url":"https://api.github.com/users/dungpa/received_events","type":"User","site_admin":false},"repo":{"id":29215748,"name":"visualfsharp","full_name":"dungpa/visualfsharp","owner":{"login":"dungpa","id":941060,"avatar_url":"https://avatars.githubusercontent.com/u/941060?v=3","gravatar_id":"","url":"https://api.github.com/users/dungpa","html_url":"https://github.com/dungpa","followers_url":"https://api.github.com/users/dungpa/followers","following_url":"https://api.github.com/users/dungpa/following{/other_user}","gists_url":"https://api.github.com/users/dungpa/gists{/gist_id}","starred_url":"https://api.github.com/users/dungpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dungpa/subscriptions","organizations_url":"https://api.github.com/users/dungpa/orgs","repos_url":"https://api.github.com/users/dungpa/repos","events_url":"https://api.github.com/users/dungpa/events{/privacy}","received_events_url":"https://api.github.com/users/dungpa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dungpa/visualfsharp","description":"The Visual F# compiler and tools","fork":true,"url":"https://api.github.com/repos/dungpa/visualfsharp","forks_url":"https://api.github.com/repos/dungpa/visualfsharp/forks","keys_url":"https://api.github.com/repos/dungpa/visualfsharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dungpa/visualfsharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dungpa/visualfsharp/teams","hooks_url":"https://api.github.com/repos/dungpa/visualfsharp/hooks","issue_events_url":"https://api.github.com/repos/dungpa/visualfsharp/issues/events{/number}","events_url":"https://api.github.com/repos/dungpa/visualfsharp/events","assignees_url":"https://api.github.com/repos/dungpa/visualfsharp/assignees{/user}","branches_url":"https://api.github.com/repos/dungpa/visualfsharp/branches{/branch}","tags_url":"https://api.github.com/repos/dungpa/visualfsharp/tags","blobs_url":"https://api.github.com/repos/dungpa/visualfsharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dungpa/visualfsharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dungpa/visualfsharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/dungpa/visualfsharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dungpa/visualfsharp/statuses/{sha}","languages_url":"https://api.github.com/repos/dungpa/visualfsharp/languages","stargazers_url":"https://api.github.com/repos/dungpa/visualfsharp/stargazers","contributors_url":"https://api.github.com/repos/dungpa/visualfsharp/contributors","subscribers_url":"https://api.github.com/repos/dungpa/visualfsharp/subscribers","subscription_url":"https://api.github.com/repos/dungpa/visualfsharp/subscription","commits_url":"https://api.github.com/repos/dungpa/visualfsharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/dungpa/visualfsharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/dungpa/visualfsharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/dungpa/visualfsharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/dungpa/visualfsharp/contents/{+path}","compare_url":"https://api.github.com/repos/dungpa/visualfsharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dungpa/visualfsharp/merges","archive_url":"https://api.github.com/repos/dungpa/visualfsharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dungpa/visualfsharp/downloads","issues_url":"https://api.github.com/repos/dungpa/visualfsharp/issues{/number}","pulls_url":"https://api.github.com/repos/dungpa/visualfsharp/pulls{/number}","milestones_url":"https://api.github.com/repos/dungpa/visualfsharp/milestones{/number}","notifications_url":"https://api.github.com/repos/dungpa/visualfsharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dungpa/visualfsharp/labels{/name}","releases_url":"https://api.github.com/repos/dungpa/visualfsharp/releases{/id}","created_at":"2015-01-13T22:56:24Z","updated_at":"2015-02-20T19:42:30Z","pushed_at":"2015-09-11T21:37:17Z","git_url":"git://github.com/dungpa/visualfsharp.git","ssh_url":"git@github.com:dungpa/visualfsharp.git","clone_url":"https://github.com/dungpa/visualfsharp.git","svn_url":"https://github.com/dungpa/visualfsharp","homepage":null,"size":51431,"stargazers_count":0,"watchers_count":0,"language":"F#","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":"fsharp4"}},"base":{"label":"Microsoft:master","ref":"master","sha":"9157d60b574484d3900f82d1eff76808e96637ce","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":29048891,"name":"visualfsharp","full_name":"Microsoft/visualfsharp","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/visualfsharp","description":"The Visual F# compiler and tools","fork":false,"url":"https://api.github.com/repos/Microsoft/visualfsharp","forks_url":"https://api.github.com/repos/Microsoft/visualfsharp/forks","keys_url":"https://api.github.com/repos/Microsoft/visualfsharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/visualfsharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/visualfsharp/teams","hooks_url":"https://api.github.com/repos/Microsoft/visualfsharp/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/visualfsharp/events","assignees_url":"https://api.github.com/repos/Microsoft/visualfsharp/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/visualfsharp/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/visualfsharp/tags","blobs_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/visualfsharp/languages","stargazers_url":"https://api.github.com/repos/Microsoft/visualfsharp/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/visualfsharp/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/visualfsharp/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/visualfsharp/subscription","commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/visualfsharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/visualfsharp/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/visualfsharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/visualfsharp/merges","archive_url":"https://api.github.com/repos/Microsoft/visualfsharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/visualfsharp/downloads","issues_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/visualfsharp/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/visualfsharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/visualfsharp/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/visualfsharp/releases{/id}","created_at":"2015-01-10T05:58:43Z","updated_at":"2015-09-15T16:40:57Z","pushed_at":"2015-09-15T03:54:29Z","git_url":"git://github.com/Microsoft/visualfsharp.git","ssh_url":"git@github.com:Microsoft/visualfsharp.git","clone_url":"https://github.com/Microsoft/visualfsharp.git","svn_url":"https://github.com/Microsoft/visualfsharp","homepage":null,"size":65092,"stargazers_count":533,"watchers_count":533,"language":"F#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":177,"forks":110,"open_issues":177,"watchers":533,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/626"},"html":{"href":"https://github.com/Microsoft/visualfsharp/pull/626"},"issue":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/issues/626"},"comments":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/issues/626/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/626/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/626/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/visualfsharp/statuses/f05d45e91e38184d0ab99e59fde505d80eb92c60"}}}}