sourcegraph/lib
Robert Lin 40eedcac19
monitoring: extract into a submodule (#45786)
This change extracts `monitoring` into a submodule for import in `sourcegraph/controller` (https://github.com/sourcegraph/controller/pull/195) so that we can generate dashboards for Cloud instances. These steps were required:

1. Initialize a `go.mod` in `monitoring`
2. Extract `dev/sg/internal/cliutil` into `lib` to avoid illegal imports from `monitoring`
3. Add local replaces to both `sourcegraph/sourcegraph` and `monitoring`
4. `go mod tidy` on all submodules
5. Update `go generate ./monitoring` commands to use `sg`, since the `go generate` command no longer works
6. Update `grafana/build.sh`, `prometheus/build.sh` to build the submodule
7. Amend linters to check for multiple `go.mod` files and ban imports of `github.com/sourcegraph/sourcegraph`
8. Update `sg generate go` to run in directories rather than from root

The only caveat is that if you use VS code, you will now need to open `monitoring` in a separate workspace or similar, like with `lib`.

Co-authored-by: Joe Chen <joe@sourcegraph.com>
2022-12-19 17:49:25 +00:00
..
api Reinstate executors e2e (#45699) 2022-12-15 11:55:31 +00:00
batches Clean linting errors from unparam (#45548) 2022-12-13 11:18:25 +01:00
cliutil monitoring: extract into a submodule (#45786) 2022-12-19 17:49:25 +00:00
codeintel codeintel: first implementation of auto-indexing secrets (#45580) 2022-12-15 22:32:16 +00:00
errors Backend: replace uses of errors.Group with lib/group (#42787) 2022-10-11 10:31:22 -06:00
gitservice requestclient: propagate request client IP, add gitserver access logger (#38798) 2022-07-15 13:32:31 +02:00
group lib/group: propagate panics from child goroutines (#42679) 2022-10-07 13:58:44 -06:00
iterator iterator: return all items before returning error (#45704) 2022-12-15 20:21:48 +02:00
output Disable terminal cursor toggling when not in a terminal (#42021) 2022-09-29 17:45:05 -04:00
process lib/process: always pipe _exactly_ what the command outputs (#36574) 2022-06-03 15:13:27 -07:00
go.mod dev/sg: add simple installer for mi2 (#45645) 2022-12-14 06:51:44 +00:00
go.sum dev/sg: add simple installer for mi2 (#45645) 2022-12-14 06:51:44 +00:00
README.md lib: Introduce non-enterprise lib directory (#18992) 2021-03-10 19:41:33 -06:00
tools.go build with go 1.17 (#24566) 2021-09-03 14:46:55 +00:00

Sourcegraph lib module

This directory is the root of a separate go module from the primary module rooted at sourcegraph/sourcegraph. This module exists to hold code that we want to reuse outside of the sourcegraph/sourcegraph repo.

Code in this module should not import from sourcegraph/sourcegraph or from other Sourcegraph repositories to avoid complicated dependency relationships. Instead consider moving code from elsewhere into this module.