From c6874e33f7336d7837cbc13eeb2a848df6cc42ea Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Wed, 20 Oct 2021 19:36:08 +0800 Subject: [PATCH] fix transitions (#9804) --- tools/go/def.bzl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/go/def.bzl b/tools/go/def.bzl index 0176f25a7..115b15abb 100644 --- a/tools/go/def.bzl +++ b/tools/go/def.bzl @@ -9,13 +9,15 @@ def _go_test_transition_impl(settings, attr): if attr.eth_network == "minimal": settings["//proto:network"] = "minimal" settings["@io_bazel_rules_go//go/config:tags"] += ["minimal"] - elif attr.eth_network == "mainnet": # Default / optional + elif attr.eth_network == "mainnet": # Default / optional settings["//proto:network"] = "mainnet" settings["@io_bazel_rules_go//go/config:tags"] += ["mainnet"] if attr.gotags: settings["@io_bazel_rules_go//go/config:tags"] += attr.gotags + if str(settings["//command_line_option:compilation_mode"]) == "dbg": + settings["@io_bazel_rules_go//go/config:debug"] = True return settings go_test_transition = transition( @@ -23,10 +25,14 @@ go_test_transition = transition( inputs = [ "@io_bazel_rules_go//go/config:tags", "//proto:network", + "//command_line_option:compilation_mode", + "@io_bazel_rules_go//go/config:debug", ], outputs = [ "@io_bazel_rules_go//go/config:tags", "//proto:network", + "//command_line_option:compilation_mode", + "@io_bazel_rules_go//go/config:debug", ], )