{"action":"created","comment":{"url":"https://api.github.com/repos/openconfig/ygot/pulls/comments/167663289","pull_request_review_id":95913813,"id":167663289,"diff_hunk":"@@ -712,26 +711,31 @@ func mappedDefinitions(yangFiles, includePaths []string, cfg *GeneratorConfig) (\n \t// them from the modules that are provided as an argument.\n \tdirs := make(map[string]*yang.Entry)\n \tenums := make(map[string]*yang.Entry)\n-\tvar rootElems []*yang.Entry\n+\tvar rootElems, treeElems []*yang.Entry\n \tfor _, module := range modules {\n-\t\tfindMappableEntities(module, dirs, enums, cfg.ExcludeModules, cfg.CompressOCPaths)\n+\t\terrs = append(errs, findMappableEntities(module, dirs, enums, cfg.ExcludeModules, cfg.CompressOCPaths, modules)...)\n \t\tif module == nil {\n \t\t\terrs = append(errs, errors.New(\"found a nil module in the returned module set\"))\n \t\t\tcontinue\n \t\t}\n \t\t// Ensure that we do not try and traverse an empty module.\n-\t\tif module.Dir != nil && !excluded[module.Name] {\n+\t\tif module.Dir != nil {","path":"ygen/codegen.go","position":39,"original_position":39,"commit_id":"d34da2946e362be9d8f43d9bb98d54028738e315","original_commit_id":"d34da2946e362be9d8f43d9bb98d54028738e315","user":{"login":"ostromart","id":30089849,"avatar_url":"https://avatars3.githubusercontent.com/u/30089849?v=4","gravatar_id":"","url":"https://api.github.com/users/ostromart","html_url":"https://github.com/ostromart","followers_url":"https://api.github.com/users/ostromart/followers","following_url":"https://api.github.com/users/ostromart/following{/other_user}","gists_url":"https://api.github.com/users/ostromart/gists{/gist_id}","starred_url":"https://api.github.com/users/ostromart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostromart/subscriptions","organizations_url":"https://api.github.com/users/ostromart/orgs","repos_url":"https://api.github.com/users/ostromart/repos","events_url":"https://api.github.com/users/ostromart/events{/privacy}","received_events_url":"https://api.github.com/users/ostromart/received_events","type":"User","site_admin":false},"body":"optional: len(module.Dir) would be more robust if the semantics of that field are not explicitly defined.","created_at":"2018-02-12T19:36:08Z","updated_at":"2018-02-12T19:53:28Z","html_url":"https://github.com/openconfig/ygot/pull/163#discussion_r167663289","pull_request_url":"https://api.github.com/repos/openconfig/ygot/pulls/163","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openconfig/ygot/pulls/comments/167663289"},"html":{"href":"https://github.com/openconfig/ygot/pull/163#discussion_r167663289"},"pull_request":{"href":"https://api.github.com/repos/openconfig/ygot/pulls/163"}}},"pull_request":{"url":"https://api.github.com/repos/openconfig/ygot/pulls/163","id":168422876,"html_url":"https://github.com/openconfig/ygot/pull/163","diff_url":"https://github.com/openconfig/ygot/pull/163.diff","patch_url":"https://github.com/openconfig/ygot/pull/163.patch","issue_url":"https://api.github.com/repos/openconfig/ygot/issues/163","number":163,"state":"open","locked":false,"title":"Resolve protobuf generation issues.","user":{"login":"robshakir","id":4836821,"avatar_url":"https://avatars3.githubusercontent.com/u/4836821?v=4","gravatar_id":"","url":"https://api.github.com/users/robshakir","html_url":"https://github.com/robshakir","followers_url":"https://api.github.com/users/robshakir/followers","following_url":"https://api.github.com/users/robshakir/following{/other_user}","gists_url":"https://api.github.com/users/robshakir/gists{/gist_id}","starred_url":"https://api.github.com/users/robshakir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robshakir/subscriptions","organizations_url":"https://api.github.com/users/robshakir/orgs","repos_url":"https://api.github.com/users/robshakir/repos","events_url":"https://api.github.com/users/robshakir/events{/privacy}","received_events_url":"https://api.github.com/users/robshakir/received_events","type":"User","site_admin":false},"body":"This CL resolves a small number of issues with protobuf and Go generation:\r\n\r\n- When excluding a module, this was done based on the module that included the YANG statements *not* the module that instantiated the module. This resulted in a configuration that excluded `openconfig-interfaces` not being able to resolve containers within the `interface-ref` grouping as they were excluded themselves.\r\n- In addition to the above, the schema tree would only be built based on included modules - which resulted in leafrefs not being able to be resolved if they pointed to an excluded module. The `schematree` is now resolved based on all modules, regardless of whether they are output.\r\n- When multiple YANG modules defined entities at the root, and fakeroot a fakeroot was generated, they would end up in the same directory.\r\n- When there was a list within a surrounding container at the root, and fakeroot and compress paths was enabled,  then this list would sometimes be placed in a separate package due to incorrect handling of package name generation.\r\n\r\nTest cases for the above issues have been added.","created_at":"2018-02-10T21:53:28Z","updated_at":"2018-02-12T19:53:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e38325a52af55655af1c61a687b7c33256507da","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openconfig/ygot/pulls/163/commits","review_comments_url":"https://api.github.com/repos/openconfig/ygot/pulls/163/comments","review_comment_url":"https://api.github.com/repos/openconfig/ygot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openconfig/ygot/issues/163/comments","statuses_url":"https://api.github.com/repos/openconfig/ygot/statuses/d34da2946e362be9d8f43d9bb98d54028738e315","head":{"label":"openconfig:protobuf-fakeroot","ref":"protobuf-fakeroot","sha":"d34da2946e362be9d8f43d9bb98d54028738e315","user":{"login":"openconfig","id":8780263,"avatar_url":"https://avatars3.githubusercontent.com/u/8780263?v=4","gravatar_id":"","url":"https://api.github.com/users/openconfig","html_url":"https://github.com/openconfig","followers_url":"https://api.github.com/users/openconfig/followers","following_url":"https://api.github.com/users/openconfig/following{/other_user}","gists_url":"https://api.github.com/users/openconfig/gists{/gist_id}","starred_url":"https://api.github.com/users/openconfig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openconfig/subscriptions","organizations_url":"https://api.github.com/users/openconfig/orgs","repos_url":"https://api.github.com/users/openconfig/repos","events_url":"https://api.github.com/users/openconfig/events{/privacy}","received_events_url":"https://api.github.com/users/openconfig/received_events","type":"Organization","site_admin":false},"repo":{"id":99452048,"name":"ygot","full_name":"openconfig/ygot","owner":{"login":"openconfig","id":8780263,"avatar_url":"https://avatars3.githubusercontent.com/u/8780263?v=4","gravatar_id":"","url":"https://api.github.com/users/openconfig","html_url":"https://github.com/openconfig","followers_url":"https://api.github.com/users/openconfig/followers","following_url":"https://api.github.com/users/openconfig/following{/other_user}","gists_url":"https://api.github.com/users/openconfig/gists{/gist_id}","starred_url":"https://api.github.com/users/openconfig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openconfig/subscriptions","organizations_url":"https://api.github.com/users/openconfig/orgs","repos_url":"https://api.github.com/users/openconfig/repos","events_url":"https://api.github.com/users/openconfig/events{/privacy}","received_events_url":"https://api.github.com/users/openconfig/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openconfig/ygot","description":"A toolkit for working with YANG data models in Go.","fork":false,"url":"https://api.github.com/repos/openconfig/ygot","forks_url":"https://api.github.com/repos/openconfig/ygot/forks","keys_url":"https://api.github.com/repos/openconfig/ygot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openconfig/ygot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openconfig/ygot/teams","hooks_url":"https://api.github.com/repos/openconfig/ygot/hooks","issue_events_url":"https://api.github.com/repos/openconfig/ygot/issues/events{/number}","events_url":"https://api.github.com/repos/openconfig/ygot/events","assignees_url":"https://api.github.com/repos/openconfig/ygot/assignees{/user}","branches_url":"https://api.github.com/repos/openconfig/ygot/branches{/branch}","tags_url":"https://api.github.com/repos/openconfig/ygot/tags","blobs_url":"https://api.github.com/repos/openconfig/ygot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openconfig/ygot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openconfig/ygot/git/refs{/sha}","trees_url":"https://api.github.com/repos/openconfig/ygot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openconfig/ygot/statuses/{sha}","languages_url":"https://api.github.com/repos/openconfig/ygot/languages","stargazers_url":"https://api.github.com/repos/openconfig/ygot/stargazers","contributors_url":"https://api.github.com/repos/openconfig/ygot/contributors","subscribers_url":"https://api.github.com/repos/openconfig/ygot/subscribers","subscription_url":"https://api.github.com/repos/openconfig/ygot/subscription","commits_url":"https://api.github.com/repos/openconfig/ygot/commits{/sha}","git_commits_url":"https://api.github.com/repos/openconfig/ygot/git/commits{/sha}","comments_url":"https://api.github.com/repos/openconfig/ygot/comments{/number}","issue_comment_url":"https://api.github.com/repos/openconfig/ygot/issues/comments{/number}","contents_url":"https://api.github.com/repos/openconfig/ygot/contents/{+path}","compare_url":"https://api.github.com/repos/openconfig/ygot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openconfig/ygot/merges","archive_url":"https://api.github.com/repos/openconfig/ygot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openconfig/ygot/downloads","issues_url":"https://api.github.com/repos/openconfig/ygot/issues{/number}","pulls_url":"https://api.github.com/repos/openconfig/ygot/pulls{/number}","milestones_url":"https://api.github.com/repos/openconfig/ygot/milestones{/number}","notifications_url":"https://api.github.com/repos/openconfig/ygot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openconfig/ygot/labels{/name}","releases_url":"https://api.github.com/repos/openconfig/ygot/releases{/id}","deployments_url":"https://api.github.com/repos/openconfig/ygot/deployments","created_at":"2017-08-05T22:56:40Z","updated_at":"2018-02-11T01:22:32Z","pushed_at":"2018-02-12T16:31:04Z","git_url":"git://github.com/openconfig/ygot.git","ssh_url":"git@github.com:openconfig/ygot.git","clone_url":"https://github.com/openconfig/ygot.git","svn_url":"https://github.com/openconfig/ygot","homepage":null,"size":19065,"stargazers_count":22,"watchers_count":22,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":8,"open_issues":19,"watchers":22,"default_branch":"master"}},"base":{"label":"openconfig:master","ref":"master","sha":"0b77e2f75abec2e39969654b2a042e60aab4216c","user":{"login":"openconfig","id":8780263,"avatar_url":"https://avatars3.githubusercontent.com/u/8780263?v=4","gravatar_id":"","url":"https://api.github.com/users/openconfig","html_url":"https://github.com/openconfig","followers_url":"https://api.github.com/users/openconfig/followers","following_url":"https://api.github.com/users/openconfig/following{/other_user}","gists_url":"https://api.github.com/users/openconfig/gists{/gist_id}","starred_url":"https://api.github.com/users/openconfig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openconfig/subscriptions","organizations_url":"https://api.github.com/users/openconfig/orgs","repos_url":"https://api.github.com/users/openconfig/repos","events_url":"https://api.github.com/users/openconfig/events{/privacy}","received_events_url":"https://api.github.com/users/openconfig/received_events","type":"Organization","site_admin":false},"repo":{"id":99452048,"name":"ygot","full_name":"openconfig/ygot","owner":{"login":"openconfig","id":8780263,"avatar_url":"https://avatars3.githubusercontent.com/u/8780263?v=4","gravatar_id":"","url":"https://api.github.com/users/openconfig","html_url":"https://github.com/openconfig","followers_url":"https://api.github.com/users/openconfig/followers","following_url":"https://api.github.com/users/openconfig/following{/other_user}","gists_url":"https://api.github.com/users/openconfig/gists{/gist_id}","starred_url":"https://api.github.com/users/openconfig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openconfig/subscriptions","organizations_url":"https://api.github.com/users/openconfig/orgs","repos_url":"https://api.github.com/users/openconfig/repos","events_url":"https://api.github.com/users/openconfig/events{/privacy}","received_events_url":"https://api.github.com/users/openconfig/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openconfig/ygot","description":"A toolkit for working with YANG data models in Go.","fork":false,"url":"https://api.github.com/repos/openconfig/ygot","forks_url":"https://api.github.com/repos/openconfig/ygot/forks","keys_url":"https://api.github.com/repos/openconfig/ygot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openconfig/ygot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openconfig/ygot/teams","hooks_url":"https://api.github.com/repos/openconfig/ygot/hooks","issue_events_url":"https://api.github.com/repos/openconfig/ygot/issues/events{/number}","events_url":"https://api.github.com/repos/openconfig/ygot/events","assignees_url":"https://api.github.com/repos/openconfig/ygot/assignees{/user}","branches_url":"https://api.github.com/repos/openconfig/ygot/branches{/branch}","tags_url":"https://api.github.com/repos/openconfig/ygot/tags","blobs_url":"https://api.github.com/repos/openconfig/ygot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openconfig/ygot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openconfig/ygot/git/refs{/sha}","trees_url":"https://api.github.com/repos/openconfig/ygot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openconfig/ygot/statuses/{sha}","languages_url":"https://api.github.com/repos/openconfig/ygot/languages","stargazers_url":"https://api.github.com/repos/openconfig/ygot/stargazers","contributors_url":"https://api.github.com/repos/openconfig/ygot/contributors","subscribers_url":"https://api.github.com/repos/openconfig/ygot/subscribers","subscription_url":"https://api.github.com/repos/openconfig/ygot/subscription","commits_url":"https://api.github.com/repos/openconfig/ygot/commits{/sha}","git_commits_url":"https://api.github.com/repos/openconfig/ygot/git/commits{/sha}","comments_url":"https://api.github.com/repos/openconfig/ygot/comments{/number}","issue_comment_url":"https://api.github.com/repos/openconfig/ygot/issues/comments{/number}","contents_url":"https://api.github.com/repos/openconfig/ygot/contents/{+path}","compare_url":"https://api.github.com/repos/openconfig/ygot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openconfig/ygot/merges","archive_url":"https://api.github.com/repos/openconfig/ygot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openconfig/ygot/downloads","issues_url":"https://api.github.com/repos/openconfig/ygot/issues{/number}","pulls_url":"https://api.github.com/repos/openconfig/ygot/pulls{/number}","milestones_url":"https://api.github.com/repos/openconfig/ygot/milestones{/number}","notifications_url":"https://api.github.com/repos/openconfig/ygot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openconfig/ygot/labels{/name}","releases_url":"https://api.github.com/repos/openconfig/ygot/releases{/id}","deployments_url":"https://api.github.com/repos/openconfig/ygot/deployments","created_at":"2017-08-05T22:56:40Z","updated_at":"2018-02-11T01:22:32Z","pushed_at":"2018-02-12T16:31:04Z","git_url":"git://github.com/openconfig/ygot.git","ssh_url":"git@github.com:openconfig/ygot.git","clone_url":"https://github.com/openconfig/ygot.git","svn_url":"https://github.com/openconfig/ygot","homepage":null,"size":19065,"stargazers_count":22,"watchers_count":22,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":8,"open_issues":19,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openconfig/ygot/pulls/163"},"html":{"href":"https://github.com/openconfig/ygot/pull/163"},"issue":{"href":"https://api.github.com/repos/openconfig/ygot/issues/163"},"comments":{"href":"https://api.github.com/repos/openconfig/ygot/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/openconfig/ygot/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/openconfig/ygot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openconfig/ygot/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/openconfig/ygot/statuses/d34da2946e362be9d8f43d9bb98d54028738e315"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ostromart"}}