{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/12667","labels_url":"https://api.github.com/repos/golang/go/issues/12667/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/12667/comments","events_url":"https://api.github.com/repos/golang/go/issues/12667/events","html_url":"https://github.com/golang/go/issues/12667","id":107027899,"number":12667,"title":"go/types: handle \"C\" package differently from gc","user":{"login":"dvyukov","id":1095328,"avatar_url":"https://avatars.githubusercontent.com/u/1095328?v=3","gravatar_id":"","url":"https://api.github.com/users/dvyukov","html_url":"https://github.com/dvyukov","followers_url":"https://api.github.com/users/dvyukov/followers","following_url":"https://api.github.com/users/dvyukov/following{/other_user}","gists_url":"https://api.github.com/users/dvyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/dvyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvyukov/subscriptions","organizations_url":"https://api.github.com/users/dvyukov/orgs","repos_url":"https://api.github.com/users/dvyukov/repos","events_url":"https://api.github.com/users/dvyukov/events{/privacy}","received_events_url":"https://api.github.com/users/dvyukov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/24","html_url":"https://github.com/golang/go/milestones/Go1.6","labels_url":"https://api.github.com/repos/golang/go/milestones/24/labels","id":1096159,"number":24,"title":"Go1.6","description":"","creator":{"login":"josharian","id":67496,"avatar_url":"https://avatars.githubusercontent.com/u/67496?v=3","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"open_issues":235,"closed_issues":351,"state":"open","created_at":"2015-05-05T02:39:06Z","updated_at":"2015-11-25T17:44:33Z","due_on":"2016-01-31T08:00:00Z","closed_at":null},"comments":4,"created_at":"2015-09-17T16:59:18Z","updated_at":"2015-11-25T18:23:16Z","closed_at":"2015-09-18T17:47:02Z","body":"Two programs:\r\n\r\n```go\r\npackage test\r\n/**/\r\nimport \"C\"\r\n```\r\n\r\n```go\r\npackage test\r\n/**/\r\nimport _ \"C\"\r\n```\r\n\r\nThe first one is compiled with gc compiler (in fact, it is an excerpt from runtime/cgo/cgo.go), but gotype fails on it saying:\r\n```\r\n/tmp/cgo.go:4:8: \"C\" imported but not used\r\n```\r\n\r\nFor the second one gc fails with:\r\n```\r\nruntime/cgo/cgo.go:32:10: cannot rename import \"C\"\r\n```\r\nbut gotype compiles it successfully.\r\n\r\ngo/types behavior should match gc behavior.\r\n\r\nThis came up during a real attempt to use go/types to parse packages that use cgo (e.g. net)."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/159693589","html_url":"https://github.com/golang/go/issues/12667#issuecomment-159693589","issue_url":"https://api.github.com/repos/golang/go/issues/12667","id":159693589,"user":{"login":"alandonovan","id":8433140,"avatar_url":"https://avatars.githubusercontent.com/u/8433140?v=3","gravatar_id":"","url":"https://api.github.com/users/alandonovan","html_url":"https://github.com/alandonovan","followers_url":"https://api.github.com/users/alandonovan/followers","following_url":"https://api.github.com/users/alandonovan/following{/other_user}","gists_url":"https://api.github.com/users/alandonovan/gists{/gist_id}","starred_url":"https://api.github.com/users/alandonovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alandonovan/subscriptions","organizations_url":"https://api.github.com/users/alandonovan/orgs","repos_url":"https://api.github.com/users/alandonovan/repos","events_url":"https://api.github.com/users/alandonovan/events{/privacy}","received_events_url":"https://api.github.com/users/alandonovan/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T18:23:16Z","updated_at":"2015-11-25T18:23:16Z","body":"Hi Dmitry, sorry I missed your comment till now.\r\n\r\n> Are there plans to switch loader (and other packages and tools) to go/types from std lib?\r\n\r\nYes, we plan to switch the loader to use the standard go/types package once Go 1.6 has settled.  Before then, we will copy ~every file in the tools repo and tag them go1.5 so that the tip of the tree continues to work with old and new toolchains.   This has not yet happened because I have been starved of time for external Go work."}}