Title: Using code-generation to generate · Issue #70 · nodegit/nodegit · GitHub
Open Graph Title: Using code-generation to generate · Issue #70 · nodegit/nodegit
X Title: Using code-generation to generate · Issue #70 · nodegit/nodegit
Description: I have made some breaking API changes on my branch. This is a WIP, but I'm showing early to get feedback early. nkallen@458e080 I'm investigating code generation instead of manually writing bindings libgit2. This branch code-gen's an eas...
Open Graph Description: I have made some breaking API changes on my branch. This is a WIP, but I'm showing early to get feedback early. nkallen@458e080 I'm investigating code generation instead of manually writing binding...
X Description: I have made some breaking API changes on my branch. This is a WIP, but I'm showing early to get feedback early. nkallen@458e080 I'm investigating code generation instead of manually writing...
Opengraph URL: https://github.com/nodegit/nodegit/issues/70
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using code-generation to generate ","articleBody":"I have made some breaking API changes on my branch. This is a WIP, but I'm showing early to get feedback early.\n\nhttps://github.com/nkallen/nodegit/commit/458e08079a8089ba9a75f5046fc4d2b173164f3e\n\nI'm investigating code generation instead of manually writing bindings libgit2. This branch code-gen's an easy class, `GitOid`, from a JSON description of the libgit2 interface. The JSON is based on the data from here, http://libgit2.github.com/libgit2/v0.18.0.json, but highly modified\n\nIN THEORY you just mark methods as \"async\", \"prototype\", \"constructor\", etc. and it will \"just work\". It works for `GitOid`, all tests pass.\n\nThe new interface for the raw `Oid` is what I described:\n\n```\nvar oid = git.raw.Oid.fromString(\"SHA1\")\noid.sha() = ...\n```\n\nThis API change has repercussions, changing some APIs to sync from async, as in `Commit`. ATM, the API is inconsistent, as `Reference`'s `sha()` method is still async, because of indirect references. However, I propose to change the api to have have an `IndirectReference` class and a `DirectReference` class, with `IndirectReference` only having a `resolve()` method, and `sha()` being synchronous on DirectReference.\n\nIt is no longer possible to construct a raw `Oid` from scratch, as it would be in an invalid state; and further objects are now immutable.\n\nAlong the way I've identified what I believe to be memory leaks. I'm hoping to have the code-gen produce code without these leaks, if they are indeed real.\n","author":{"url":"https://github.com/nkallen","@type":"Person","name":"nkallen"},"datePublished":"2013-06-19T22:27:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":34},"url":"https://github.com/70/nodegit/issues/70"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:197c1076-f742-9877-52c9-5611df4df1ed |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C59A:2AE2E2:3482176:443D8AE:6A5CE6CF |
| html-safe-nonce | 482bbc1c8c138d66f1ea968536eb77853e3482b9aadb818487947edf4fdab053 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTlBOjJBRTJFMjozNDgyMTc2OjQ0M0Q4QUU6NkE1Q0U2Q0YiLCJ2aXNpdG9yX2lkIjoiODMyNzE4MDU4OTI0MzA5ODgzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 668178168faaa1080f82b7633133943878305df07fe9f3407de86c1fda5363fd |
| hovercard-subject-tag | issue:15772109 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodegit/nodegit/70/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7d7ba9f58f33b1b36c7a1ca4bd5e61c149945b5f05276f90faba3e71d430550f/nodegit/nodegit/issues/70 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7d7ba9f58f33b1b36c7a1ca4bd5e61c149945b5f05276f90faba3e71d430550f/nodegit/nodegit/issues/70 |
| og:image:alt | I have made some breaking API changes on my branch. This is a WIP, but I'm showing early to get feedback early. nkallen@458e080 I'm investigating code generation instead of manually writing binding... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nkallen |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width