{"action":"opened","number":2764,"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/2764","id":47379082,"html_url":"https://github.com/chapel-lang/chapel/pull/2764","diff_url":"https://github.com/chapel-lang/chapel/pull/2764.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/2764.patch","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2764","number":2764,"state":"open","locked":false,"title":"Check for resolveFns() error in addArgCoercion()","user":{"login":"vasslitvinov","id":8039635,"avatar_url":"https://avatars.githubusercontent.com/u/8039635?v=3","gravatar_id":"","url":"https://api.github.com/users/vasslitvinov","html_url":"https://github.com/vasslitvinov","followers_url":"https://api.github.com/users/vasslitvinov/followers","following_url":"https://api.github.com/users/vasslitvinov/following{/other_user}","gists_url":"https://api.github.com/users/vasslitvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/vasslitvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasslitvinov/subscriptions","organizations_url":"https://api.github.com/users/vasslitvinov/orgs","repos_url":"https://api.github.com/users/vasslitvinov/repos","events_url":"https://api.github.com/users/vasslitvinov/events{/privacy}","received_events_url":"https://api.github.com/users/vasslitvinov/received_events","type":"User","site_admin":false},"body":"The standard way to resolve a newly-created call has been:\r\n\r\n  resolveCall(call);\r\n  if (call->isResolved())\r\n    resolveFns(call->isResolved());\r\n\r\nwhich is what has been in addArgCoercion() for a while.\r\n\r\nHowever, if the function that resolveFns() is invoked on\r\ncontains a resolution error e.g. \"unresolved call\",\r\nresolveFns() may set tryError and unset FLAG_RESOLVED\r\nin that FnSymbol:\r\n\r\n  if (tryFailure) {\r\n    fn->removeFlag(FLAG_RESOLVED);\r\n    return;\r\n  }\r\n\r\nNo diagnostics gets printed out until downstream,\r\nwhen resolve() notices that tryError is set.\r\nThe resulting error message is likely not helpful.\r\n\r\nTo observe such behavior, check out string-as-rec branch as of\r\n  4866894\r\naka\r\n  48668944ec590bb650129d0f3ca99b5c7fe3395a\r\n\r\nand uncomment Lines 1323, 1324 in modules/internal/String.chpl\r\nto have:\r\n\r\n  if cs.locale_id != chpl_nodeID then\r\n    halt(\"Cannot cast a remote c_string to string.\");\r\n\r\nHere, .locale_id is invalid on 'cs', which is a c_string.\r\n\r\nWithout this PR, we get the following e.g. on hello6:\r\n\r\n  String.chpl:1320: error: unable to resolve return type of function '_cast'\r\n  LocaleModel.chpl:170: error: called recursively at this point\r\n\r\nwhereas there are no recursive calls in sight.\r\n\r\nI added a check in addArgCoercion() for FLAG_RESOLVED.\r\nEven so, the specific expression that caused tryFailure\r\nis not available any more, so all I can do is to point\r\nto the function in which that happened. So we get:\r\n\r\n  LocaleModel.chpl:170: error: Error resolving a cast from c_string_copy to string\r\n  String.chpl:1320: note:   the troublesome function is here\r\n","created_at":"2015-10-12T00:17:35Z","updated_at":"2015-10-12T00:17:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/2764/commits","review_comments_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/2764/comments","review_comment_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2764/comments","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/784b9a48e6c38a6c3fea0bf09e17adc8316a8c91","head":{"label":"vasslitvinov:check-for-resolveFns()-error-in-addArgCoercion()","ref":"check-for-resolveFns()-error-in-addArgCoercion()","sha":"784b9a48e6c38a6c3fea0bf09e17adc8316a8c91","user":{"login":"vasslitvinov","id":8039635,"avatar_url":"https://avatars.githubusercontent.com/u/8039635?v=3","gravatar_id":"","url":"https://api.github.com/users/vasslitvinov","html_url":"https://github.com/vasslitvinov","followers_url":"https://api.github.com/users/vasslitvinov/followers","following_url":"https://api.github.com/users/vasslitvinov/following{/other_user}","gists_url":"https://api.github.com/users/vasslitvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/vasslitvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasslitvinov/subscriptions","organizations_url":"https://api.github.com/users/vasslitvinov/orgs","repos_url":"https://api.github.com/users/vasslitvinov/repos","events_url":"https://api.github.com/users/vasslitvinov/events{/privacy}","received_events_url":"https://api.github.com/users/vasslitvinov/received_events","type":"User","site_admin":false},"repo":{"id":21914674,"name":"chapel","full_name":"vasslitvinov/chapel","owner":{"login":"vasslitvinov","id":8039635,"avatar_url":"https://avatars.githubusercontent.com/u/8039635?v=3","gravatar_id":"","url":"https://api.github.com/users/vasslitvinov","html_url":"https://github.com/vasslitvinov","followers_url":"https://api.github.com/users/vasslitvinov/followers","following_url":"https://api.github.com/users/vasslitvinov/following{/other_user}","gists_url":"https://api.github.com/users/vasslitvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/vasslitvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasslitvinov/subscriptions","organizations_url":"https://api.github.com/users/vasslitvinov/orgs","repos_url":"https://api.github.com/users/vasslitvinov/repos","events_url":"https://api.github.com/users/vasslitvinov/events{/privacy}","received_events_url":"https://api.github.com/users/vasslitvinov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vasslitvinov/chapel","description":"a Productive Parallel Programming Language","fork":true,"url":"https://api.github.com/repos/vasslitvinov/chapel","forks_url":"https://api.github.com/repos/vasslitvinov/chapel/forks","keys_url":"https://api.github.com/repos/vasslitvinov/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vasslitvinov/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vasslitvinov/chapel/teams","hooks_url":"https://api.github.com/repos/vasslitvinov/chapel/hooks","issue_events_url":"https://api.github.com/repos/vasslitvinov/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/vasslitvinov/chapel/events","assignees_url":"https://api.github.com/repos/vasslitvinov/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/vasslitvinov/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/vasslitvinov/chapel/tags","blobs_url":"https://api.github.com/repos/vasslitvinov/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vasslitvinov/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vasslitvinov/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/vasslitvinov/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vasslitvinov/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/vasslitvinov/chapel/languages","stargazers_url":"https://api.github.com/repos/vasslitvinov/chapel/stargazers","contributors_url":"https://api.github.com/repos/vasslitvinov/chapel/contributors","subscribers_url":"https://api.github.com/repos/vasslitvinov/chapel/subscribers","subscription_url":"https://api.github.com/repos/vasslitvinov/chapel/subscription","commits_url":"https://api.github.com/repos/vasslitvinov/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/vasslitvinov/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/vasslitvinov/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/vasslitvinov/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/vasslitvinov/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/vasslitvinov/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vasslitvinov/chapel/merges","archive_url":"https://api.github.com/repos/vasslitvinov/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vasslitvinov/chapel/downloads","issues_url":"https://api.github.com/repos/vasslitvinov/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/vasslitvinov/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/vasslitvinov/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/vasslitvinov/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vasslitvinov/chapel/labels{/name}","releases_url":"https://api.github.com/repos/vasslitvinov/chapel/releases{/id}","created_at":"2014-07-16T19:46:44Z","updated_at":"2015-08-25T21:15:43Z","pushed_at":"2015-10-12T00:16:16Z","git_url":"git://github.com/vasslitvinov/chapel.git","ssh_url":"git@github.com:vasslitvinov/chapel.git","clone_url":"https://github.com/vasslitvinov/chapel.git","svn_url":"https://github.com/vasslitvinov/chapel","homepage":"http://chapel.cray.com/","size":304031,"stargazers_count":1,"watchers_count":1,"language":"Chapel","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"chapel-lang:master","ref":"master","sha":"66b50370738a29d15b954fb9de7b3354002d4195","user":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=3","gravatar_id":"","url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":21663285,"name":"chapel","full_name":"chapel-lang/chapel","owner":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=3","gravatar_id":"","url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chapel-lang/chapel","description":"a Productive Parallel Programming Language","fork":false,"url":"https://api.github.com/repos/chapel-lang/chapel","forks_url":"https://api.github.com/repos/chapel-lang/chapel/forks","keys_url":"https://api.github.com/repos/chapel-lang/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chapel-lang/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chapel-lang/chapel/teams","hooks_url":"https://api.github.com/repos/chapel-lang/chapel/hooks","issue_events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/chapel-lang/chapel/events","assignees_url":"https://api.github.com/repos/chapel-lang/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/chapel-lang/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/chapel-lang/chapel/tags","blobs_url":"https://api.github.com/repos/chapel-lang/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chapel-lang/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chapel-lang/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/chapel-lang/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/chapel-lang/chapel/languages","stargazers_url":"https://api.github.com/repos/chapel-lang/chapel/stargazers","contributors_url":"https://api.github.com/repos/chapel-lang/chapel/contributors","subscribers_url":"https://api.github.com/repos/chapel-lang/chapel/subscribers","subscription_url":"https://api.github.com/repos/chapel-lang/chapel/subscription","commits_url":"https://api.github.com/repos/chapel-lang/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/chapel-lang/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/chapel-lang/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/chapel-lang/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chapel-lang/chapel/merges","archive_url":"https://api.github.com/repos/chapel-lang/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chapel-lang/chapel/downloads","issues_url":"https://api.github.com/repos/chapel-lang/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/chapel-lang/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/chapel-lang/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/chapel-lang/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chapel-lang/chapel/labels{/name}","releases_url":"https://api.github.com/repos/chapel-lang/chapel/releases{/id}","created_at":"2014-07-09T18:15:54Z","updated_at":"2015-10-11T18:34:57Z","pushed_at":"2015-10-11T00:21:53Z","git_url":"git://github.com/chapel-lang/chapel.git","ssh_url":"git@github.com:chapel-lang/chapel.git","clone_url":"https://github.com/chapel-lang/chapel.git","svn_url":"https://github.com/chapel-lang/chapel","homepage":"http://chapel.cray.com/","size":488951,"stargazers_count":147,"watchers_count":147,"language":"Chapel","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":12,"forks":53,"open_issues":12,"watchers":147,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/2764"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/2764"},"issue":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/2764"},"comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/2764/comments"},"review_comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/2764/comments"},"review_comment":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/2764/commits"},"statuses":{"href":"https://api.github.com/repos/chapel-lang/chapel/statuses/784b9a48e6c38a6c3fea0bf09e17adc8316a8c91"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":17,"deletions":2,"changed_files":1}}