bazel-contrib / bazel-contrib/rules_go
Consider exposing a `gopackagesdriver.sh` instead of having the user create one.
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 760
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 12
Description
### What version of rules_go are you using?
`v0.35.0`.
### What version of gazelle are you using?
N/A
### What version of Bazel are you using?
`5.3.0`.
### Does this issue reproduce with the latest releases of all the above?
Yes.
### What operating system and processor architecture are you using?
N/A
### Any other potentially useful information about your toolchain?
N/A
### What did you do?
Configured my IDE in accordance to https://github.com/bazelbuild/rules_go/wiki/Editor-setup.
### What did you expect to see?
Ideally, the user should not have to add a script to their repository as part of the IDE setup. It is, at most, a minor inconvenience, but it could be slightly smoother if the configuration could directly point to a script this repository provides. For example, with VSCode
```jsonc
{
"go.goroot": "${workspaceFolder}/bazel-${workspaceFolderBasename}/external/go_sdk",
"go.toolsEnvVars": {
"GOPACKAGESDRIVER": "${workspaceFolder}/bazel-${workspaceFolderBasename}/external/io_bazel_rules_go/gopackagesdriver.sh"
},
// Et cetera
}
```
If it wasn't for [the workaround with `GOPACKAGESDRIVER_RULES_GO_REPOSITORY_NAME`](https://github.com/bazelbuild/rules_go/blob/v0.35.0/go/tools/gopackagesdriver/main.go#L52-L54), it would be possible to just refer to the `tools/gopackagesdriver.sh` this repository uses itself.
### What did you see instead?
Currently, IDE setup requires copypasting a small script somewhere in the repository.
Contributor guide
Research direction
Start with the Editor setup wiki page and inspect tools/gopackagesdriver.sh, including the workaround referenced in go/tools/gopackagesdriver/main.go. Determine what repository-provided script exposure is needed so IDE configuration no longer requires copying a script; done means the IDE can point directly to the provided script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, shell
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100