{"action":"closed","number":969,"pull_request":{"url":"https://api.github.com/repos/erlang/otp/pulls/969","id":59672385,"html_url":"https://github.com/erlang/otp/pull/969","diff_url":"https://github.com/erlang/otp/pull/969.diff","patch_url":"https://github.com/erlang/otp/pull/969.patch","issue_url":"https://api.github.com/repos/erlang/otp/issues/969","number":969,"state":"closed","locked":false,"title":"FIX reverting optional_callbacks in erl_syntax","user":{"login":"soranoba","id":4954289,"avatar_url":"https://avatars.githubusercontent.com/u/4954289?v=3","gravatar_id":"","url":"https://api.github.com/users/soranoba","html_url":"https://github.com/soranoba","followers_url":"https://api.github.com/users/soranoba/followers","following_url":"https://api.github.com/users/soranoba/following{/other_user}","gists_url":"https://api.github.com/users/soranoba/gists{/gist_id}","starred_url":"https://api.github.com/users/soranoba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soranoba/subscriptions","organizations_url":"https://api.github.com/users/soranoba/orgs","repos_url":"https://api.github.com/users/soranoba/repos","events_url":"https://api.github.com/users/soranoba/events{/privacy}","received_events_url":"https://api.github.com/users/soranoba/received_events","type":"User","site_admin":false},"body":"Now, we can not get the correct result, when we use parse_transform to the module that use optional_callbacks.\r\n\r\ne.g.\r\nUse two modules.\r\n- [cth_readable_transform](https://github.com/ferd/cth_readable/blob/master/src/cth_readable_transform.erl)\r\n- [spam_behaviour](https://gist.github.com/soranoba/f204516cad4b97d80ee5)\r\n\r\n```erlang\r\n1> compile:file(\"spam_behaviour.erl\", []).\r\n{ok,spam_behaviour}\r\n2> spam_behaviour:module_info().\r\n[{module,spam_behaviour},\r\n {exports,[{behaviour_info,1},\r\n           {module_info,0},\r\n           {module_info,1}]},\r\n {attributes,[{vsn,[35725444967346471917509995781393807706]},\r\n              {optional_callbacks,[{b,0}]},\r\n              {callback,[{{a,0},\r\n                          [{type,[5],\r\n                                 'fun',\r\n                                 [{type,[5],product,[]},{atom,[5],ok}]}]}]},\r\n              {callback,[{{b,0},\r\n                          [{type,[6],\r\n                                 'fun',\r\n                                 [{type,[6],product,[]},{atom,[6],ok}]}]}]}]},\r\n {compile,[{options,[]},\r\n           {version,\"6.0.2\"},\r\n           {time,{2016,2,17,16,2,33}},\r\n           {source,\"/home/skyplace/Documents/cth_readable/spam_behaviour.erl\"}]},\r\n {native,false},\r\n {md5,<<26,224,120,109,179,171,34,105,102,224,155,14,46,\r\n        128,249,90>>}]\r\n```\r\n\r\n```erlang\r\n1> compile:file(\"spam_behaviour.erl\", [{parse_transform, cth_readable_transform}]).\r\n{ok,spam_behaviour}\r\n2> spam_behaviour:module_info().\r\n[{module,spam_behaviour},\r\n {exports,[{behaviour_info,1},\r\n           {module_info,0},\r\n           {module_info,1}]},\r\n {attributes,[{vsn,[80889456943641145268189515282482762837]},\r\n              {optional_callbacks,[{{atom,0,b},{integer,0,0}}]}, %% what happened !?\r\n              {callback,[{{a,0},\r\n                          [{type,[5],\r\n                                 'fun',\r\n                                 [{type,[5],product,[]},{atom,[5],ok}]}]}]},\r\n              {callback,[{{b,0},\r\n                          [{type,[6],\r\n                                 'fun',\r\n                                 [{type,[6],product,[]},{atom,[6],ok}]}]}]}]},\r\n {compile,[{options,[{parse_transform,cth_readable_transform}]},\r\n           {version,\"6.0.2\"},\r\n           {time,{2016,2,17,16,4,45}},\r\n           {source,\"/home/skyplace/Documents/cth_readable/spam_behaviour.erl\"}]},\r\n {native,false},\r\n {md5,<<60,218,190,35,163,106,215,32,242,82,31,162,66,52,\r\n        148,85>>}]\r\n```\r\n\r\nI fix this.","created_at":"2016-02-17T16:45:15Z","updated_at":"2016-05-09T08:14:17Z","closed_at":"2016-05-09T08:14:17Z","merged_at":null,"merge_commit_sha":"983b84ded0971dbdf7499d8c12238077e06d33e9","assignee":{"login":"uabboli","id":133709,"avatar_url":"https://avatars.githubusercontent.com/u/133709?v=3","gravatar_id":"","url":"https://api.github.com/users/uabboli","html_url":"https://github.com/uabboli","followers_url":"https://api.github.com/users/uabboli/followers","following_url":"https://api.github.com/users/uabboli/following{/other_user}","gists_url":"https://api.github.com/users/uabboli/gists{/gist_id}","starred_url":"https://api.github.com/users/uabboli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uabboli/subscriptions","organizations_url":"https://api.github.com/users/uabboli/orgs","repos_url":"https://api.github.com/users/uabboli/repos","events_url":"https://api.github.com/users/uabboli/events{/privacy}","received_events_url":"https://api.github.com/users/uabboli/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/erlang/otp/pulls/969/commits","review_comments_url":"https://api.github.com/repos/erlang/otp/pulls/969/comments","review_comment_url":"https://api.github.com/repos/erlang/otp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/erlang/otp/issues/969/comments","statuses_url":"https://api.github.com/repos/erlang/otp/statuses/0de7b43b70baf99747c432832546d54a0c507f5e","head":{"label":"soranoba:erl_syntax-optional_callbacks","ref":"erl_syntax-optional_callbacks","sha":"0de7b43b70baf99747c432832546d54a0c507f5e","user":{"login":"soranoba","id":4954289,"avatar_url":"https://avatars.githubusercontent.com/u/4954289?v=3","gravatar_id":"","url":"https://api.github.com/users/soranoba","html_url":"https://github.com/soranoba","followers_url":"https://api.github.com/users/soranoba/followers","following_url":"https://api.github.com/users/soranoba/following{/other_user}","gists_url":"https://api.github.com/users/soranoba/gists{/gist_id}","starred_url":"https://api.github.com/users/soranoba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soranoba/subscriptions","organizations_url":"https://api.github.com/users/soranoba/orgs","repos_url":"https://api.github.com/users/soranoba/repos","events_url":"https://api.github.com/users/soranoba/events{/privacy}","received_events_url":"https://api.github.com/users/soranoba/received_events","type":"User","site_admin":false},"repo":{"id":32161057,"name":"otp","full_name":"soranoba/otp","owner":{"login":"soranoba","id":4954289,"avatar_url":"https://avatars.githubusercontent.com/u/4954289?v=3","gravatar_id":"","url":"https://api.github.com/users/soranoba","html_url":"https://github.com/soranoba","followers_url":"https://api.github.com/users/soranoba/followers","following_url":"https://api.github.com/users/soranoba/following{/other_user}","gists_url":"https://api.github.com/users/soranoba/gists{/gist_id}","starred_url":"https://api.github.com/users/soranoba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soranoba/subscriptions","organizations_url":"https://api.github.com/users/soranoba/orgs","repos_url":"https://api.github.com/users/soranoba/repos","events_url":"https://api.github.com/users/soranoba/events{/privacy}","received_events_url":"https://api.github.com/users/soranoba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soranoba/otp","description":"Erlang/OTP","fork":true,"url":"https://api.github.com/repos/soranoba/otp","forks_url":"https://api.github.com/repos/soranoba/otp/forks","keys_url":"https://api.github.com/repos/soranoba/otp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soranoba/otp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soranoba/otp/teams","hooks_url":"https://api.github.com/repos/soranoba/otp/hooks","issue_events_url":"https://api.github.com/repos/soranoba/otp/issues/events{/number}","events_url":"https://api.github.com/repos/soranoba/otp/events","assignees_url":"https://api.github.com/repos/soranoba/otp/assignees{/user}","branches_url":"https://api.github.com/repos/soranoba/otp/branches{/branch}","tags_url":"https://api.github.com/repos/soranoba/otp/tags","blobs_url":"https://api.github.com/repos/soranoba/otp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soranoba/otp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soranoba/otp/git/refs{/sha}","trees_url":"https://api.github.com/repos/soranoba/otp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soranoba/otp/statuses/{sha}","languages_url":"https://api.github.com/repos/soranoba/otp/languages","stargazers_url":"https://api.github.com/repos/soranoba/otp/stargazers","contributors_url":"https://api.github.com/repos/soranoba/otp/contributors","subscribers_url":"https://api.github.com/repos/soranoba/otp/subscribers","subscription_url":"https://api.github.com/repos/soranoba/otp/subscription","commits_url":"https://api.github.com/repos/soranoba/otp/commits{/sha}","git_commits_url":"https://api.github.com/repos/soranoba/otp/git/commits{/sha}","comments_url":"https://api.github.com/repos/soranoba/otp/comments{/number}","issue_comment_url":"https://api.github.com/repos/soranoba/otp/issues/comments{/number}","contents_url":"https://api.github.com/repos/soranoba/otp/contents/{+path}","compare_url":"https://api.github.com/repos/soranoba/otp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soranoba/otp/merges","archive_url":"https://api.github.com/repos/soranoba/otp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soranoba/otp/downloads","issues_url":"https://api.github.com/repos/soranoba/otp/issues{/number}","pulls_url":"https://api.github.com/repos/soranoba/otp/pulls{/number}","milestones_url":"https://api.github.com/repos/soranoba/otp/milestones{/number}","notifications_url":"https://api.github.com/repos/soranoba/otp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soranoba/otp/labels{/name}","releases_url":"https://api.github.com/repos/soranoba/otp/releases{/id}","deployments_url":"https://api.github.com/repos/soranoba/otp/deployments","created_at":"2015-03-13T14:39:49Z","updated_at":"2015-03-13T14:40:24Z","pushed_at":"2016-02-17T16:33:49Z","git_url":"git://github.com/soranoba/otp.git","ssh_url":"git@github.com:soranoba/otp.git","clone_url":"https://github.com/soranoba/otp.git","svn_url":"https://github.com/soranoba/otp","homepage":"http://erlang.org","size":145554,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":false,"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":"maint"}},"base":{"label":"erlang:maint","ref":"maint","sha":"8f178301f36ac2061688c3a9729109326ef84441","user":{"login":"erlang","id":153393,"avatar_url":"https://avatars.githubusercontent.com/u/153393?v=3","gravatar_id":"","url":"https://api.github.com/users/erlang","html_url":"https://github.com/erlang","followers_url":"https://api.github.com/users/erlang/followers","following_url":"https://api.github.com/users/erlang/following{/other_user}","gists_url":"https://api.github.com/users/erlang/gists{/gist_id}","starred_url":"https://api.github.com/users/erlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlang/subscriptions","organizations_url":"https://api.github.com/users/erlang/orgs","repos_url":"https://api.github.com/users/erlang/repos","events_url":"https://api.github.com/users/erlang/events{/privacy}","received_events_url":"https://api.github.com/users/erlang/received_events","type":"Organization","site_admin":false},"repo":{"id":374927,"name":"otp","full_name":"erlang/otp","owner":{"login":"erlang","id":153393,"avatar_url":"https://avatars.githubusercontent.com/u/153393?v=3","gravatar_id":"","url":"https://api.github.com/users/erlang","html_url":"https://github.com/erlang","followers_url":"https://api.github.com/users/erlang/followers","following_url":"https://api.github.com/users/erlang/following{/other_user}","gists_url":"https://api.github.com/users/erlang/gists{/gist_id}","starred_url":"https://api.github.com/users/erlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlang/subscriptions","organizations_url":"https://api.github.com/users/erlang/orgs","repos_url":"https://api.github.com/users/erlang/repos","events_url":"https://api.github.com/users/erlang/events{/privacy}","received_events_url":"https://api.github.com/users/erlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/erlang/otp","description":"Erlang/OTP","fork":false,"url":"https://api.github.com/repos/erlang/otp","forks_url":"https://api.github.com/repos/erlang/otp/forks","keys_url":"https://api.github.com/repos/erlang/otp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erlang/otp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erlang/otp/teams","hooks_url":"https://api.github.com/repos/erlang/otp/hooks","issue_events_url":"https://api.github.com/repos/erlang/otp/issues/events{/number}","events_url":"https://api.github.com/repos/erlang/otp/events","assignees_url":"https://api.github.com/repos/erlang/otp/assignees{/user}","branches_url":"https://api.github.com/repos/erlang/otp/branches{/branch}","tags_url":"https://api.github.com/repos/erlang/otp/tags","blobs_url":"https://api.github.com/repos/erlang/otp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erlang/otp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erlang/otp/git/refs{/sha}","trees_url":"https://api.github.com/repos/erlang/otp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erlang/otp/statuses/{sha}","languages_url":"https://api.github.com/repos/erlang/otp/languages","stargazers_url":"https://api.github.com/repos/erlang/otp/stargazers","contributors_url":"https://api.github.com/repos/erlang/otp/contributors","subscribers_url":"https://api.github.com/repos/erlang/otp/subscribers","subscription_url":"https://api.github.com/repos/erlang/otp/subscription","commits_url":"https://api.github.com/repos/erlang/otp/commits{/sha}","git_commits_url":"https://api.github.com/repos/erlang/otp/git/commits{/sha}","comments_url":"https://api.github.com/repos/erlang/otp/comments{/number}","issue_comment_url":"https://api.github.com/repos/erlang/otp/issues/comments{/number}","contents_url":"https://api.github.com/repos/erlang/otp/contents/{+path}","compare_url":"https://api.github.com/repos/erlang/otp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erlang/otp/merges","archive_url":"https://api.github.com/repos/erlang/otp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erlang/otp/downloads","issues_url":"https://api.github.com/repos/erlang/otp/issues{/number}","pulls_url":"https://api.github.com/repos/erlang/otp/pulls{/number}","milestones_url":"https://api.github.com/repos/erlang/otp/milestones{/number}","notifications_url":"https://api.github.com/repos/erlang/otp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erlang/otp/labels{/name}","releases_url":"https://api.github.com/repos/erlang/otp/releases{/id}","deployments_url":"https://api.github.com/repos/erlang/otp/deployments","created_at":"2009-11-16T17:17:57Z","updated_at":"2016-05-08T13:42:50Z","pushed_at":"2016-05-09T06:48:13Z","git_url":"git://github.com/erlang/otp.git","ssh_url":"git@github.com:erlang/otp.git","clone_url":"https://github.com/erlang/otp.git","svn_url":"https://github.com/erlang/otp","homepage":"http://erlang.org","size":206991,"stargazers_count":4483,"watchers_count":4483,"language":"Erlang","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":1308,"mirror_url":null,"open_issues_count":46,"forks":1308,"open_issues":46,"watchers":4483,"default_branch":"maint"}},"_links":{"self":{"href":"https://api.github.com/repos/erlang/otp/pulls/969"},"html":{"href":"https://github.com/erlang/otp/pull/969"},"issue":{"href":"https://api.github.com/repos/erlang/otp/issues/969"},"comments":{"href":"https://api.github.com/repos/erlang/otp/issues/969/comments"},"review_comments":{"href":"https://api.github.com/repos/erlang/otp/pulls/969/comments"},"review_comment":{"href":"https://api.github.com/repos/erlang/otp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/erlang/otp/pulls/969/commits"},"statuses":{"href":"https://api.github.com/repos/erlang/otp/statuses/0de7b43b70baf99747c432832546d54a0c507f5e"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":7,"review_comments":0,"commits":1,"additions":19,"deletions":6,"changed_files":2}}