{"action":"opened","number":207,"pull_request":{"url":"https://api.github.com/repos/japaric/svd2rust/pulls/207","id":185610882,"html_url":"https://github.com/japaric/svd2rust/pull/207","diff_url":"https://github.com/japaric/svd2rust/pull/207.diff","patch_url":"https://github.com/japaric/svd2rust/pull/207.patch","issue_url":"https://api.github.com/repos/japaric/svd2rust/issues/207","number":207,"state":"open","locked":false,"title":"Revert PR 201 \"Expose internals to lib\"","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars3.githubusercontent.com/u/5018213?v=4","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"body":"This reverts commit 93148049b56d15af3a1f598d1df7ad120ef8449e.\r\n\r\nI'd rather not make this API public; it forces semver on us and we would have to bump the minor\r\nversion more often. For example, we would have to bump the minor version whenever we change the API\r\nof `generate::{interrupt,..,register}::render`, which happens to be a pretty big API surface as it\r\nincludes structs from the `svd` and the `syn` crates so if we (minor version) bump any of those\r\ndependencies then we have to bump the minor version of `svd2rust` as well.\r\n\r\nAlso the more often we bump minor versions the more work we give to device crate authors: now when\r\nthey re-generate their device crates they have to check if the minor version actually broke the\r\ngenerated API or if it just was due to change in the API of `svd2rust`, the library.\r\n\r\nIf we want to expose some API to turn SVD files into Rust code in build scripts (which I think it's\r\na bad idea (\\*)) we should expose a single function that takes a string in (the SVD file) and\r\nreturns a string (the Rust code).\r\n\r\n(\\*) It forces all your users (both direct and indirect) to (re-)build `svd2rust` (which\r\ntakes non trivial amount of time) for *every* one of their Cargo projects that depends on your\r\ncrate. And for no gain whatsoever because the output of `svd2rust` depends only on the input SVD and\r\nnot on the build environment (unlike say running `bindgen` on C headers installed in `/usr`) so it's\r\njust a waste of CPU cycles. It's better to cache the output of `svd2rust` in the device crate, IMO.\r\n\r\nr? @Emilgardis \r\ncc @dfrankland ","created_at":"2018-05-03T03:40:42Z","updated_at":"2018-05-03T03:40:42Z","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/japaric/svd2rust/pulls/207/commits","review_comments_url":"https://api.github.com/repos/japaric/svd2rust/pulls/207/comments","review_comment_url":"https://api.github.com/repos/japaric/svd2rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/japaric/svd2rust/issues/207/comments","statuses_url":"https://api.github.com/repos/japaric/svd2rust/statuses/1d1f41ba264c8b37350aad753532bdf53dd00f0f","head":{"label":"japaric:revert-pr201","ref":"revert-pr201","sha":"1d1f41ba264c8b37350aad753532bdf53dd00f0f","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars3.githubusercontent.com/u/5018213?v=4","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"repo":{"id":70371776,"name":"svd2rust","full_name":"japaric/svd2rust","owner":{"login":"japaric","id":5018213,"avatar_url":"https://avatars3.githubusercontent.com/u/5018213?v=4","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/japaric/svd2rust","description":"Generate Rust register maps (`struct`s) from SVD files","fork":false,"url":"https://api.github.com/repos/japaric/svd2rust","forks_url":"https://api.github.com/repos/japaric/svd2rust/forks","keys_url":"https://api.github.com/repos/japaric/svd2rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/japaric/svd2rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/japaric/svd2rust/teams","hooks_url":"https://api.github.com/repos/japaric/svd2rust/hooks","issue_events_url":"https://api.github.com/repos/japaric/svd2rust/issues/events{/number}","events_url":"https://api.github.com/repos/japaric/svd2rust/events","assignees_url":"https://api.github.com/repos/japaric/svd2rust/assignees{/user}","branches_url":"https://api.github.com/repos/japaric/svd2rust/branches{/branch}","tags_url":"https://api.github.com/repos/japaric/svd2rust/tags","blobs_url":"https://api.github.com/repos/japaric/svd2rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/japaric/svd2rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/japaric/svd2rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/japaric/svd2rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/japaric/svd2rust/statuses/{sha}","languages_url":"https://api.github.com/repos/japaric/svd2rust/languages","stargazers_url":"https://api.github.com/repos/japaric/svd2rust/stargazers","contributors_url":"https://api.github.com/repos/japaric/svd2rust/contributors","subscribers_url":"https://api.github.com/repos/japaric/svd2rust/subscribers","subscription_url":"https://api.github.com/repos/japaric/svd2rust/subscription","commits_url":"https://api.github.com/repos/japaric/svd2rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/japaric/svd2rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/japaric/svd2rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/japaric/svd2rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/japaric/svd2rust/contents/{+path}","compare_url":"https://api.github.com/repos/japaric/svd2rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/japaric/svd2rust/merges","archive_url":"https://api.github.com/repos/japaric/svd2rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/japaric/svd2rust/downloads","issues_url":"https://api.github.com/repos/japaric/svd2rust/issues{/number}","pulls_url":"https://api.github.com/repos/japaric/svd2rust/pulls{/number}","milestones_url":"https://api.github.com/repos/japaric/svd2rust/milestones{/number}","notifications_url":"https://api.github.com/repos/japaric/svd2rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/japaric/svd2rust/labels{/name}","releases_url":"https://api.github.com/repos/japaric/svd2rust/releases{/id}","deployments_url":"https://api.github.com/repos/japaric/svd2rust/deployments","created_at":"2016-10-09T02:47:52Z","updated_at":"2018-05-02T08:51:59Z","pushed_at":"2018-05-03T03:39:08Z","git_url":"git://github.com/japaric/svd2rust.git","ssh_url":"git@github.com:japaric/svd2rust.git","clone_url":"https://github.com/japaric/svd2rust.git","svn_url":"https://github.com/japaric/svd2rust","homepage":null,"size":1113,"stargazers_count":136,"watchers_count":136,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":54,"open_issues":41,"watchers":136,"default_branch":"master"}},"base":{"label":"japaric:master","ref":"master","sha":"38550c2e58b2106579043f4c28a15744c900cb11","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars3.githubusercontent.com/u/5018213?v=4","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"repo":{"id":70371776,"name":"svd2rust","full_name":"japaric/svd2rust","owner":{"login":"japaric","id":5018213,"avatar_url":"https://avatars3.githubusercontent.com/u/5018213?v=4","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/japaric/svd2rust","description":"Generate Rust register maps (`struct`s) from SVD files","fork":false,"url":"https://api.github.com/repos/japaric/svd2rust","forks_url":"https://api.github.com/repos/japaric/svd2rust/forks","keys_url":"https://api.github.com/repos/japaric/svd2rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/japaric/svd2rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/japaric/svd2rust/teams","hooks_url":"https://api.github.com/repos/japaric/svd2rust/hooks","issue_events_url":"https://api.github.com/repos/japaric/svd2rust/issues/events{/number}","events_url":"https://api.github.com/repos/japaric/svd2rust/events","assignees_url":"https://api.github.com/repos/japaric/svd2rust/assignees{/user}","branches_url":"https://api.github.com/repos/japaric/svd2rust/branches{/branch}","tags_url":"https://api.github.com/repos/japaric/svd2rust/tags","blobs_url":"https://api.github.com/repos/japaric/svd2rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/japaric/svd2rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/japaric/svd2rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/japaric/svd2rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/japaric/svd2rust/statuses/{sha}","languages_url":"https://api.github.com/repos/japaric/svd2rust/languages","stargazers_url":"https://api.github.com/repos/japaric/svd2rust/stargazers","contributors_url":"https://api.github.com/repos/japaric/svd2rust/contributors","subscribers_url":"https://api.github.com/repos/japaric/svd2rust/subscribers","subscription_url":"https://api.github.com/repos/japaric/svd2rust/subscription","commits_url":"https://api.github.com/repos/japaric/svd2rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/japaric/svd2rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/japaric/svd2rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/japaric/svd2rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/japaric/svd2rust/contents/{+path}","compare_url":"https://api.github.com/repos/japaric/svd2rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/japaric/svd2rust/merges","archive_url":"https://api.github.com/repos/japaric/svd2rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/japaric/svd2rust/downloads","issues_url":"https://api.github.com/repos/japaric/svd2rust/issues{/number}","pulls_url":"https://api.github.com/repos/japaric/svd2rust/pulls{/number}","milestones_url":"https://api.github.com/repos/japaric/svd2rust/milestones{/number}","notifications_url":"https://api.github.com/repos/japaric/svd2rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/japaric/svd2rust/labels{/name}","releases_url":"https://api.github.com/repos/japaric/svd2rust/releases{/id}","deployments_url":"https://api.github.com/repos/japaric/svd2rust/deployments","created_at":"2016-10-09T02:47:52Z","updated_at":"2018-05-02T08:51:59Z","pushed_at":"2018-05-03T03:39:08Z","git_url":"git://github.com/japaric/svd2rust.git","ssh_url":"git@github.com:japaric/svd2rust.git","clone_url":"https://github.com/japaric/svd2rust.git","svn_url":"https://github.com/japaric/svd2rust","homepage":null,"size":1113,"stargazers_count":136,"watchers_count":136,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":54,"open_issues":41,"watchers":136,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/japaric/svd2rust/pulls/207"},"html":{"href":"https://github.com/japaric/svd2rust/pull/207"},"issue":{"href":"https://api.github.com/repos/japaric/svd2rust/issues/207"},"comments":{"href":"https://api.github.com/repos/japaric/svd2rust/issues/207/comments"},"review_comments":{"href":"https://api.github.com/repos/japaric/svd2rust/pulls/207/comments"},"review_comment":{"href":"https://api.github.com/repos/japaric/svd2rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/japaric/svd2rust/pulls/207/commits"},"statuses":{"href":"https://api.github.com/repos/japaric/svd2rust/statuses/1d1f41ba264c8b37350aad753532bdf53dd00f0f"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":8,"deletions":28,"changed_files":3}}
{"actor":{"display_login":"japaric"}}