diff --git a/c-bindings/BUILD.bazel b/c-bindings/BUILD.bazel index ee8006b..9edd4bd 100644 --- a/c-bindings/BUILD.bazel +++ b/c-bindings/BUILD.bazel @@ -1,5 +1,14 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") +# If you run `go build` a header "libgojsonnet.h" will be autogenerated in +# this directory. Then it can be picked up by Gazelle and added to `srcs` here. +# When building with Bazel the file gets created elsewhere in Bazel's +# sandbox tree, so when using Bazel exclusively it won't cause any trouble. +# However, sooner or later someone is going to run Gazelle after using `go build` +# and then the file may slip in, so it's better to just exclude it explicitly, +# with the directive below: +# gazelle:exclude ./libgojsonnet.h + go_library( name = "go_default_library", srcs = [