[FR] use local symlink of execroot in gopackagesdriver
What version of rules_go are you using?
v0.29.0
What version of gazelle are you using?
v0.24.0
What version of Bazel are you using?
4.2.1
Does this issue reproduce with the latest releases of all the above?
N/A
What operating system and processor architecture are you using?
MacOS
Requested feature
👋🏼 we've been using gopackagesdriver for our VS Code setup and we're really happy with it. One thing we do wish was customizable though, was to specify whether the GoFiles paths it generates point to /private/tmp/... or <workspace-root>/<execroot>. The reason for this is that when doing something as simple as "Go to definition" for auto-generated sources, we get taken to the "real" execroot. This should be fine, but in practice VS Code thinks we're opening a new Git repo (because bazel copies over the .git directory) and it makes Git integrations fairly unhappy (see screenshot).
Looking over the gopackagesdriver codebase, this seems like it should be a fairly straightforward feature to enable with a new environment variable (maybe BAZEL_EXECROOT to provide the path to the symlink or BAZEL_USE_EXECROOT_SYMLINK to try be more clever and figure it out ourselves).
It this something y'all would be open to supporting?
