{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/335","labels_url":"https://api.github.com/repos/ocaml/ocaml/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/335/comments","events_url":"https://api.github.com/repos/ocaml/ocaml/issues/335/events","html_url":"https://github.com/ocaml/ocaml/pull/335","id":120673575,"number":335,"title":"Typing: unification error - warn about missing cmi","user":{"login":"hhugo","id":835209,"avatar_url":"https://avatars.githubusercontent.com/u/835209?v=3","gravatar_id":"","url":"https://api.github.com/users/hhugo","html_url":"https://github.com/hhugo","followers_url":"https://api.github.com/users/hhugo/followers","following_url":"https://api.github.com/users/hhugo/following{/other_user}","gists_url":"https://api.github.com/users/hhugo/gists{/gist_id}","starred_url":"https://api.github.com/users/hhugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhugo/subscriptions","organizations_url":"https://api.github.com/users/hhugo/orgs","repos_url":"https://api.github.com/users/hhugo/repos","events_url":"https://api.github.com/users/hhugo/events{/privacy}","received_events_url":"https://api.github.com/users/hhugo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-06T23:51:35Z","updated_at":"2015-12-08T13:27:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/335","html_url":"https://github.com/ocaml/ocaml/pull/335","diff_url":"https://github.com/ocaml/ocaml/pull/335.diff","patch_url":"https://github.com/ocaml/ocaml/pull/335.patch"},"body":"Warn when unification failed because cmi could not be found.\r\n```\r\n#cat subdir/m.ml\r\ntype a = int\r\ntype b = a\r\n\r\n#cat a.ml\r\nval (a : M.a) = 2\r\n\r\n#cat b.ml\r\nval (b : M.b) = 2\r\n\r\n#cat o.ml\r\nlet _ = A.a = B.b\r\n```\r\n\r\n```\r\nocamlc -c subdir/m.ml\r\nocamlc -c -I subdir a.ml\r\nocamlc -c -I subdir b.ml\r\nocamlc -c o.ml\r\n\r\nFile \"o.ml\", line 1, characters 14-17:\r\nError: This expression has type M.b but an expression was expected of type\r\n         M.a\r\n       M.b is abstract because no corresponding cmi file was found in path.\r\n       M.a is abstract because no corresponding cmi file was found in path.\r\n```\r\n\r\nTodo: add some test."},"comment":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/comments/162879279","html_url":"https://github.com/ocaml/ocaml/pull/335#issuecomment-162879279","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/335","id":162879279,"user":{"login":"hhugo","id":835209,"avatar_url":"https://avatars.githubusercontent.com/u/835209?v=3","gravatar_id":"","url":"https://api.github.com/users/hhugo","html_url":"https://github.com/hhugo","followers_url":"https://api.github.com/users/hhugo/followers","following_url":"https://api.github.com/users/hhugo/following{/other_user}","gists_url":"https://api.github.com/users/hhugo/gists{/gist_id}","starred_url":"https://api.github.com/users/hhugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhugo/subscriptions","organizations_url":"https://api.github.com/users/hhugo/orgs","repos_url":"https://api.github.com/users/hhugo/repos","events_url":"https://api.github.com/users/hhugo/events{/privacy}","received_events_url":"https://api.github.com/users/hhugo/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T13:27:10Z","updated_at":"2015-12-08T13:27:10Z","body":"It just gives extra information to understand an existing error. One doesn't have to make any assumption on whether this is intentional or not."}}