Skip to content

fix archive mode usage on rules_go 0.61#304

Open
jmhodges wants to merge 1 commit into
uber-go:mainfrom
jmhodges:issue-303
Open

fix archive mode usage on rules_go 0.61#304
jmhodges wants to merge 1 commit into
uber-go:mainfrom
jmhodges:issue-303

Conversation

@jmhodges

@jmhodges jmhodges commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

rules_go 0.61 removed the deprecated .go shortcut field from the
go_context struct, so go_ctx.go.path fails at analysis time with
"'struct' value has no field or method 'go'".

This access the Go binary through the SDK instead via
go_ctx.sdk.go.path, which works on both rules_go 0.60 and 0.61+. This
also matches other uses of go_ctx.sdk.go elsewhere in this project.

Fixes #303

rules_go 0.61 removed the deprecated `.go` shortcut field from the
go_context struct, so `go_ctx.go.path` fails at analysis time with
"'struct' value has no field or method 'go'".

This access the Go binary through the SDK instead via
`go_ctx.sdk.go.path`, which works on both rules_go 0.60 and 0.61+. This
also matches other uses of `go_ctx.sdk.go` elsewhere in this project.

Fixes uber-go#303
@CLAassistant

CLAassistant commented Jun 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jmhodges

Copy link
Copy Markdown
Contributor Author

Gentle ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bazel_gomock: _gomock_archive rule broken with rules_go 0.61

2 participants