-
-
Notifications
You must be signed in to change notification settings - Fork 668
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
nogo: migrate to configuration transitions #2473
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The nogo binary to use is now specified using a Starlark flag. For example: bazel build --@io_bazel_rules_go//go/config:nogo=@io_bazel_rules_go//:tools_nogo //:hello .bazelrc is now the recommended way to set this flag. Setting nogo in go_register_toolchains will still work, though that function may be deprecated soon. The flag overrides the go_register_toolchains argument when both are set. Updates bazel-contrib#2374 Fixes bazel-contrib#2470
jayconrod
pushed a commit
to jayconrod/rules_go
that referenced
this pull request
May 5, 2020
nogo binaries no longer depend on themselves. Since bazel-contrib#2473, the nogo rule uses a configuration transition to disable nogo for itself and its dependencies. This means there's no longer any need for go_tool_library rules for analyzers and utility packages in org_golang_x_tools. So with this change, tools_nogo depends on the regular go_library analyzers. The documentation is updated not to mention go_tool_library anymore. Additionally, this change replaces the go_tool_library targets in org_golang_x_tools with aliases to the go_library targets. So nogo targets that depends on the old symbols should work. Fixes bazel-contrib#2374
jayconrod
pushed a commit
that referenced
this pull request
May 5, 2020
nogo binaries no longer depend on themselves. Since #2473, the nogo rule uses a configuration transition to disable nogo for itself and its dependencies. This means there's no longer any need for go_tool_library rules for analyzers and utility packages in org_golang_x_tools. So with this change, tools_nogo depends on the regular go_library analyzers. The documentation is updated not to mention go_tool_library anymore. Additionally, this change replaces the go_tool_library targets in org_golang_x_tools with aliases to the go_library targets. So nogo targets that depends on the old symbols should work. Fixes #2374
jayconrod
pushed a commit
to jayconrod/rules_go
that referenced
this pull request
May 8, 2020
This reverts commit 8bdd81a.
jayconrod
pushed a commit
to jayconrod/rules_go
that referenced
this pull request
May 8, 2020
nogo now uses an incoming-edge transition to reset all Go build settings to their default values. This prevents nogo from being built with an unusual link mode, as well as other issues. This change uses some code from bazel-contrib#2473, but it doesn't change how nogo fits into the dependency graph. Fixes bazel-contrib#2470
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The nogo binary to use is now specified using a Starlark flag.
For example:
.bazelrc is now the recommended way to set this flag. Setting nogo in
go_register_toolchains will still work, though that function may be
deprecated soon. The flag overrides the go_register_toolchains
argument when both are set.
Updates #2374
Fixes #2470