{"action":"opened","number":40,"pull_request":{"url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls/40","id":174661039,"html_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree/pull/40","diff_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree/pull/40.diff","patch_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree/pull/40.patch","issue_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues/40","number":40,"state":"open","locked":false,"title":"Use the generic ppx driver support of Dune","user":{"login":"diml","id":1251584,"avatar_url":"https://avatars1.githubusercontent.com/u/1251584?v=4","gravatar_id":"","url":"https://api.github.com/users/diml","html_url":"https://github.com/diml","followers_url":"https://api.github.com/users/diml/followers","following_url":"https://api.github.com/users/diml/following{/other_user}","gists_url":"https://api.github.com/users/diml/gists{/gist_id}","starred_url":"https://api.github.com/users/diml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diml/subscriptions","organizations_url":"https://api.github.com/users/diml/orgs","repos_url":"https://api.github.com/users/diml/repos","events_url":"https://api.github.com/users/diml/events{/privacy}","received_events_url":"https://api.github.com/users/diml/received_events","type":"User","site_admin":false},"body":"This feature is part of a larger work to remove the hard-coded knowledge of various ppx projects in Dune: https://github.com/ocaml/dune/pull/576\r\n\r\nDune can link custom ppx drivers on demand. Currently, it hard-codes the fact that ocaml-migrate-parsetree and ppx_driver provide entry points for such drivers. This is not very satisfactory and it forces changes to the system to be synchronized between the various projects, which is painful.\r\n\r\nStarting from Jbuilder 1.0+beta20, individual libraries will be able to declare themselves as ppx drivers and Dune will use this information to decide what driver to use and how to use it, i.e. what flags to pass it. One can declare that a library is a ppx driver by adding a `ppx.driver` field to the library stanza:\r\n\r\n```scheme\r\n(ppx.driver\r\n ((main       Migrate_parsetree.Driver.run_main)\r\n  (flags      (--dump-ast))\r\n  (lint_flags (--null))))\r\n```\r\n\r\nWe are doing this change in two steps: in Jbuilder 1.0+beta19 which is being released, the `ppx.driver` field is accepted and ignored. In Jbuilder 1.0+beta20, it will be used and Jbuilder will now longer have hard-coded knowledge of ocaml-migrate-parsetree and ppx_driver.\r\n\r\nThis PR adds the `ppx.driver` field to `src/jbuild` and bumps the version constraint on Dune to Jbuilder 1.0+beta19.\r\n\r\nAdditionally, in the new system ppx_driver will automatically be selected as soon as one uses a ppx_driver based rewriter. As a result we need ppx_driver to accept all the command line flags accepted by the ocaml-migrate-parsetree driver. To do that, we need to retreive the command line arguments that where registered with the omp driver by individual rewriters. This PR adds functions to do that.\r\n","created_at":"2018-03-13T13:34:07Z","updated_at":"2018-03-13T13:34:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls/40/commits","review_comments_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls/40/comments","review_comment_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues/40/comments","statuses_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/statuses/9dcc455d05b8c54c53eba0378e608e882c64e209","head":{"label":"ocaml-ppx:generic-ppx-driver","ref":"generic-ppx-driver","sha":"9dcc455d05b8c54c53eba0378e608e882c64e209","user":{"login":"ocaml-ppx","id":31065556,"avatar_url":"https://avatars2.githubusercontent.com/u/31065556?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml-ppx","html_url":"https://github.com/ocaml-ppx","followers_url":"https://api.github.com/users/ocaml-ppx/followers","following_url":"https://api.github.com/users/ocaml-ppx/following{/other_user}","gists_url":"https://api.github.com/users/ocaml-ppx/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml-ppx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml-ppx/subscriptions","organizations_url":"https://api.github.com/users/ocaml-ppx/orgs","repos_url":"https://api.github.com/users/ocaml-ppx/repos","events_url":"https://api.github.com/users/ocaml-ppx/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml-ppx/received_events","type":"Organization","site_admin":false},"repo":{"id":78046911,"name":"ocaml-migrate-parsetree","full_name":"ocaml-ppx/ocaml-migrate-parsetree","owner":{"login":"ocaml-ppx","id":31065556,"avatar_url":"https://avatars2.githubusercontent.com/u/31065556?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml-ppx","html_url":"https://github.com/ocaml-ppx","followers_url":"https://api.github.com/users/ocaml-ppx/followers","following_url":"https://api.github.com/users/ocaml-ppx/following{/other_user}","gists_url":"https://api.github.com/users/ocaml-ppx/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml-ppx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml-ppx/subscriptions","organizations_url":"https://api.github.com/users/ocaml-ppx/orgs","repos_url":"https://api.github.com/users/ocaml-ppx/repos","events_url":"https://api.github.com/users/ocaml-ppx/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml-ppx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree","description":"Convert OCaml parsetrees between different major versions","fork":false,"url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree","forks_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/forks","keys_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/teams","hooks_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/hooks","issue_events_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/events","assignees_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/tags","blobs_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/languages","stargazers_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/stargazers","contributors_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/contributors","subscribers_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/subscribers","subscription_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/subscription","commits_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/merges","archive_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/downloads","issues_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/labels{/name}","releases_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/releases{/id}","deployments_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/deployments","created_at":"2017-01-04T19:38:42Z","updated_at":"2018-03-03T08:44:23Z","pushed_at":"2018-03-13T13:14:29Z","git_url":"git://github.com/ocaml-ppx/ocaml-migrate-parsetree.git","ssh_url":"git@github.com:ocaml-ppx/ocaml-migrate-parsetree.git","clone_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git","svn_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree","homepage":null,"size":561,"stargazers_count":41,"watchers_count":41,"language":"OCaml","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":12,"open_issues":3,"watchers":41,"default_branch":"master"}},"base":{"label":"ocaml-ppx:master","ref":"master","sha":"252a8129010f82c5e15a2b42c363f1fc66ef3389","user":{"login":"ocaml-ppx","id":31065556,"avatar_url":"https://avatars2.githubusercontent.com/u/31065556?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml-ppx","html_url":"https://github.com/ocaml-ppx","followers_url":"https://api.github.com/users/ocaml-ppx/followers","following_url":"https://api.github.com/users/ocaml-ppx/following{/other_user}","gists_url":"https://api.github.com/users/ocaml-ppx/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml-ppx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml-ppx/subscriptions","organizations_url":"https://api.github.com/users/ocaml-ppx/orgs","repos_url":"https://api.github.com/users/ocaml-ppx/repos","events_url":"https://api.github.com/users/ocaml-ppx/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml-ppx/received_events","type":"Organization","site_admin":false},"repo":{"id":78046911,"name":"ocaml-migrate-parsetree","full_name":"ocaml-ppx/ocaml-migrate-parsetree","owner":{"login":"ocaml-ppx","id":31065556,"avatar_url":"https://avatars2.githubusercontent.com/u/31065556?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml-ppx","html_url":"https://github.com/ocaml-ppx","followers_url":"https://api.github.com/users/ocaml-ppx/followers","following_url":"https://api.github.com/users/ocaml-ppx/following{/other_user}","gists_url":"https://api.github.com/users/ocaml-ppx/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml-ppx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml-ppx/subscriptions","organizations_url":"https://api.github.com/users/ocaml-ppx/orgs","repos_url":"https://api.github.com/users/ocaml-ppx/repos","events_url":"https://api.github.com/users/ocaml-ppx/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml-ppx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree","description":"Convert OCaml parsetrees between different major versions","fork":false,"url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree","forks_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/forks","keys_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/teams","hooks_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/hooks","issue_events_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/events","assignees_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/tags","blobs_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/languages","stargazers_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/stargazers","contributors_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/contributors","subscribers_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/subscribers","subscription_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/subscription","commits_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/merges","archive_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/downloads","issues_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/labels{/name}","releases_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/releases{/id}","deployments_url":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/deployments","created_at":"2017-01-04T19:38:42Z","updated_at":"2018-03-03T08:44:23Z","pushed_at":"2018-03-13T13:14:29Z","git_url":"git://github.com/ocaml-ppx/ocaml-migrate-parsetree.git","ssh_url":"git@github.com:ocaml-ppx/ocaml-migrate-parsetree.git","clone_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git","svn_url":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree","homepage":null,"size":561,"stargazers_count":41,"watchers_count":41,"language":"OCaml","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":12,"open_issues":3,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls/40"},"html":{"href":"https://github.com/ocaml-ppx/ocaml-migrate-parsetree/pull/40"},"issue":{"href":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues/40"},"comments":{"href":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/ocaml-ppx/ocaml-migrate-parsetree/statuses/9dcc455d05b8c54c53eba0378e608e882c64e209"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":23,"deletions":9,"changed_files":5}}
{"actor":{"display_login":"diml"}}