{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1538","repository_url":"https://api.github.com/repos/bazelbuild/rules_go","labels_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1538/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1538/comments","events_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1538/events","html_url":"https://github.com/bazelbuild/rules_go/issues/1538","id":330670183,"node_id":"MDU6SXNzdWUzMzA2NzAxODM=","number":1538,"title":"Build error involving wrong importmap passed to vendored external tests","user":{"login":"jayconrod","id":164791,"node_id":"MDQ6VXNlcjE2NDc5MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/164791?v=4","gravatar_id":"","url":"https://api.github.com/users/jayconrod","html_url":"https://github.com/jayconrod","followers_url":"https://api.github.com/users/jayconrod/followers","following_url":"https://api.github.com/users/jayconrod/following{/other_user}","gists_url":"https://api.github.com/users/jayconrod/gists{/gist_id}","starred_url":"https://api.github.com/users/jayconrod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayconrod/subscriptions","organizations_url":"https://api.github.com/users/jayconrod/orgs","repos_url":"https://api.github.com/users/jayconrod/repos","events_url":"https://api.github.com/users/jayconrod/events{/privacy}","received_events_url":"https://api.github.com/users/jayconrod/received_events","type":"User","site_admin":false},"labels":[{"id":342021202,"node_id":"MDU6TGFiZWwzNDIwMjEyMDI=","url":"https://api.github.com/repos/bazelbuild/rules_go/labels/bug","name":"bug","color":"fc2929","default":true},{"id":668667257,"node_id":"MDU6TGFiZWw2Njg2NjcyNTc=","url":"https://api.github.com/repos/bazelbuild/rules_go/labels/go","name":"go","color":"E0EBF5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-08T14:00:49Z","updated_at":"2018-06-08T20:00:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Originally reported by @ixdy. To reproduce, checkout https://github.com/ixdy/kubernetes at 8704a68a3712d35e778043d6e4109913449677e9 and run this command:\r\n\r\n```\r\n$ bazel build staging/src/k8s.io/apimachinery/pkg/runtime:go_default_test\r\n...\r\n/usr/local/google/home/jayconrod/.cache/bazel/_bazel_jayconrod/4a2bdc82526db3ea358ea56d8f9e540e/sandbox/linux-sandbox/107/execroot/__main__/staging/src/k8s.io/apimachinery/pkg/runtime/conversion_test.go:34:94: cannot use \"k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/testing\".InternalComplex literal (type *\"k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/testing\".InternalComplex) as type \"k8s.io/apimachinery/pkg/runtime\".Object in argument to scheme.AddKnownTypeWithName:\r\n\t*\"k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/testing\".InternalComplex does not implement \"k8s.io/apimachinery/pkg/runtime\".Object (wrong type for DeepCopyObject method)\r\n\t\thave DeepCopyObject() \"k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime\".Object\r\n\t\twant DeepCopyObject() \"k8s.io/apimachinery/pkg/runtime\".Object\r\n...\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/bazelbuild/rules_go/issues/comments/395873742","html_url":"https://github.com/bazelbuild/rules_go/issues/1538#issuecomment-395873742","issue_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1538","id":395873742,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTg3Mzc0Mg==","user":{"login":"ixdy","id":8061296,"node_id":"MDQ6VXNlcjgwNjEyOTY=","avatar_url":"https://avatars3.githubusercontent.com/u/8061296?v=4","gravatar_id":"","url":"https://api.github.com/users/ixdy","html_url":"https://github.com/ixdy","followers_url":"https://api.github.com/users/ixdy/followers","following_url":"https://api.github.com/users/ixdy/following{/other_user}","gists_url":"https://api.github.com/users/ixdy/gists{/gist_id}","starred_url":"https://api.github.com/users/ixdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ixdy/subscriptions","organizations_url":"https://api.github.com/users/ixdy/orgs","repos_url":"https://api.github.com/users/ixdy/repos","events_url":"https://api.github.com/users/ixdy/events{/privacy}","received_events_url":"https://api.github.com/users/ixdy/received_events","type":"User","site_admin":false},"created_at":"2018-06-08T20:00:28Z","updated_at":"2018-06-08T20:00:28Z","author_association":"CONTRIBUTOR","body":"In particular, this package (`staging/s8s.io/apimachinery/pkg/runtime`) has a `go_library` which overrides `importmap`:\r\n\r\n```python\r\ngo_library(\r\n    name = \"go_default_library\",\r\n    importmap = \"k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime\",\r\n    importpath = \"k8s.io/apimachinery/pkg/runtime\",\r\n...\r\n)\r\n```\r\nand several go tests which depend on the library.\r\n\r\nIt looks like when building the external go tests, the go rules are passing `-importmap 'k8s.io/apimachinery/pkg/runtime=k8s.io/apimachinery/pkg/runtime'`, rather than `-importmap 'k8s.io/apimachinery/pkg/runtime=k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime'`."}}
{"actor":{"display_login":"ixdy"}}