{"action":"created","comment":{"url":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/comments/217740384","pull_request_review_id":155531532,"id":217740384,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzc0MDM4NA==","diff_hunk":"@@ -0,0 +1,108 @@\n+#pragma once\n+\n+#include <improbable/c_worker.h>\n+#include \"UniquePtr.h\"\n+\n+template <typename T>\n+class TSchemaOption","path":"Source/SpatialGDK/Public/Utils/SchemaOption.h","position":7,"original_position":7,"commit_id":"d003f1515743495f1175f2896b0856c44e86f940","original_commit_id":"d003f1515743495f1175f2896b0856c44e86f940","user":{"login":"danielimprobable","id":23195431,"node_id":"MDQ6VXNlcjIzMTk1NDMx","avatar_url":"https://avatars2.githubusercontent.com/u/23195431?v=4","gravatar_id":"","url":"https://api.github.com/users/danielimprobable","html_url":"https://github.com/danielimprobable","followers_url":"https://api.github.com/users/danielimprobable/followers","following_url":"https://api.github.com/users/danielimprobable/following{/other_user}","gists_url":"https://api.github.com/users/danielimprobable/gists{/gist_id}","starred_url":"https://api.github.com/users/danielimprobable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielimprobable/subscriptions","organizations_url":"https://api.github.com/users/danielimprobable/orgs","repos_url":"https://api.github.com/users/danielimprobable/repos","events_url":"https://api.github.com/users/danielimprobable/events{/privacy}","received_events_url":"https://api.github.com/users/danielimprobable/received_events","type":"User","site_admin":false},"body":"I would vote for putting this class in the improbable namespace and call it TOption","created_at":"2018-09-14T14:53:07Z","updated_at":"2018-09-14T14:53:10Z","html_url":"https://github.com/spatialos/UnrealGDK/pull/347#discussion_r217740384","pull_request_url":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/347","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/comments/217740384"},"html":{"href":"https://github.com/spatialos/UnrealGDK/pull/347#discussion_r217740384"},"pull_request":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/347"}}},"pull_request":{"url":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/347","id":215502242,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NTAyMjQy","html_url":"https://github.com/spatialos/UnrealGDK/pull/347","diff_url":"https://github.com/spatialos/UnrealGDK/pull/347.diff","patch_url":"https://github.com/spatialos/UnrealGDK/pull/347.patch","issue_url":"https://api.github.com/repos/spatialos/UnrealGDK/issues/347","number":347,"state":"open","locked":false,"title":"TSchemaOption Implementation","user":{"login":"Vatyx","id":7674163,"node_id":"MDQ6VXNlcjc2NzQxNjM=","avatar_url":"https://avatars1.githubusercontent.com/u/7674163?v=4","gravatar_id":"","url":"https://api.github.com/users/Vatyx","html_url":"https://github.com/Vatyx","followers_url":"https://api.github.com/users/Vatyx/followers","following_url":"https://api.github.com/users/Vatyx/following{/other_user}","gists_url":"https://api.github.com/users/Vatyx/gists{/gist_id}","starred_url":"https://api.github.com/users/Vatyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vatyx/subscriptions","organizations_url":"https://api.github.com/users/Vatyx/orgs","repos_url":"https://api.github.com/users/Vatyx/repos","events_url":"https://api.github.com/users/Vatyx/events{/privacy}","received_events_url":"https://api.github.com/users/Vatyx/received_events","type":"User","site_admin":false},"body":"#### Description\r\nThis PR introduces our own in-house GDK `Option` type called `TSchemaOption`, which will be used to represent `option` in schema types and components.\r\n\r\n**Why are we introducing our own type?**\r\n\r\nSince dynamic typebindings has let us completely switch over to the C API, we're trying to remove our dependency on the C++ worker SDK. `worker::Option` was one of the last places we were depending on it.\r\n\r\n**Why aren't we using `TOptional` which comes with Unreal?**\r\n\r\n`TOptional` would be great to use but unfortunately is implemented by holding an instance of `T` rather than a pointer to `T`. Which means a `TOptional` can't hold a type which has a `TOptional` of itself, which is exactly what UnrealObjectRef does so it's not suitable for our use case.\r\n\r\n**Why not use TUniquePtr?**\r\n\r\n`TUniquePtr` would satisfy all of the places `TSchemaOption` is used but is not great for readability or context. Using an explicit `Option` type makes it clear that not having a value is a valid state and that this type is the C++ analog to schema's `option` (Just like `TMap` representing `map` and `TArray` representing `list`).\r\n\r\n**How is TSchemaOption implemented?**\r\n\r\nIt's a mixture of `TOptional` and `worker::Option`. Definitely doesn't do anything fancy.\r\n\r\n**I don't like the name of it**\r\n\r\nSuggest another name!\r\n\r\n#### Primary reviewers\r\n@improbable-valentyn @davedissian ","created_at":"2018-09-14T07:17:20Z","updated_at":"2018-09-14T14:53:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cff369046768fc9d5d3a8ef7c66b7effe8eb85c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"davedissian","id":2639008,"node_id":"MDQ6VXNlcjI2MzkwMDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2639008?v=4","gravatar_id":"","url":"https://api.github.com/users/davedissian","html_url":"https://github.com/davedissian","followers_url":"https://api.github.com/users/davedissian/followers","following_url":"https://api.github.com/users/davedissian/following{/other_user}","gists_url":"https://api.github.com/users/davedissian/gists{/gist_id}","starred_url":"https://api.github.com/users/davedissian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davedissian/subscriptions","organizations_url":"https://api.github.com/users/davedissian/orgs","repos_url":"https://api.github.com/users/davedissian/repos","events_url":"https://api.github.com/users/davedissian/events{/privacy}","received_events_url":"https://api.github.com/users/davedissian/received_events","type":"User","site_admin":false},{"login":"girayimprobable","id":27704794,"node_id":"MDQ6VXNlcjI3NzA0Nzk0","avatar_url":"https://avatars1.githubusercontent.com/u/27704794?v=4","gravatar_id":"","url":"https://api.github.com/users/girayimprobable","html_url":"https://github.com/girayimprobable","followers_url":"https://api.github.com/users/girayimprobable/followers","following_url":"https://api.github.com/users/girayimprobable/following{/other_user}","gists_url":"https://api.github.com/users/girayimprobable/gists{/gist_id}","starred_url":"https://api.github.com/users/girayimprobable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girayimprobable/subscriptions","organizations_url":"https://api.github.com/users/girayimprobable/orgs","repos_url":"https://api.github.com/users/girayimprobable/repos","events_url":"https://api.github.com/users/girayimprobable/events{/privacy}","received_events_url":"https://api.github.com/users/girayimprobable/received_events","type":"User","site_admin":false},{"login":"improbable-valentyn","id":32096431,"node_id":"MDQ6VXNlcjMyMDk2NDMx","avatar_url":"https://avatars0.githubusercontent.com/u/32096431?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-valentyn","html_url":"https://github.com/improbable-valentyn","followers_url":"https://api.github.com/users/improbable-valentyn/followers","following_url":"https://api.github.com/users/improbable-valentyn/following{/other_user}","gists_url":"https://api.github.com/users/improbable-valentyn/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-valentyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-valentyn/subscriptions","organizations_url":"https://api.github.com/users/improbable-valentyn/orgs","repos_url":"https://api.github.com/users/improbable-valentyn/repos","events_url":"https://api.github.com/users/improbable-valentyn/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-valentyn/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1002330437,"node_id":"MDU6TGFiZWwxMDAyMzMwNDM3","url":"https://api.github.com/repos/spatialos/UnrealGDK/labels/size/M","name":"size/M","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/347/commits","review_comments_url":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/347/comments","review_comment_url":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spatialos/UnrealGDK/issues/347/comments","statuses_url":"https://api.github.com/repos/spatialos/UnrealGDK/statuses/d003f1515743495f1175f2896b0856c44e86f940","head":{"label":"spatialos:feature/remove-workerOption","ref":"feature/remove-workerOption","sha":"d003f1515743495f1175f2896b0856c44e86f940","user":{"login":"spatialos","id":23554165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTU0MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/23554165?v=4","gravatar_id":"","url":"https://api.github.com/users/spatialos","html_url":"https://github.com/spatialos","followers_url":"https://api.github.com/users/spatialos/followers","following_url":"https://api.github.com/users/spatialos/following{/other_user}","gists_url":"https://api.github.com/users/spatialos/gists{/gist_id}","starred_url":"https://api.github.com/users/spatialos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatialos/subscriptions","organizations_url":"https://api.github.com/users/spatialos/orgs","repos_url":"https://api.github.com/users/spatialos/repos","events_url":"https://api.github.com/users/spatialos/events{/privacy}","received_events_url":"https://api.github.com/users/spatialos/received_events","type":"Organization","site_admin":false},"repo":{"id":109980189,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk5ODAxODk=","name":"UnrealGDK","full_name":"spatialos/UnrealGDK","owner":{"login":"spatialos","id":23554165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTU0MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/23554165?v=4","gravatar_id":"","url":"https://api.github.com/users/spatialos","html_url":"https://github.com/spatialos","followers_url":"https://api.github.com/users/spatialos/followers","following_url":"https://api.github.com/users/spatialos/following{/other_user}","gists_url":"https://api.github.com/users/spatialos/gists{/gist_id}","starred_url":"https://api.github.com/users/spatialos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatialos/subscriptions","organizations_url":"https://api.github.com/users/spatialos/orgs","repos_url":"https://api.github.com/users/spatialos/repos","events_url":"https://api.github.com/users/spatialos/events{/privacy}","received_events_url":"https://api.github.com/users/spatialos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spatialos/UnrealGDK","description":null,"fork":false,"url":"https://api.github.com/repos/spatialos/UnrealGDK","forks_url":"https://api.github.com/repos/spatialos/UnrealGDK/forks","keys_url":"https://api.github.com/repos/spatialos/UnrealGDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spatialos/UnrealGDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spatialos/UnrealGDK/teams","hooks_url":"https://api.github.com/repos/spatialos/UnrealGDK/hooks","issue_events_url":"https://api.github.com/repos/spatialos/UnrealGDK/issues/events{/number}","events_url":"https://api.github.com/repos/spatialos/UnrealGDK/events","assignees_url":"https://api.github.com/repos/spatialos/UnrealGDK/assignees{/user}","branches_url":"https://api.github.com/repos/spatialos/UnrealGDK/branches{/branch}","tags_url":"https://api.github.com/repos/spatialos/UnrealGDK/tags","blobs_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spatialos/UnrealGDK/statuses/{sha}","languages_url":"https://api.github.com/repos/spatialos/UnrealGDK/languages","stargazers_url":"https://api.github.com/repos/spatialos/UnrealGDK/stargazers","contributors_url":"https://api.github.com/repos/spatialos/UnrealGDK/contributors","subscribers_url":"https://api.github.com/repos/spatialos/UnrealGDK/subscribers","subscription_url":"https://api.github.com/repos/spatialos/UnrealGDK/subscription","commits_url":"https://api.github.com/repos/spatialos/UnrealGDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/spatialos/UnrealGDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/spatialos/UnrealGDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/spatialos/UnrealGDK/contents/{+path}","compare_url":"https://api.github.com/repos/spatialos/UnrealGDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spatialos/UnrealGDK/merges","archive_url":"https://api.github.com/repos/spatialos/UnrealGDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spatialos/UnrealGDK/downloads","issues_url":"https://api.github.com/repos/spatialos/UnrealGDK/issues{/number}","pulls_url":"https://api.github.com/repos/spatialos/UnrealGDK/pulls{/number}","milestones_url":"https://api.github.com/repos/spatialos/UnrealGDK/milestones{/number}","notifications_url":"https://api.github.com/repos/spatialos/UnrealGDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spatialos/UnrealGDK/labels{/name}","releases_url":"https://api.github.com/repos/spatialos/UnrealGDK/releases{/id}","deployments_url":"https://api.github.com/repos/spatialos/UnrealGDK/deployments","created_at":"2017-11-08T13:35:16Z","updated_at":"2018-09-11T10:10:20Z","pushed_at":"2018-09-14T14:52:04Z","git_url":"git://github.com/spatialos/UnrealGDK.git","ssh_url":"git@github.com:spatialos/UnrealGDK.git","clone_url":"https://github.com/spatialos/UnrealGDK.git","svn_url":"https://github.com/spatialos/UnrealGDK","homepage":null,"size":57345,"stargazers_count":51,"watchers_count":51,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":8,"watchers":51,"default_branch":"master"}},"base":{"label":"spatialos:feature/dynamic-typebindings","ref":"feature/dynamic-typebindings","sha":"b93119f1c3aae59a6c5ef76a76304d8ae945d52d","user":{"login":"spatialos","id":23554165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTU0MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/23554165?v=4","gravatar_id":"","url":"https://api.github.com/users/spatialos","html_url":"https://github.com/spatialos","followers_url":"https://api.github.com/users/spatialos/followers","following_url":"https://api.github.com/users/spatialos/following{/other_user}","gists_url":"https://api.github.com/users/spatialos/gists{/gist_id}","starred_url":"https://api.github.com/users/spatialos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatialos/subscriptions","organizations_url":"https://api.github.com/users/spatialos/orgs","repos_url":"https://api.github.com/users/spatialos/repos","events_url":"https://api.github.com/users/spatialos/events{/privacy}","received_events_url":"https://api.github.com/users/spatialos/received_events","type":"Organization","site_admin":false},"repo":{"id":109980189,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk5ODAxODk=","name":"UnrealGDK","full_name":"spatialos/UnrealGDK","owner":{"login":"spatialos","id":23554165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTU0MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/23554165?v=4","gravatar_id":"","url":"https://api.github.com/users/spatialos","html_url":"https://github.com/spatialos","followers_url":"https://api.github.com/users/spatialos/followers","following_url":"https://api.github.com/users/spatialos/following{/other_user}","gists_url":"https://api.github.com/users/spatialos/gists{/gist_id}","starred_url":"https://api.github.com/users/spatialos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatialos/subscriptions","organizations_url":"https://api.github.com/users/spatialos/orgs","repos_url":"https://api.github.com/users/spatialos/repos","events_url":"https://api.github.com/users/spatialos/events{/privacy}","received_events_url":"https://api.github.com/users/spatialos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spatialos/UnrealGDK","description":null,"fork":false,"url":"https://api.github.com/repos/spatialos/UnrealGDK","forks_url":"https://api.github.com/repos/spatialos/UnrealGDK/forks","keys_url":"https://api.github.com/repos/spatialos/UnrealGDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spatialos/UnrealGDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spatialos/UnrealGDK/teams","hooks_url":"https://api.github.com/repos/spatialos/UnrealGDK/hooks","issue_events_url":"https://api.github.com/repos/spatialos/UnrealGDK/issues/events{/number}","events_url":"https://api.github.com/repos/spatialos/UnrealGDK/events","assignees_url":"https://api.github.com/repos/spatialos/UnrealGDK/assignees{/user}","branches_url":"https://api.github.com/repos/spatialos/UnrealGDK/branches{/branch}","tags_url":"https://api.github.com/repos/spatialos/UnrealGDK/tags","blobs_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spatialos/UnrealGDK/statuses/{sha}","languages_url":"https://api.github.com/repos/spatialos/UnrealGDK/languages","stargazers_url":"https://api.github.com/repos/spatialos/UnrealGDK/stargazers","contributors_url":"https://api.github.com/repos/spatialos/UnrealGDK/contributors","subscribers_url":"https://api.github.com/repos/spatialos/UnrealGDK/subscribers","subscription_url":"https://api.github.com/repos/spatialos/UnrealGDK/subscription","commits_url":"https://api.github.com/repos/spatialos/UnrealGDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/spatialos/UnrealGDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/spatialos/UnrealGDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/spatialos/UnrealGDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/spatialos/UnrealGDK/contents/{+path}","compare_url":"https://api.github.com/repos/spatialos/UnrealGDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spatialos/UnrealGDK/merges","archive_url":"https://api.github.com/repos/spatialos/UnrealGDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spatialos/UnrealGDK/downloads","issues_url":"https://api.github.com/repos/spatialos/UnrealGDK/issues{/number}","pulls_url":"https://api.github.com/repos/spatialos/UnrealGDK/pulls{/number}","milestones_url":"https://api.github.com/repos/spatialos/UnrealGDK/milestones{/number}","notifications_url":"https://api.github.com/repos/spatialos/UnrealGDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spatialos/UnrealGDK/labels{/name}","releases_url":"https://api.github.com/repos/spatialos/UnrealGDK/releases{/id}","deployments_url":"https://api.github.com/repos/spatialos/UnrealGDK/deployments","created_at":"2017-11-08T13:35:16Z","updated_at":"2018-09-11T10:10:20Z","pushed_at":"2018-09-14T14:52:04Z","git_url":"git://github.com/spatialos/UnrealGDK.git","ssh_url":"git@github.com:spatialos/UnrealGDK.git","clone_url":"https://github.com/spatialos/UnrealGDK.git","svn_url":"https://github.com/spatialos/UnrealGDK","homepage":null,"size":57345,"stargazers_count":51,"watchers_count":51,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":8,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/347"},"html":{"href":"https://github.com/spatialos/UnrealGDK/pull/347"},"issue":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/issues/347"},"comments":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/issues/347/comments"},"review_comments":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/347/comments"},"review_comment":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/pulls/347/commits"},"statuses":{"href":"https://api.github.com/repos/spatialos/UnrealGDK/statuses/d003f1515743495f1175f2896b0856c44e86f940"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"danielimprobable"}}