{"action":"created","comment":{"url":"https://api.github.com/repos/bblfsh/sdk/pulls/comments/259027430","pull_request_review_id":206431249,"id":259027430,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1OTAyNzQzMA==","diff_hunk":"@@ -746,11 +746,23 @@ func (op opScope) Construct(st *State, n nodes.Node) (nodes.Node, error) {\n // Field is an operation on a specific field of an object.\n type Field struct {\n \tName string // name of the field\n-\t// Optional can be set to make a field optional. Provided string is used as a variable name to the state of the field.\n-\t// Note that \"optional\" means that the field may not exists in the object, and it does not mean that the field can be nil.\n+\t// Optional can be set to make a field optional. Provided string is used as a variable\n+\t// name to the state of the field. Note that \"optional\" means that the field may not\n+\t// exists in the object, and it does not mean that the field can be nil.\n \t// To handle nil fields, see Opt operation.\n \tOptional string\n-\tOp       Op // operation used to check/construct the field value\n+\t// Drop the field if it exists. If Op is set, it will be called to check the value\n+\t// before dropping it. If the check fails, the whole transform will be canceled.\n+\t// This is the preferred way for dropping fields. Avoid using Drop without Op.","path":"uast/transformer/ops.go","position":14,"original_position":14,"commit_id":"0f00810794f3d5d212fa565839984e43ed1fc96b","original_commit_id":"0f00810794f3d5d212fa565839984e43ed1fc96b","user":{"login":"dennwc","id":676724,"node_id":"MDQ6VXNlcjY3NjcyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/676724?v=4","gravatar_id":"","url":"https://api.github.com/users/dennwc","html_url":"https://github.com/dennwc","followers_url":"https://api.github.com/users/dennwc/followers","following_url":"https://api.github.com/users/dennwc/following{/other_user}","gists_url":"https://api.github.com/users/dennwc/gists{/gist_id}","starred_url":"https://api.github.com/users/dennwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennwc/subscriptions","organizations_url":"https://api.github.com/users/dennwc/orgs","repos_url":"https://api.github.com/users/dennwc/repos","events_url":"https://api.github.com/users/dennwc/events{/privacy}","received_events_url":"https://api.github.com/users/dennwc/received_events","type":"User","site_admin":false},"body":"No, it's not an error, it will just assume `Op: Any()` in this case.\r\n\r\nSee https://github.com/bblfsh/sdk/pull/369#discussion_r259027330","created_at":"2019-02-21T17:11:28Z","updated_at":"2019-02-21T17:11:28Z","html_url":"https://github.com/bblfsh/sdk/pull/369#discussion_r259027430","pull_request_url":"https://api.github.com/repos/bblfsh/sdk/pulls/369","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/comments/259027430"},"html":{"href":"https://github.com/bblfsh/sdk/pull/369#discussion_r259027430"},"pull_request":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/369"}},"in_reply_to_id":259025316},"pull_request":{"url":"https://api.github.com/repos/bblfsh/sdk/pulls/369","id":255094806,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU1MDk0ODA2","html_url":"https://github.com/bblfsh/sdk/pull/369","diff_url":"https://github.com/bblfsh/sdk/pull/369.diff","patch_url":"https://github.com/bblfsh/sdk/pull/369.patch","issue_url":"https://api.github.com/repos/bblfsh/sdk/issues/369","number":369,"state":"open","locked":false,"title":"Add Drop operation to Fields","user":{"login":"dennwc","id":676724,"node_id":"MDQ6VXNlcjY3NjcyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/676724?v=4","gravatar_id":"","url":"https://api.github.com/users/dennwc","html_url":"https://github.com/dennwc","followers_url":"https://api.github.com/users/dennwc/followers","following_url":"https://api.github.com/users/dennwc/following{/other_user}","gists_url":"https://api.github.com/users/dennwc/gists{/gist_id}","starred_url":"https://api.github.com/users/dennwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennwc/subscriptions","organizations_url":"https://api.github.com/users/dennwc/orgs","repos_url":"https://api.github.com/users/dennwc/repos","events_url":"https://api.github.com/users/dennwc/events{/privacy}","received_events_url":"https://api.github.com/users/dennwc/received_events","type":"User","site_admin":false},"body":"As requested in https://github.com/bblfsh/cpp-driver/pull/26, add an option to drop a field. It will work the same way as `Optional: \"x\", Op: Any()`, except that it won't create a variable for `Optional`.\r\n\r\nSigned-off-by: Denys Smirnov <denys@sourced.tech>","created_at":"2019-02-21T16:31:48Z","updated_at":"2019-02-21T17:11:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4da61b93b35fff3c7399a311ddeb069aac4f51d","assignee":{"login":"dennwc","id":676724,"node_id":"MDQ6VXNlcjY3NjcyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/676724?v=4","gravatar_id":"","url":"https://api.github.com/users/dennwc","html_url":"https://github.com/dennwc","followers_url":"https://api.github.com/users/dennwc/followers","following_url":"https://api.github.com/users/dennwc/following{/other_user}","gists_url":"https://api.github.com/users/dennwc/gists{/gist_id}","starred_url":"https://api.github.com/users/dennwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennwc/subscriptions","organizations_url":"https://api.github.com/users/dennwc/orgs","repos_url":"https://api.github.com/users/dennwc/repos","events_url":"https://api.github.com/users/dennwc/events{/privacy}","received_events_url":"https://api.github.com/users/dennwc/received_events","type":"User","site_admin":false},"assignees":[{"login":"dennwc","id":676724,"node_id":"MDQ6VXNlcjY3NjcyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/676724?v=4","gravatar_id":"","url":"https://api.github.com/users/dennwc","html_url":"https://github.com/dennwc","followers_url":"https://api.github.com/users/dennwc/followers","following_url":"https://api.github.com/users/dennwc/following{/other_user}","gists_url":"https://api.github.com/users/dennwc/gists{/gist_id}","starred_url":"https://api.github.com/users/dennwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennwc/subscriptions","organizations_url":"https://api.github.com/users/dennwc/orgs","repos_url":"https://api.github.com/users/dennwc/repos","events_url":"https://api.github.com/users/dennwc/events{/privacy}","received_events_url":"https://api.github.com/users/dennwc/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"bzz","id":5582506,"node_id":"MDQ6VXNlcjU1ODI1MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/5582506?v=4","gravatar_id":"","url":"https://api.github.com/users/bzz","html_url":"https://github.com/bzz","followers_url":"https://api.github.com/users/bzz/followers","following_url":"https://api.github.com/users/bzz/following{/other_user}","gists_url":"https://api.github.com/users/bzz/gists{/gist_id}","starred_url":"https://api.github.com/users/bzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzz/subscriptions","organizations_url":"https://api.github.com/users/bzz/orgs","repos_url":"https://api.github.com/users/bzz/repos","events_url":"https://api.github.com/users/bzz/events{/privacy}","received_events_url":"https://api.github.com/users/bzz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bblfsh/sdk/pulls/369/commits","review_comments_url":"https://api.github.com/repos/bblfsh/sdk/pulls/369/comments","review_comment_url":"https://api.github.com/repos/bblfsh/sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bblfsh/sdk/issues/369/comments","statuses_url":"https://api.github.com/repos/bblfsh/sdk/statuses/0f00810794f3d5d212fa565839984e43ed1fc96b","head":{"label":"dennwc:fields_drop","ref":"fields_drop","sha":"0f00810794f3d5d212fa565839984e43ed1fc96b","user":{"login":"dennwc","id":676724,"node_id":"MDQ6VXNlcjY3NjcyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/676724?v=4","gravatar_id":"","url":"https://api.github.com/users/dennwc","html_url":"https://github.com/dennwc","followers_url":"https://api.github.com/users/dennwc/followers","following_url":"https://api.github.com/users/dennwc/following{/other_user}","gists_url":"https://api.github.com/users/dennwc/gists{/gist_id}","starred_url":"https://api.github.com/users/dennwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennwc/subscriptions","organizations_url":"https://api.github.com/users/dennwc/orgs","repos_url":"https://api.github.com/users/dennwc/repos","events_url":"https://api.github.com/users/dennwc/events{/privacy}","received_events_url":"https://api.github.com/users/dennwc/received_events","type":"User","site_admin":false},"repo":{"id":120607131,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA2MDcxMzE=","name":"sdk","full_name":"dennwc/sdk","private":false,"owner":{"login":"dennwc","id":676724,"node_id":"MDQ6VXNlcjY3NjcyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/676724?v=4","gravatar_id":"","url":"https://api.github.com/users/dennwc","html_url":"https://github.com/dennwc","followers_url":"https://api.github.com/users/dennwc/followers","following_url":"https://api.github.com/users/dennwc/following{/other_user}","gists_url":"https://api.github.com/users/dennwc/gists{/gist_id}","starred_url":"https://api.github.com/users/dennwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennwc/subscriptions","organizations_url":"https://api.github.com/users/dennwc/orgs","repos_url":"https://api.github.com/users/dennwc/repos","events_url":"https://api.github.com/users/dennwc/events{/privacy}","received_events_url":"https://api.github.com/users/dennwc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dennwc/sdk","description":"Babelfish driver SDK ","fork":true,"url":"https://api.github.com/repos/dennwc/sdk","forks_url":"https://api.github.com/repos/dennwc/sdk/forks","keys_url":"https://api.github.com/repos/dennwc/sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dennwc/sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dennwc/sdk/teams","hooks_url":"https://api.github.com/repos/dennwc/sdk/hooks","issue_events_url":"https://api.github.com/repos/dennwc/sdk/issues/events{/number}","events_url":"https://api.github.com/repos/dennwc/sdk/events","assignees_url":"https://api.github.com/repos/dennwc/sdk/assignees{/user}","branches_url":"https://api.github.com/repos/dennwc/sdk/branches{/branch}","tags_url":"https://api.github.com/repos/dennwc/sdk/tags","blobs_url":"https://api.github.com/repos/dennwc/sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dennwc/sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dennwc/sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/dennwc/sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dennwc/sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/dennwc/sdk/languages","stargazers_url":"https://api.github.com/repos/dennwc/sdk/stargazers","contributors_url":"https://api.github.com/repos/dennwc/sdk/contributors","subscribers_url":"https://api.github.com/repos/dennwc/sdk/subscribers","subscription_url":"https://api.github.com/repos/dennwc/sdk/subscription","commits_url":"https://api.github.com/repos/dennwc/sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/dennwc/sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/dennwc/sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/dennwc/sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/dennwc/sdk/contents/{+path}","compare_url":"https://api.github.com/repos/dennwc/sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dennwc/sdk/merges","archive_url":"https://api.github.com/repos/dennwc/sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dennwc/sdk/downloads","issues_url":"https://api.github.com/repos/dennwc/sdk/issues{/number}","pulls_url":"https://api.github.com/repos/dennwc/sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/dennwc/sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/dennwc/sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dennwc/sdk/labels{/name}","releases_url":"https://api.github.com/repos/dennwc/sdk/releases{/id}","deployments_url":"https://api.github.com/repos/dennwc/sdk/deployments","created_at":"2018-02-07T11:34:50Z","updated_at":"2018-08-23T19:37:44Z","pushed_at":"2019-02-21T16:27:02Z","git_url":"git://github.com/dennwc/sdk.git","ssh_url":"git@github.com:dennwc/sdk.git","clone_url":"https://github.com/dennwc/sdk.git","svn_url":"https://github.com/dennwc/sdk","homepage":"","size":1530,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bblfsh:master","ref":"master","sha":"55fd7b16887ab28db1fefc5a386c0337962fab56","user":{"login":"bblfsh","id":25795418,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1Nzk1NDE4","avatar_url":"https://avatars0.githubusercontent.com/u/25795418?v=4","gravatar_id":"","url":"https://api.github.com/users/bblfsh","html_url":"https://github.com/bblfsh","followers_url":"https://api.github.com/users/bblfsh/followers","following_url":"https://api.github.com/users/bblfsh/following{/other_user}","gists_url":"https://api.github.com/users/bblfsh/gists{/gist_id}","starred_url":"https://api.github.com/users/bblfsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bblfsh/subscriptions","organizations_url":"https://api.github.com/users/bblfsh/orgs","repos_url":"https://api.github.com/users/bblfsh/repos","events_url":"https://api.github.com/users/bblfsh/events{/privacy}","received_events_url":"https://api.github.com/users/bblfsh/received_events","type":"Organization","site_admin":false},"repo":{"id":82719719,"node_id":"MDEwOlJlcG9zaXRvcnk4MjcxOTcxOQ==","name":"sdk","full_name":"bblfsh/sdk","private":false,"owner":{"login":"bblfsh","id":25795418,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1Nzk1NDE4","avatar_url":"https://avatars0.githubusercontent.com/u/25795418?v=4","gravatar_id":"","url":"https://api.github.com/users/bblfsh","html_url":"https://github.com/bblfsh","followers_url":"https://api.github.com/users/bblfsh/followers","following_url":"https://api.github.com/users/bblfsh/following{/other_user}","gists_url":"https://api.github.com/users/bblfsh/gists{/gist_id}","starred_url":"https://api.github.com/users/bblfsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bblfsh/subscriptions","organizations_url":"https://api.github.com/users/bblfsh/orgs","repos_url":"https://api.github.com/users/bblfsh/repos","events_url":"https://api.github.com/users/bblfsh/events{/privacy}","received_events_url":"https://api.github.com/users/bblfsh/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bblfsh/sdk","description":"Babelfish driver SDK ","fork":false,"url":"https://api.github.com/repos/bblfsh/sdk","forks_url":"https://api.github.com/repos/bblfsh/sdk/forks","keys_url":"https://api.github.com/repos/bblfsh/sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bblfsh/sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bblfsh/sdk/teams","hooks_url":"https://api.github.com/repos/bblfsh/sdk/hooks","issue_events_url":"https://api.github.com/repos/bblfsh/sdk/issues/events{/number}","events_url":"https://api.github.com/repos/bblfsh/sdk/events","assignees_url":"https://api.github.com/repos/bblfsh/sdk/assignees{/user}","branches_url":"https://api.github.com/repos/bblfsh/sdk/branches{/branch}","tags_url":"https://api.github.com/repos/bblfsh/sdk/tags","blobs_url":"https://api.github.com/repos/bblfsh/sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bblfsh/sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bblfsh/sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/bblfsh/sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bblfsh/sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/bblfsh/sdk/languages","stargazers_url":"https://api.github.com/repos/bblfsh/sdk/stargazers","contributors_url":"https://api.github.com/repos/bblfsh/sdk/contributors","subscribers_url":"https://api.github.com/repos/bblfsh/sdk/subscribers","subscription_url":"https://api.github.com/repos/bblfsh/sdk/subscription","commits_url":"https://api.github.com/repos/bblfsh/sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/bblfsh/sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/bblfsh/sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/bblfsh/sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/bblfsh/sdk/contents/{+path}","compare_url":"https://api.github.com/repos/bblfsh/sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bblfsh/sdk/merges","archive_url":"https://api.github.com/repos/bblfsh/sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bblfsh/sdk/downloads","issues_url":"https://api.github.com/repos/bblfsh/sdk/issues{/number}","pulls_url":"https://api.github.com/repos/bblfsh/sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/bblfsh/sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/bblfsh/sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bblfsh/sdk/labels{/name}","releases_url":"https://api.github.com/repos/bblfsh/sdk/releases{/id}","deployments_url":"https://api.github.com/repos/bblfsh/sdk/deployments","created_at":"2017-02-21T19:41:42Z","updated_at":"2019-02-20T15:25:27Z","pushed_at":"2019-02-21T16:31:49Z","git_url":"git://github.com/bblfsh/sdk.git","ssh_url":"git@github.com:bblfsh/sdk.git","clone_url":"https://github.com/bblfsh/sdk.git","svn_url":"https://github.com/bblfsh/sdk","homepage":"","size":1580,"stargazers_count":19,"watchers_count":19,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":19,"open_issues":22,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/369"},"html":{"href":"https://github.com/bblfsh/sdk/pull/369"},"issue":{"href":"https://api.github.com/repos/bblfsh/sdk/issues/369"},"comments":{"href":"https://api.github.com/repos/bblfsh/sdk/issues/369/comments"},"review_comments":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/369/comments"},"review_comment":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/369/commits"},"statuses":{"href":"https://api.github.com/repos/bblfsh/sdk/statuses/0f00810794f3d5d212fa565839984e43ed1fc96b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"dennwc"}}