Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rules_go does not support identifying @io_bazel_rules_go with @ #2285

Closed
aehlig opened this issue Nov 19, 2019 · 2 comments
Closed

rules_go does not support identifying @io_bazel_rules_go with @ #2285

aehlig opened this issue Nov 19, 2019 · 2 comments

Comments

@aehlig
Copy link

aehlig commented Nov 19, 2019

What version of rules_go are you using?

HEAD, i.e., b8db84a

What version of gazelle are you using?

n/a

What version of Bazel are you using?

HEAD (after bazelbuild/bazel@81b57d6)

Does this issue reproduce with the latest releases of all the above?

n/a

What operating system and processor architecture are you using?

not OS specfic

Any other potentially useful information about your toolchain?

see https://github.com/bazelbuild/continuous-integration

What did you do?

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1281

What did you expect to see?

passing test

What did you see instead?

Futher information

rules_go assumes at various places that bazel-generated artifacts have a path starting with external. This is wrong if rules_go is the main repository. Examples include https://github.com/bazelbuild/rules_go/blob/b8db84a2f3fd7fac1801ddef376a549c2d83b682/go/tools/bazel_testing/bazel_testing.go#L297

Tracking issue is bazelbuild/bazel#10246

Background on the change bazelbuild/bazel#7130

jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 19, 2019
Previously, Bazel arguments resolved with $(location) or $(locations)
always included an "external/workspace/" prefix. We used this prefix
to map arguments to runfiles. Upcoming versions of Bazel won't add
this prefix to files in the main workspace.

Witht this change, bazel_testing will read the workspace name from the
WORKSPACE file from the main workspace (which must be among the
arguments). This makes sure that go_bazel_test targets in the main
workspace will continue to work.

Updates bazel-contrib#2285
jayconrod pushed a commit that referenced this issue Nov 19, 2019
…#2287)

Previously, Bazel arguments resolved with $(location) or $(locations)
always included an "external/workspace/" prefix. We used this prefix
to map arguments to runfiles. Upcoming versions of Bazel won't add
this prefix to files in the main workspace.

Witht this change, bazel_testing will read the workspace name from the
WORKSPACE file from the main workspace (which must be among the
arguments). This makes sure that go_bazel_test targets in the main
workspace will continue to work.

Updates #2285
@jayconrod
Copy link
Contributor

#2285 should fix this for newer integration tests (using go_bazel_test).

There are still a number of failing integration tests using the old bazel_test framework. It will take a few days to migrate those tests to the new bazel_test framework (#1959).

jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 20, 2019
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 20, 2019
jayconrod pushed a commit that referenced this issue Nov 20, 2019
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 20, 2019
jayconrod pushed a commit that referenced this issue Nov 21, 2019
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 25, 2019
jayconrod pushed a commit that referenced this issue Nov 25, 2019
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 27, 2019
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 27, 2019
Seems redundant with other tests.

Updates bazel-contrib#2285
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 27, 2019
jayconrod pushed a commit that referenced this issue Nov 27, 2019
Seems redundant with other tests.

Updates #2285
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Nov 27, 2019
Note that a cgo go_binary with the defualt link mode does not seem to
be reproducible on macOS. The original test did not cover this. Needs
investigation.

Updates bazel-contrib#2285
jayconrod pushed a commit that referenced this issue Dec 2, 2019
Note that a cgo go_binary with the defualt link mode does not seem to
be reproducible on macOS. The original test did not cover this. Needs
investigation.

Updates #2285
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Dec 2, 2019
This is the bazel_test. It checks whether a package can be imported as
both a direct and transitive dependency.

This test provides little value and is not worth migrating to
go_bazel_test, so deleting.

Updates bazel-contrib#2285
jayconrod pushed a commit that referenced this issue Dec 2, 2019
This is the bazel_test. It checks whether a package can be imported as
both a direct and transitive dependency.

This test provides little value and is not worth migrating to
go_bazel_test, so deleting.

Updates #2285
@jayconrod
Copy link
Contributor

As of #2303, all the rules_go tests have been upgraded to use the new test framework, which is fixed with respect to this flag. I'll delete the old test framework shortly.

I'll wait to make sure the next run of https://buildkite.com/bazel/bazel-at-head-plus-downstream is fixed before closing this.

jayconrod pushed a commit that referenced this issue Dec 4, 2019
…#2287)

Previously, Bazel arguments resolved with $(location) or $(locations)
always included an "external/workspace/" prefix. We used this prefix
to map arguments to runfiles. Upcoming versions of Bazel won't add
this prefix to files in the main workspace.

Witht this change, bazel_testing will read the workspace name from the
WORKSPACE file from the main workspace (which must be among the
arguments). This makes sure that go_bazel_test targets in the main
workspace will continue to work.

Updates #2285
jayconrod pushed a commit that referenced this issue Dec 4, 2019
jayconrod pushed a commit that referenced this issue Dec 4, 2019
jayconrod pushed a commit that referenced this issue Dec 4, 2019
jayconrod pushed a commit that referenced this issue Dec 4, 2019
Seems redundant with other tests.

Updates #2285
jayconrod pushed a commit that referenced this issue Dec 4, 2019
Note that a cgo go_binary with the defualt link mode does not seem to
be reproducible on macOS. The original test did not cover this. Needs
investigation.

Updates #2285
jayconrod pushed a commit that referenced this issue Dec 4, 2019
This is the bazel_test. It checks whether a package can be imported as
both a direct and transitive dependency.

This test provides little value and is not worth migrating to
go_bazel_test, so deleting.

Updates #2285
jayconrod pushed a commit that referenced this issue Dec 4, 2019
…#2287)

Previously, Bazel arguments resolved with $(location) or $(locations)
always included an "external/workspace/" prefix. We used this prefix
to map arguments to runfiles. Upcoming versions of Bazel won't add
this prefix to files in the main workspace.

Witht this change, bazel_testing will read the workspace name from the
WORKSPACE file from the main workspace (which must be among the
arguments). This makes sure that go_bazel_test targets in the main
workspace will continue to work.

Updates #2285
jayconrod pushed a commit that referenced this issue Dec 4, 2019
jayconrod pushed a commit that referenced this issue Dec 4, 2019
jayconrod pushed a commit that referenced this issue Dec 4, 2019
jayconrod pushed a commit that referenced this issue Dec 4, 2019
Seems redundant with other tests.

Updates #2285
jayconrod pushed a commit that referenced this issue Dec 4, 2019
Note that a cgo go_binary with the defualt link mode does not seem to
be reproducible on macOS. The original test did not cover this. Needs
investigation.

Updates #2285
jayconrod pushed a commit that referenced this issue Dec 4, 2019
This is the bazel_test. It checks whether a package can be imported as
both a direct and transitive dependency.

This test provides little value and is not worth migrating to
go_bazel_test, so deleting.

Updates #2285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants