{"action":"created","issue":{"url":"https://api.github.com/repos/jdiaz5513/capnp-ts/issues/78","repository_url":"https://api.github.com/repos/jdiaz5513/capnp-ts","labels_url":"https://api.github.com/repos/jdiaz5513/capnp-ts/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/jdiaz5513/capnp-ts/issues/78/comments","events_url":"https://api.github.com/repos/jdiaz5513/capnp-ts/issues/78/events","html_url":"https://github.com/jdiaz5513/capnp-ts/issues/78","id":273562404,"number":78,"title":"capnp schema version mismatch","user":{"login":"smoreinis","id":1139653,"avatar_url":"https://avatars2.githubusercontent.com/u/1139653?v=4","gravatar_id":"","url":"https://api.github.com/users/smoreinis","html_url":"https://github.com/smoreinis","followers_url":"https://api.github.com/users/smoreinis/followers","following_url":"https://api.github.com/users/smoreinis/following{/other_user}","gists_url":"https://api.github.com/users/smoreinis/gists{/gist_id}","starred_url":"https://api.github.com/users/smoreinis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smoreinis/subscriptions","organizations_url":"https://api.github.com/users/smoreinis/orgs","repos_url":"https://api.github.com/users/smoreinis/repos","events_url":"https://api.github.com/users/smoreinis/events{/privacy}","received_events_url":"https://api.github.com/users/smoreinis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-13T20:13:32Z","updated_at":"2017-11-15T05:26:30Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\nI've got a question about how capnp-ts deals with fields being added to the underlying capnp schema. \r\nI had a struct with two fields (a text field and a pointer to another struct), which was part of a larger message that I serialized into bytes using the capnp-ts library. \r\nI then added two more (text) fields at the end of this struct (with tags 2 and 3), regenerated the .capnp.js implementations, and tried to read these new fields from the previously serialized bytes.\r\n\r\nThe result was \r\n```Error: CAPNP-TS024 Attempted to convert pointer Pointer_1@0x00000020,[f4 ff ff ff 00 00 04 00],limit:0x7ffffffa to a 1 type.```\r\nand digging into it a little bit more it seemed like https://github.com/jdiaz5513/capnp-ts/blob/master/packages/capnp-ts/src/serialization/pointers/pointer.ts#L895 was getting a pointer type of 0 when it was expecting a pointer type of 1.\r\n\r\nI see that https://github.com/jdiaz5513/capnp-ts/blob/master/packages/capnp-ts/src/serialization/pointers/struct.ts#L603 acknowledges the struct size mismatch might happen, but to the best of my understanding the `\"hole\" of zeroes in the message` also zeroes out the pointer types which causes validation to fail if any other pointer type is expected.\r\n\r\nPlease let me know if there's any more information that would be helpful here or if there's a better way to deal with this situation.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/jdiaz5513/capnp-ts/issues/comments/344489749","html_url":"https://github.com/jdiaz5513/capnp-ts/issues/78#issuecomment-344489749","issue_url":"https://api.github.com/repos/jdiaz5513/capnp-ts/issues/78","id":344489749,"user":{"login":"jdiaz5513","id":2752359,"avatar_url":"https://avatars2.githubusercontent.com/u/2752359?v=4","gravatar_id":"","url":"https://api.github.com/users/jdiaz5513","html_url":"https://github.com/jdiaz5513","followers_url":"https://api.github.com/users/jdiaz5513/followers","following_url":"https://api.github.com/users/jdiaz5513/following{/other_user}","gists_url":"https://api.github.com/users/jdiaz5513/gists{/gist_id}","starred_url":"https://api.github.com/users/jdiaz5513/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdiaz5513/subscriptions","organizations_url":"https://api.github.com/users/jdiaz5513/orgs","repos_url":"https://api.github.com/users/jdiaz5513/repos","events_url":"https://api.github.com/users/jdiaz5513/events{/privacy}","received_events_url":"https://api.github.com/users/jdiaz5513/received_events","type":"User","site_admin":false},"created_at":"2017-11-15T05:26:30Z","updated_at":"2017-11-15T05:26:30Z","author_association":"OWNER","body":"Can you attach the following:\r\n\r\n- first version of capnp file\r\n- second (failing) version of capnp file\r\n- dumped message\r\n\r\nPlease scrub any potentially sensitive information.\r\n"}}
{"actor":{"display_login":"jdiaz5513"}}