-
Notifications
You must be signed in to change notification settings - Fork 380
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
Optionally disable generation of go_test rules for vendor and dependencies #37
Comments
As a workaround for this, I'm running |
That works. Also, if you're using |
This works today with
It would be nice if |
Is it possible to exclude a path in an external dependency? My project depends on kubernetes-sigs/controller-runtime, which has test files pkg/webhook/conversion/testdata/main.go and pkg/webhook/conversion/conversion_test.go that import several packages that don't exist. Whenever I run bazel build, it prints the following warnings:
I've tried various paths with Here are a few of the unsuccessful attempts:
|
@seh |
Adding the |
Ah, sorry for the trouble. It will be a little simpler in the next version. Since #603, you're able to add directives to the root build file of a |
#603 doesn't seem to directly address that. I'm running
It seems that gazelle tries to If I understand correctly I have to manually exclude the test files of my dependencies, but that doesn't scale, having potentially hundreds of files that need to be excluded. Although I think this is related with this feature request, I can create a separate issue if you'd like. |
I'm using Would be good to be able to tell generated |
just in case someone hit the same problem: |
(Migrated from bazel-contrib/rules_go#725)
In some situations, it may be desirable to ignore tests in dependencies (both in vendor directories and in external repositories). Test rules may introduce additional dependencies and slow down the build.
It should be possible to disable generation of
go_test
rules via a directive or a command line option (to be passed throughgo_repository
).The text was updated successfully, but these errors were encountered: