Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect --symlink_prefix bazel setting #168

Closed
excavador opened this issue Mar 24, 2018 · 3 comments · Fixed by #1384
Closed

Respect --symlink_prefix bazel setting #168

excavador opened this issue Mar 24, 2018 · 3 comments · Fixed by #1384

Comments

@excavador
Copy link

If configure bazel (tools/bazel.rc) by following option:

--symlink_prefix=bazel/

gazelle will try to inspect bazel directories.

Need to respect this option in some way.
For start would be enough add option to 'gazelle' run rule.

@excavador excavador changed the title Respect --symlink_prefix bazel settings Respect --symlink_prefix bazel setting Mar 24, 2018
@jayconrod
Copy link
Contributor

I think the best way to ignore these is adding # gazelle:exclude directives in your root build file. This will prevent Gazelle from recursing into those directories.

# gazelle:exclude bazel

There are too many complications around Bazel rc files for Gazelle to parse them and figure this automatically. They can be stored in several different places (some checked in, some not), and flags can be conditional (depending on the configuration).

@excavador
Copy link
Author

@jayconrod nice workaround, thank you, but would be great to have direct solution.

@ryanrhee
Copy link

ryanrhee commented Nov 9, 2020

As of now, the gazelle:exclude workaround does not stop gazelle from inspecting bazel directories.

rickystewart added a commit to rickystewart/cockroach that referenced this issue May 26, 2021
tests. Since then, we've seen `gazelle` occasionally time out lint jobs
in CI (see cockroachdb#65715). The error messages don't make a great deal of sense;
a bunch of them look like this:

    gazelle: found packages exports (exports.go) and p (issue20046.go) in /go/src/github.com/cockroachdb/cockroach/_bazel/bin/pkg/testutils/lint/passes/forbiddenmethod/forbiddenmethod_test_/forbiddenmethod_test.runfiles/go_sdk/src/go/internal/gcimporter/testdata

i.e., Gazelle is looking in `_bazel/bin`, finding `testdata` for the
`go/internal/gcimporter` package in the `go_sdk`, and complaining about
the results. So we add `_bazel` to the list of `exclude`s to prevent
this. This is necessary according to
bazel-contrib/bazel-gazelle#168.

Release note: None
craig bot pushed a commit to cockroachdb/cockroach that referenced this issue May 26, 2021
64029: roachprod: remove support for spinning up cassandra clusters r=jlinder a=alan-mas

When working on #47567, we discovered that the cassandra cluster support is no longer used and can be removed. This commit removes cassandra cluster support. 

Release note: None

65705: settings: mark diagnostics.forced_stat_reset.interval as retired r=otan a=rafiss

It was removed in ac3c723 but was never
added to this list. This prevents noise in the logs when trying to read
the old setting name.

Release note: None

65732: bazel: exclude `_bazel` from consideration by gazelle r=rail a=rickystewart

tests. Since then, we've seen `gazelle` occasionally time out lint jobs
in CI (see #65715). The error messages don't make a great deal of sense;
a bunch of them look like this:

    gazelle: found packages exports (exports.go) and p (issue20046.go) in /go/src/github.com/cockroachdb/cockroach/_bazel/bin/pkg/testutils/lint/passes/forbiddenmethod/forbiddenmethod_test_/forbiddenmethod_test.runfiles/go_sdk/src/go/internal/gcimporter/testdata

i.e., Gazelle is looking in `_bazel/bin`, finding `testdata` for the
`go/internal/gcimporter` package in the `go_sdk`, and complaining about
the results. So we add `_bazel` to the list of `exclude`s to prevent
this. This is necessary according to
bazel-contrib/bazel-gazelle#168.

Release note: None

Co-authored-by: Alanmas <acostas.alan@gmail.com>
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants