Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synthesize fake GOPATH and remove bazel_copy_generated_for_ide.sh
We can use rules_go to create a fake symlink farm GOPATH. This can be set as the GOPATH in IDEs that do not have native support for Bazel, and we can stop maintaining the bazel_copy_generated_for_ide.sh hack. The remaining issue is that we still need Go tooling to manage our go.mod file that serves as the input to Gazelle, so we need to add replace directives to ensure that Go tools can resolve generated code. The proper fix for all this is the upcoming native Bazel support in Go: bazel-contrib/rules_go#512 Test Plan: Ran `bazel build :gopath`, and a wild `bazel-bin/gopath/src/git.monogon.dev/source/nexantic.git/core/generated/api/schema.pb.go` appeared. `scripts/symlink_generated_files.sh` created a valid symlink in core/generated and `go mod tidy` ran successfully (despite complaining about the symlink). Running `scripts/gazelle.sh` twice worked. X-Origin-Diff: phab/D305 GitOrigin-RevId: 0d456bc57d4a2d72e30865ffef777d2f5be5c407
- Loading branch information