Skip to content

Commit

Permalink
Move Gazelle extension to //gazelle/bzl and change package name
Browse files Browse the repository at this point in the history
This fixes an issue with importing bazel-skylib into
google3. Currently, Glaze (internal Go build file generator) attempts
to generate a target (//gazelle:gazelle) that conflicts with one
that's already declared here.

I think the right solution is actually to move the package into a
subdirectory. In the future (bazel-contrib/bazel-gazelle#5), Gazelle's Go
extension will generate target names similar to what Glaze does, so
the same conflict will happen in open source. I think it's also
logical to have a directory of packages in case more need to be added
in the future, and for the extension to have a package name matching
the language it works with.

This is an incompatible change, but the //gazelle directory isn't part
of a tagged release yet, so hopefully it won't break anyone.
  • Loading branch information
Jay Conrod committed Aug 4, 2020
1 parent d62d6f5 commit c3fa408
Show file tree
Hide file tree
Showing 49 changed files with 2 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gazelle/gazelle.go → gazelle/bzl/gazelle.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
//
// This extension is experimental and subject to change. It is not included
// in the default Gazelle binary.
package gazelle
package bzl

import (
"flag"
Expand Down
2 changes: 1 addition & 1 deletion gazelle/gazelle_test.go → gazelle/bzl/gazelle_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gazelle
package bzl

/* Copyright 2020 The Bazel Authors. All rights reserved.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c3fa408

Please sign in to comment.