Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bazel-contrib/rules_go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.22.11
Choose a base ref
...
head repository: bazel-contrib/rules_go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.23.0
Choose a head ref

Commits on Feb 26, 2020

  1. Announce new releases [skip ci] (#2386)

    Jay Conrod authored Feb 26, 2020
    Copy the full SHA
    b8d69ec View commit details
  2. go_googleapis: fix dependencies (#2388)

    Re-generate the Gazelle patch after bazel-contrib/bazel-gazelle#717.
    
    Fixes #2387
    Jay Conrod authored Feb 26, 2020
    Copy the full SHA
    0800d68 View commit details
  3. Announce release v0.22.1 [skip ci] (#2390)

    Jay Conrod authored Feb 26, 2020
    Copy the full SHA
    d7398c5 View commit details

Commits on Mar 2, 2020

  1. Copy the full SHA
    87cc49a View commit details

Commits on Mar 10, 2020

  1. nogo: disable cgocall (#2399)

    Updates #2396
    Jay Conrod authored Mar 10, 2020
    Copy the full SHA
    2a0e3a0 View commit details

Commits on Mar 16, 2020

  1. Copy the full SHA
    a6ce1c4 View commit details

Commits on Mar 19, 2020

  1. Support Go 1.14.1, 1.13.9 (#2406)

    Fixes #2404
    Jay Conrod authored Mar 19, 2020
    Copy the full SHA
    7432219 View commit details
  2. Announce release v0.22.2, v0.21.5 [skip ci] (#2407)

    Jay Conrod authored Mar 19, 2020
    Copy the full SHA
    3fd6c64 View commit details

Commits on Mar 20, 2020

  1. Update bazel_toolchains for bazel 2.2.0 (#2408)

    Jay Conrod authored Mar 20, 2020
    Copy the full SHA
    d4f6c32 View commit details

Commits on Mar 24, 2020

  1. go: add missing platforms from 'go tools dist list' (#2412)

    This will add new targets in //go/platforms and //go/toolchains.
    Jay Conrod authored Mar 24, 2020
    Copy the full SHA
    64f4431 View commit details

Commits on Mar 25, 2020

  1. go_embed_data: don't include srcs in GoLibrary or GoSource (#2413)

    None of the attributes passed to go_embed_data rules are relevant for
    other rules embedding them. Include the output file as a generated
    source file, but don't pass other attributes.
    
    Fixes #2411
    Jay Conrod authored Mar 25, 2020
    Copy the full SHA
    efd8f91 View commit details

Commits on Mar 30, 2020

  1. Copy the full SHA
    a339aa4 View commit details

Commits on Apr 1, 2020

  1. Copy the full SHA
    16bdf71 View commit details

Commits on Apr 6, 2020

  1. Set minimum supported Bazel version to 2.2.0 (#2419)

    This only applies to the master branch, not to current release
    branches.
    
    This is needed for configuration transition support. 1.2.0 (the
    current minimum) and 2.1.0 (the version before 2.2.0) both have build
    failures triggered by transitions.
    
    For #2219
    Jay Conrod authored Apr 6, 2020
    Copy the full SHA
    bbdc18c View commit details

Commits on Apr 7, 2020

  1. Add pull request template [skip ci] (#2425)

    Jay Conrod authored Apr 7, 2020
    Copy the full SHA
    26ce1d7 View commit details

Commits on Apr 9, 2020

  1. Support Go 1.14.2, 1.13.10 (#2427)

    Fixes #2426
    Jay Conrod authored Apr 9, 2020
    Copy the full SHA
    b04b137 View commit details
  2. Copy the full SHA
    c08cffd View commit details

Commits on Apr 14, 2020

  1. Copy the full SHA
    f0753e1 View commit details

Commits on Apr 15, 2020

  1. Revert "Setting TMPDIR to TEST_TMPDIR (#2401)" (#2432)

    This reverts commit a6ce1c4.
    linzhp authored Apr 15, 2020
    Copy the full SHA
    9794aac View commit details
  2. Update bazel_toolchains in WORKSPACE for bazel 3.0.0 (#2429)

    Fixes #2430
    Jay Conrod authored Apr 15, 2020
    Copy the full SHA
    6d41742 View commit details

Commits on Apr 16, 2020

  1. Add missing Starlark files to “all_rules” targets. (#2434)

    This is important for Stardoc, which insists on knowing about all transitively
    loaded Starlark files.
    phst authored Apr 16, 2020
    Copy the full SHA
    cf9c0ea View commit details

Commits on Apr 17, 2020

  1. Update documentation [skip ci] (#2438)

    * Update README.rst
    * Update toolchains.rst
    * Update core.rst
    * Rename workspace.rst to dependencies.rst and update
    * Move roadmap to wiki
    * Move deprecation schedule to wiki
    * Delete obsolete vendoring documentation
    * Delete redundant go/tools/bazel documentation.
    * Delete obsolete builder documentation
    Jay Conrod authored Apr 17, 2020
    Copy the full SHA
    f9a4fb1 View commit details
  2. go: use configuration transitions instead of aspect (#2414)

    This changes how the goos, goarch, race, msan, static, and pure
    attributes of go_binary and go_test are implemented.
    
    Previously, the go_binary and go_test rules used an aspect on the deps
    and embed attributes. If any of the mode attributes listed above were
    set, the aspect declared additional output files and actions to
    generate them for the specified configuration. This approach had two
    significant problems. First, the aspect caused the analysis to be
    performed twice, wasting time and memory even in the case
    where no cross-compilation was needed. Second, the aspect was not
    compatible with conditional dependencies specified with select
    expressions: aspects run on the configured target graph, but the mode
    attributes could not affect Bazel's configuration.
    
    This change deletes the aspect and implements these attributes using a
    different mechanism: build settings and configuration transitions.
    
    A new package is added //go/config with a build setting for each
    attribute. Most settings are flags that may be set on the
    command-line. This is an alternative to --feature flags, which will be
    deprecated and eventually removed.
    
    The target //:go_config gathers build settings relevant to Go and
    provides a GoContextInfo (private).
    
    The target //:go_context_data depends on //:go_config, //:stdlib,
    //:nogo, and a few other standard dependencies. go_binary and go_test
    rules no longer need to depend on these targets directly. Go rules
    should now only need to depend on //:go_context_data and the Go
    toolchain. Unfortunately, neither //:go_context_data nor //:go_config
    can be part of the toolchain because the toolchain is always analyzed
    for the execution configuration, not the target configuration.
    
    Because of the simplified dependencies, the go_rule function is no
    longer needed by most rules. This change makes it possible to
    deprecate it.
    
    Fixes #1351
    Fixes #2219
    Updates #2302
    Jay Conrod authored Apr 17, 2020
    Copy the full SHA
    3edc6d5 View commit details
  3. Fix tests (#2439)

    * go/tools/bazel: use empty.txt as test data instead of README.md
      which was deleted.
    * tests/legacy/build_constraints: 'extern const', not 'const const'.
    Jay Conrod authored Apr 17, 2020
    Copy the full SHA
    da7f361 View commit details

Commits on Apr 20, 2020

  1. Copy the full SHA
    af0f76b View commit details
  2. go_binary, go_test: add gotags attribute (#2440)

    The gotags attribute sets which build tags are enabled when evaluting
    build constraints. This is equivalent to setting
    --@io_bazel_rules_go//go/config:tags on the command line.
    
    Fixes #1351
    Jay Conrod authored Apr 20, 2020
    Copy the full SHA
    8f4ebbd View commit details

Commits on Apr 21, 2020

  1. go: remove searchpaths and searchpath from GoArchive and GoArchiveData (

    #2452)
    
    These are thoroughly obsolete and have been deprecated for a while.
    
    For #2448
    Jay Conrod authored Apr 21, 2020
    Copy the full SHA
    41fd82c View commit details

Commits on Apr 22, 2020

  1. Copy the full SHA
    7a2ed94 View commit details

Commits on Apr 23, 2020

  1. proto: upgrade go_proto_library to support APIv2 (#2455)

    * Added org_golang_google_protobuf at v1.21.0 to
      go_rules_dependencies. This contains the new protobuf runtime.
      It doesn't seem like any *_gen rules are needed, so just using the
      gazelle patch for now.
    * Upgraded com_github_golang_protobuf to v1.4.0. The packages here are
      wrappers org_golang_google_protobuf. Newly generated code should
      work with the old interface. The *_gen targets are still in place,
      but they're simpler.
    * Added new dependencies for packages generated with
      //proto:go_proto, //proto:go_grpc, and //proto:go_proto_bootstrap,
      since the proto compiler imports more runtime packages.
    * We're still using the compiler from com_github_golang_protobuf. It's
      a wrapper for the new one. The new one doesn't support gRPC, and the
      gRPC proto compiler doesn't exist yet. See
      https://github.com/protocolbuffers/protobuf-go/releases#v1.20-grpc-support.
    
    Updates #2395
    Jay Conrod authored Apr 23, 2020
    Copy the full SHA
    2634df7 View commit details

Commits on Apr 27, 2020

  1. Copy the full SHA
    2a00556 View commit details
  2. Fix small typo and obsolete expressions. (#2459)

    Fix small typo and obsolete expressions.
    
    Fixes #2458
    ymotongpoo authored Apr 27, 2020
    Copy the full SHA
    f1fabaf View commit details

Commits on Apr 29, 2020

  1. doc: add warning to crosstool.rst and fix links [skip ci] (#2462)

    Updates #1642
    Fixes #1958
    Jay Conrod authored Apr 29, 2020
    Copy the full SHA
    8f3e396 View commit details

Commits on May 1, 2020

  1. Copy the full SHA
    9900185 View commit details
  2. Fix broken link (#2465)

    visortelle authored May 1, 2020
    Copy the full SHA
    fbbbfde View commit details

Commits on May 4, 2020

  1. Copy the full SHA
    3cf2812 View commit details
  2. go_binary: use file name less likely to be a prefix (#2466)

    A binary named "foo" will now create the executable "foo_/foo" to
    avoid conflicting with subdirectories named "foo".
    
    go.declare_file will no longer cause this problem when only path is
    specified.
    
    Fixes #2463
    Jay Conrod authored May 4, 2020
    Copy the full SHA
    695da59 View commit details

Commits on May 5, 2020

  1. Fix typos (#2468)

    visortelle authored May 5, 2020
    Copy the full SHA
    a07c667 View commit details
  2. nogo: migrate to configuration transitions (#2473)

    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 #2374
    Fixes #2470
    Jay Conrod authored May 5, 2020
    Copy the full SHA
    8bdd81a View commit details
  3. nogo: stop using go_tool_library (#2474)

    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
    Jay Conrod authored May 5, 2020
    Copy the full SHA
    8e6cfa5 View commit details

Commits on May 7, 2020

  1. Upgrade bazel_toolchains in WORKSPACE (#2477)

    Jay Conrod authored May 7, 2020
    Copy the full SHA
    745de50 View commit details
  2. Copy the full SHA
    0a93be4 View commit details

Commits on May 8, 2020

  1. Revert changes migrating nogo to configuration transitions (#2481)

    This rolls back #2473 and #2474 due to #2479, which is caused by bazelbuild/bazel#11291. There doesn't seem to be a way to work around that, and I don't want to hold the release back any longer.
    
    Reopens #2374
    Reopens #2470
    Jay Conrod authored May 8, 2020
    Copy the full SHA
    c0696e4 View commit details
  2. nogo: transition to default mode settings (#2482)

    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 #2473, but it doesn't change how nogo
    fits into the dependency graph.
    
    Fixes #2470
    Jay Conrod authored May 8, 2020
    Copy the full SHA
    bc27740 View commit details
  3. tests/integration/gazelle: test that gazelle builds and runs (#2483)

    catch errors building and running Gazelle in the future.
    Jay Conrod authored May 8, 2020
    Copy the full SHA
    ce51edf View commit details
  4. nogo: fix nil pointer dereference for nilness checker (#2484)

    Fixes #2480
    Jay Conrod authored May 8, 2020
    Copy the full SHA
    28dd92b View commit details

Commits on May 12, 2020

  1. Avoid use of run_shell in bazel rule. (#2488)

    run_shell requires bash which is not available on Windows
    without a msys installation.
    
    The shell was only used for "&&" anyway. We can just use
    two separate actions.
    
    -trimpath requires an absolute path. On Windows we build
    a batch file to expand %cd%. On Unixes we can keep using
    run_shell.
    tomlu authored May 12, 2020
    Copy the full SHA
    280a1ed View commit details

Commits on May 13, 2020

  1. Update dependencies for v0.23.0 release (#2490)

    Jay Conrod authored May 13, 2020
    Copy the full SHA
    ab18b41 View commit details
  2. Set RULES_GO_VERSION to 0.23.0 (#2495)

    Jay Conrod authored May 13, 2020
    Copy the full SHA
    b2a2d93 View commit details
Showing with 35,184 additions and 20,207 deletions.
  1. +26 −26 .bazelci/presubmit.yml
  2. +30 −0 .github/PULL_REQUEST_TEMPLATE.md
  3. +70 −52 BUILD.bazel
  4. +298 −207 README.rst
  5. +0 −103 Vendoring.md
  6. +5 −5 WORKSPACE
  7. +0 −166 deprecation.rst
  8. +2 −2 extras/embed_data.bzl
  9. +6 −1 go/BUILD.bazel
  10. +66 −0 go/config/BUILD.bazel
  11. +57 −57 go/core.rst
  12. +10 −4 go/crosstool.rst
  13. +44 −1 go/def.bzl
  14. +71 −55 go/{workspace.rst → dependencies.rst}
  15. +1 −1 go/extras.rst
  16. +108 −156 go/modes.rst
  17. +33 −1 go/nogo.rst
  18. +6 −0 go/platform/BUILD.bazel
  19. +10 −7 go/private/actions/archive.bzl
  20. +1 −1 go/private/actions/binary.bzl
  21. +3 −3 go/private/actions/stdlib.bzl
  22. +1 −1 go/private/common.bzl
  23. +190 −95 go/private/context.bzl
  24. +33 −64 go/private/mode.bzl
  25. +8 −1 go/private/platforms.bzl
  26. +5 −1 go/private/providers.bzl
  27. +97 −37 go/private/repositories.bzl
  28. +71 −101 go/private/rules/binary.bzl
  29. +1 −1 go/private/rules/info.bzl
  30. +8 −9 go/private/rules/library.bzl
  31. +50 −9 go/private/rules/nogo.bzl
  32. +1 −26 go/private/rules/rule.bzl
  33. +5 −7 go/private/rules/source.bzl
  34. +14 −6 go/private/rules/stdlib.bzl
  35. +21 −72 go/private/rules/test.bzl
  36. +175 −0 go/private/rules/transition.bzl
  37. +21 −6 go/private/rules/wrappers.bzl
  38. +54 −418 go/private/sdk_list.bzl
  39. +0 −8 go/providers.rst
  40. +6 −0 go/toolchain/BUILD.bazel
  41. +77 −163 go/toolchains.rst
  42. +1 −0 go/tools/BUILD.bazel
  43. +1 −1 go/tools/bazel/BUILD.bazel
  44. +0 −9 go/tools/bazel/README.md
  45. +1 −1 go/tools/bazel/bazel_test.go
  46. 0 go/tools/bazel/empty.txt
  47. +7 −0 go/tools/bazel_testing/BUILD.bazel
  48. +18 −0 go/tools/bazel_testing/bazel_testing.go
  49. +1 −1 go/tools/bazel_testing/def.bzl
  50. +0 −40 go/tools/builders/README.rst
  51. +5 −1 go/tools/builders/compilepkg.go
  52. +7 −1 go/tools/builders/nogo_main.go
  53. +18 −1 go/tools/testwrapper/wrap.go
  54. +11 −9 proto/BUILD.bazel
  55. +1 −1 proto/core.rst
  56. +0 −230 roadmap.rst
  57. +2 −0 tests/core/README.rst
  58. +13 −0 tests/core/cross/BUILD.bazel
  59. +18 −6 tests/core/cross/README.rst
  60. +3 −0 tests/core/cross/lib_darwin.go
  61. +3 −0 tests/core/cross/lib_linux.go
  62. +3 −0 tests/core/cross/lib_windows.go
  63. +3 −1 tests/core/cross/main.go
  64. +27 −1 tests/core/go_binary/BUILD.bazel
  65. +11 −0 tests/core/go_binary/README.rst
  66. +8 −0 tests/core/go_binary/prefix/BUILD.bazel
  67. +3 −0 tests/core/go_binary/prefix/prefix.go
  68. +5 −0 tests/core/go_binary/tags_lib_bad.go
  69. +1 −0 tests/core/go_binary/tags_lib_good.go
  70. +5 −0 tests/core/go_binary/tags_main_bad.go
  71. +8 −0 tests/core/go_binary/tags_main_good.go
  72. +6 −6 tests/core/go_download_sdk/go_download_sdk_test.go
  73. +9 −1 tests/{legacy → core}/go_embed_data/BUILD.bazel
  74. +11 −0 tests/core/go_embed_data/README.rst
  75. +7 −1 tests/{legacy → core}/go_embed_data/embed_test.go
  76. +1 −0 tests/core/go_embed_data/error.c
  77. +9 −0 tests/core/go_test/BUILD.bazel
  78. +6 −0 tests/core/go_test/README.rst
  79. +9 −0 tests/core/go_test/tags_bad_test.go
  80. +7 −0 tests/core/go_test/tags_good_test.go
  81. +78 −51 tests/core/go_test/xmlreport_test.go
  82. +3 −1 tests/core/nogo/config/README.rst
  83. +13 −13 tests/core/nogo/config/config_test.go
  84. +2 −1 tests/core/output_groups/BUILD.bazel
  85. +38 −21 tests/core/output_groups/compilation_outputs_test.go
  86. +24 −10 tests/core/stdlib/stdlib_files.bzl
  87. +7 −0 tests/core/transition/BUILD.bazel
  88. +18 −0 tests/core/transition/README.rst
  89. +84 −0 tests/core/transition/cmdline_test.go
  90. +1 −0 tests/integration/README.rst
  91. +11 −0 tests/integration/gazelle/BUILD.bazel
  92. +9 −0 tests/integration/gazelle/README.rst
  93. +74 −0 tests/integration/gazelle/gazelle_test.go
  94. +7 −5 tests/integration/popular_repos/BUILD.bazel
  95. +7 −5 tests/integration/popular_repos/README.rst
  96. +17 −1 tests/integration/popular_repos/popular_repos.py
  97. +2 −2 tests/legacy/build_constraints/cgo_linux.go
  98. +2 −2 tests/legacy/build_constraints/cgo_unknown.go
  99. +1 −1 tests/legacy/cgo_pure/cgo.go
  100. +1 −1 tests/legacy/cgo_pure/cgo_no_tag.go
  101. +1 −1 tests/legacy/empty_package/cgo.go
  102. +14 −313 third_party/com_github_golang_protobuf-extras.patch
  103. +205 −430 third_party/com_github_golang_protobuf-gazelle.patch
  104. +23,861 −15,143 third_party/go_googleapis-deletebuild.patch
  105. +2,613 −1,394 third_party/go_googleapis-gazelle.patch
  106. +1,263 −16 third_party/org_golang_google_genproto-gazelle.patch
  107. +2,747 −0 third_party/org_golang_google_protobuf-gazelle.patch
  108. +881 −183 third_party/org_golang_x_tools-deletegopls.patch
  109. +48 −50 third_party/org_golang_x_tools-extras.patch
  110. +1,168 −379 third_party/org_golang_x_tools-gazelle.patch
  111. +50 −0 third_party/org_golang_x_xerrors-gazelle.patch
52 changes: 26 additions & 26 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
platforms:
ubuntu1604:
bazel: 1.2.0 # test minimum supported version of bazel on ubuntu1604 only
bazel: 2.2.0 # test minimum supported version of bazel on ubuntu1604 only
build_targets:
- "..."
test_targets:
@@ -159,6 +159,17 @@ platforms:
- "-//tests/core/coverage:coverage_test"
- "-//tests/core/cross:cross_test"
- "-//tests/core/go_binary:go_default_test"
- "-//tests/core/go_embed_data:go_default_test"
- "-//tests/core/go_embed_data:go_default_library"
- "-//tests/core/go_embed_data:unpack"
- "-//tests/core/go_embed_data:str"
- "-//tests/core/go_embed_data:single"
- "-//tests/core/go_embed_data:local"
- "-//tests/core/go_embed_data:flat"
- "-//tests/core/go_embed_data:ext"
- "-//tests/core/go_embed_data:empty"
- "-//tests/core/go_embed_data:embedded_zip"
- "-//tests/core/go_embed_data:embedded_tar"
- "-//tests/core/go_path:go_path"
- "-//tests/core/go_path:go_path_test"
- "-//tests/core/go_path:nodata_path"
@@ -189,7 +200,6 @@ platforms:
- "-//tests/core/go_proto_library:wrap_lib"
- "-//tests/core/go_test:data_test"
- "-//tests/core/go_test:pwd_test"
- "-//tests/core/output_groups:compilation_outputs_test"
- "-//tests/core/stdlib:buildid_test"
- "-//tests/examples/executable_name:executable_name"
- "-//tests/integration/googleapis:color_service"
@@ -226,17 +236,6 @@ platforms:
- "-//tests/legacy/examples/proto:proto_pure_test"
- "-//tests/legacy/examples/proto:proto_test"
- "-//tests/legacy/extldflags_rpath:extldflags_rpath_test"
- "-//tests/legacy/go_embed_data:go_default_test"
- "-//tests/legacy/go_embed_data:go_default_library"
- "-//tests/legacy/go_embed_data:unpack"
- "-//tests/legacy/go_embed_data:str"
- "-//tests/legacy/go_embed_data:single"
- "-//tests/legacy/go_embed_data:local"
- "-//tests/legacy/go_embed_data:flat"
- "-//tests/legacy/go_embed_data:ext"
- "-//tests/legacy/go_embed_data:empty"
- "-//tests/legacy/go_embed_data:embedded_zip"
- "-//tests/legacy/go_embed_data:embedded_tar"
- "-//tests/legacy/info:info"
- "-//tests/legacy/proto_ignore_go_package_option:a_go_proto"
- "-//tests/legacy/proto_ignore_go_package_option:a_proto"
@@ -292,6 +291,18 @@ platforms:
- "-//tests/core/cross:cross_test"
- "-//tests/core/go_binary:go_default_test"
- "-//tests/core/go_binary:stamp_test"
- "-//tests/core/go_embed_data:go_default_test"
- "-//tests/core/go_embed_data:go_default_test"
- "-//tests/core/go_embed_data:go_default_library"
- "-//tests/core/go_embed_data:unpack"
- "-//tests/core/go_embed_data:str"
- "-//tests/core/go_embed_data:single"
- "-//tests/core/go_embed_data:local"
- "-//tests/core/go_embed_data:flat"
- "-//tests/core/go_embed_data:ext"
- "-//tests/core/go_embed_data:empty"
- "-//tests/core/go_embed_data:embedded_zip"
- "-//tests/core/go_embed_data:embedded_tar"
- "-//tests/core/go_path:go_path"
- "-//tests/core/go_path:go_path_test"
- "-//tests/core/go_path:link_path"
@@ -305,11 +316,12 @@ platforms:
- "-//tests/core/go_proto_library:transitive_test"
- "-//tests/core/go_test:data_test"
- "-//tests/core/go_test:pwd_test"
- "-//tests/core/nogo/config:config_test"
- "-//tests/core/nogo/coverage:coverage_test"
- "-//tests/core/nogo/vet:vet_test"
- "-//tests/core/output_groups:compilation_outputs_test"
- "-//tests/core/stdlib:buildid_test"
- "-//tests/examples/executable_name:executable_name"
- "-//tests/integration/gazelle:gazelle_test"
- "-//tests/integration/googleapis:color_service_test"
- "-//tests/integration/reproducibility:reproducibility_test"
- "-//tests/legacy/examples/cgo/example_command:example_command_test"
@@ -326,18 +338,6 @@ platforms:
- "-//tests/legacy/examples/proto:proto_pure_test"
- "-//tests/legacy/examples/proto:proto_test"
- "-//tests/legacy/extldflags_rpath:extldflags_rpath_test"
- "-//tests/legacy/go_embed_data:go_default_test"
- "-//tests/legacy/go_embed_data:go_default_test"
- "-//tests/legacy/go_embed_data:go_default_library"
- "-//tests/legacy/go_embed_data:unpack"
- "-//tests/legacy/go_embed_data:str"
- "-//tests/legacy/go_embed_data:single"
- "-//tests/legacy/go_embed_data:local"
- "-//tests/legacy/go_embed_data:flat"
- "-//tests/legacy/go_embed_data:ext"
- "-//tests/legacy/go_embed_data:empty"
- "-//tests/legacy/go_embed_data:embedded_zip"
- "-//tests/legacy/go_embed_data:embedded_tar"
- "-//tests/legacy/info:info"
- "-//tests/legacy/test_chdir:go_default_test"
- "-//tests/legacy/test_rundir:go_default_test"
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- Thanks for sending a PR! Before submitting:
1. If this is your first PR, please read CONTRIBUTING.md and sign the CLA
first. We cannot review code without a signed CLA.
2. Please file an issue *first*. All features and most bug fixes should have
an associated issue with a design discussed and decided upon. Small bug
fixes and documentation improvements don't need issues.
3. New features and bug fixes must have tests. Documentation may need to
be updated. If you're unsure what to update, send the PR, and we'll discuss
in review.
4. Note that PRs updating dependencies and new Go versions are not accepted.
Please file an issue instead.
-->

**What type of PR is this?**

> Uncomment one line below and remove others.
>
> Bug fix
> Feature
> Documentation
> Other
**What does this PR do? Why is it needed?**

**Which issues(s) does this PR fix?**

Fixes #

**Other notes for review**
122 changes: 70 additions & 52 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
load("@io_bazel_rules_go//go/private:tools/lines_sorted_test.bzl", "lines_sorted_test")
load("@io_bazel_rules_go//go/private:rules/nogo.bzl", "nogo")
load("@io_bazel_rules_go//go/private:rules/info.bzl", "go_info")
load("@io_bazel_rules_go//go/private:context.bzl", "cgo_context_data", "go_context_data")
load("@io_bazel_rules_go//go/private:rules/stdlib.bzl", "stdlib")
load(
"@io_bazel_rules_go//go/private:tools/lines_sorted_test.bzl",
"lines_sorted_test",
)
load(
"@io_bazel_rules_go//go/private:rules/nogo.bzl",
"nogo",
)
load(
"@io_bazel_rules_go//go/private:rules/info.bzl",
"go_info",
)
load(
"@io_bazel_rules_go//go:def.bzl",
"TOOLS_NOGO",
)
load(
"@io_bazel_rules_go//go/private:context.bzl",
"cgo_context_data",
"cgo_context_data_proxy",
"go_config",
"go_context_data",
)
load(
"@io_bazel_rules_go//go/private:rules/stdlib.bzl",
"stdlib",
)

stdlib(
name = "stdlib",
cgo_context_data = select({
"//go/platform:internal_cgo_off": None,
"//conditions:default": ":cgo_context_data",
}),
visibility = ["//visibility:public"],
)

@@ -24,68 +50,60 @@ nogo(
nogo(
name = "tools_nogo",
visibility = ["//visibility:public"],
deps = [
"@org_golang_x_tools//go/analysis/passes/asmdecl:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/assign:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/atomic:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/atomicalign:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/bools:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/buildssa:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/buildtag:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/cgocall:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/composite:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/copylock:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/ctrlflow:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/deepequalerrors:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/errorsas:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/findcall:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/httpresponse:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/inspect:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/loopclosure:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/lostcancel:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/nilfunc:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/nilness:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/pkgfact:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/printf:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/shadow:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/shift:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/sortslice:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/stdmethods:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/stringintconv:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/structtag:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/testinggoroutine:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/tests:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/unmarshal:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/unreachable:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/unsafeptr:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/unusedresult:go_tool_library",
],
deps = TOOLS_NOGO,
)

# go_context_data collects build options and is depended on by all Go targets.
# It may depend on cgo_context_data if CGo isn't disabled.
go_context_data(
name = "go_context_data",
cgo_context_data = select({
"@io_bazel_rules_go//go/platform:internal_cgo_off": None,
"//go/platform:internal_cgo_off": None,
"//conditions:default": ":cgo_context_data",
}),
stamp = select({
"@io_bazel_rules_go//go/private:stamp": True,
"//conditions:default": False,
}),
strip = select({
"@io_bazel_rules_go//go/private:strip-always": "always",
"@io_bazel_rules_go//go/private:strip-sometimes": "sometimes",
"@io_bazel_rules_go//go/private:strip-never": "never",
}),
coverdata = "//go/tools/coverdata",
go_config = ":go_config",
nogo = "@io_bazel_rules_nogo//:nogo",
stdlib = ":stdlib",
visibility = ["//visibility:public"],
)

# cgo_context_data collects information about the C/C++ toolchain.
# go_toolchains may depend on this in order to support cgo.
# go_context_data depends if cgo is enabled in the target configuration.
cgo_context_data(
name = "cgo_context_data",
visibility = ["//visibility:private"],
)

# cgo_context_data_proxy depends on cgo_context_data if cgo is enabled and
# forwards its provider. Rule attributes may depend on this, since they cannot
# use select.
cgo_context_data_proxy(
name = "cgo_context_data_proxy",
actual = select({
"//go/platform:internal_cgo_off": None,
"//conditions:default": ":cgo_context_data",
}),
visibility = ["//visibility:public"],
)

# go_config collects information about build settings in the current
# configuration. go_context_data depends on this so that rules don't need
# to depend on all build settings directly.
go_config(
name = "go_config",
debug = "//go/config:debug",
gotags = "//go/config:tags",
linkmode = "//go/config:linkmode",
msan = "//go/config:msan",
pure = "//go/config:pure",
race = "//go/config:race",
stamp = select({
"//go/private:stamp": True,
"//conditions:default": False,
}),
static = "//go/config:static",
strip = "//go/config:strip",
visibility = ["//visibility:public"],
)

Loading