sourcegraph/cmd/frontend/internal
Noah S-C 19d9cfc73b
bazel: native go-mockgen in Bazel (#60386)
Adds a new:
- gazelle generator
- rule + rule targets + catchall target
for generating go-mockgen mocks & testing for their being up-to-date.

Each go_mockgen macro invocation adds targets for generating mocks, copying to the source tree, as well as testing whether the current source tree mocks are up-to-date.

How to use this: `bazel run //dev:go_mockgen` for the catch-all, or `bazel run //some/target:generate_mocks` for an individual package, and `bazel test //some/target:generate_mocks_tests` to test for up-to-date-ness. There is no catch-all for testing

This currently uses a fork of go-mockgen, with an open PR for upstream here: https://github.com/derision-test/go-mockgen/pull/50.

Closes https://github.com/sourcegraph/sourcegraph/issues/60099

## Test plan

Extensive testing during development, including the following cases:
- Deleting a generated file and its entry in a go_library/go_test `srcs` attribute list and then re-running `sg bazel configure`
- Adding a non-existent output directory to mockgen.test.yaml and running the bash one-liner emitted to prepare the workspace for rerunning `sg bazel configure`

The existing config tests a lot of existing paths anyway (creating mocks for a 3rd party library's interface, entries for a given output file in >1 config file etc)
2024-02-16 13:26:48 +00:00
..
app gitserver: Small mocks cleanup (#60497) 2024-02-15 20:39:56 +01:00
auth Revert "oidc: add prompt login option (#60036)" (#60498) 2024-02-14 00:50:11 +00:00
authz Implement licensing changes for Sourcegraph 5.3 (#60046) 2024-02-05 11:58:58 +01:00
batches Implement licensing changes for Sourcegraph 5.3 (#60046) 2024-02-05 11:58:58 +01:00
bg re-land Cody RBAC change (#59657) 2024-01-17 20:50:11 +00:00
cli Implement licensing changes for Sourcegraph 5.3 (#60046) 2024-02-05 11:58:58 +01:00
codeintel logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
codemonitors code-monitors: handle soft-deleted users (#60405) 2024-02-13 14:30:39 +01:00
completions cody: Improve error messages for isCodyEnabled (#60188) 2024-02-06 14:43:26 +01:00
compute Chore: clean up RepositoryResolver, part II (#59405) 2024-01-09 17:17:06 +00:00
contentlibrary logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
context Add .cody/ignore support to remote context (#59836) 2024-01-31 14:48:41 -05:00
dotcom Add Llama Code 13b to all PLG users and remove unused model conversation (#60332) 2024-02-09 11:51:25 +01:00
embeddings cody: Improve error messages for isCodyEnabled (#60188) 2024-02-06 14:43:26 +01:00
executorqueue bazel: native go-mockgen in Bazel (#60386) 2024-02-16 13:26:48 +00:00
githubapp batches: allow refreshing commit signing apps installation (#60125) 2024-02-14 18:11:35 +00:00
gosrc ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
guardrails [dotcom] log.NoOp passed into attribution search client (#60464) 2024-02-15 10:40:59 +01:00
handlerutil Misc: retain URL params on redirect (#59887) 2024-01-25 19:28:18 -07:00
httpapi bazel: native go-mockgen in Bazel (#60386) 2024-02-16 13:26:48 +00:00
insights eventlogs: use real deprecation warnings in backend (#58751) 2023-12-05 17:05:41 +00:00
licensing Don't verify license on free plan (#60503) 2024-02-15 13:38:10 +02:00
notebooks Chore: construct logger inside dbtest.NewDB (#57549) 2023-10-11 20:41:11 -05:00
own gitserver: Unify filereader API (#59782) 2024-01-24 13:53:57 +01:00
processrestart bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
rbac eventlogs: use real deprecation warnings in backend (#58751) 2023-12-05 17:05:41 +00:00
registry Chore: remove empty BUILD.bazel files (#58250) 2023-11-10 11:36:11 -07:00
repos/webhooks Remove HTTP for inter-service RPC (#59093) 2024-01-11 19:46:32 +01:00
routevar ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
scim Merge enterprise and oss frontend (#56476) 2023-09-11 14:16:38 +02:00
search Search results: add a message for when the display limit is hit (#60220) 2024-02-08 01:34:08 -03:00
searchcontexts Chore: clean up RepositoryResolver, part II (#59405) 2024-01-09 17:17:06 +00:00
telemetry graphqlbackend/telemetry: add query for recently exported events (#57029) 2023-12-15 12:43:45 -08:00