-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
By passing the Starlark representation of a module extension tag to the new `causes` parameter of `fail`, module extensions can generate more concise and helpful error messages on user errors. Before: ``` ERROR: Traceback (most recent call last): File "/home/user/.cache/bazel/_bazel_user/466e6feac151a1e22847383f4e503361/external/gazelle~override/internal/bzlmod/go_deps.bzl", line 165, column 21, in _go_deps_impl fail("Multiple overrides defined for Go module path \"{}\" in module \"{}\".".format(override_tag.path, module.name)) Error in fail: Multiple overrides defined for Go module path "github.com/stretchr/testify" in module "gazelle_bcr_tests". ``` After: ``` ERROR: Multiple overrides defined for Go module path "github.com/stretchr/testify" in module "gazelle_bcr_tests". Causes: bazel_module_tag in file "<root>/MODULE.bazel", line 39, column 25, with value: go_deps.gazelle_override( path = "github.com/stretchr/testify", directives = ["gazelle:go_naming_convention go_default_library"], ) ```
- Loading branch information
Showing
5 changed files
with
85 additions
and
30 deletions.
There are no files selected for viewing
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
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
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
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
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