Skip to content

Commit

Permalink
Fix Gazelle collision error format
Browse files Browse the repository at this point in the history
Updates the error message to ease copy-paste into the build file.

Before:

> Append one of the following to BUILD.bazel
> # gazelle:resolve java {com.example.a.b.c} @maven//:com_example_a_b_c
> # gazelle:resolve java {com.foo.a.b.c} @maven//:com_foo_a_b_c

After:

> Append one of the following to BUILD.bazel
> # gazelle:resolve java com.example.a.b.c @maven//:com_example_a_b_c
> # gazelle:resolve java com.foo.a.b.c @maven//:com_foo_a_b_c
  • Loading branch information
stevebarrau committed Sep 4, 2023
1 parent 98138f2 commit 8dfd462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/gazelle/private/maven/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (r *resolver) Resolve(pkg types.PackageName, excludedArtifacts map[string]s
default:
r.logger.Error().Msg("Append one of the following to BUILD.bazel:")
for _, k := range filtered {
r.logger.Error().Msgf("# gazelle:resolve java %s %s", pkg, k)
r.logger.Error().Msgf("# gazelle:resolve java %s %s", pkg.Name, k)
}

return label.NoLabel, errors.New("many possible imports")
Expand Down

0 comments on commit 8dfd462

Please sign in to comment.