bazel-contrib / bazel-contrib/rules_go

gopls + gopackagesdriver on vscode works a bit slow on my side

Open
#4,436 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
1.5k
Forks
760
Avg merge
1d 11h
Merged PRs (30d)
12

Description

Just migrated our monorepo to bazel 8.x with bzlmod and tried to switch repo to use proto rules instead of pre-compiled go packages and for this reason tried to setup gopackagesdriver with vscode. The problem is that it works a bit slow and I wonder where this is issue with the bazel configuration or there is some bottleneck in the build process. Here are the environment details and I would be happy if you share some performance details or guideline how performance to be improved.

**Environment Details**
java-home: /private/var/tmp/_bazel_mgenov/install/238d60da91a7fad3983c54b8c9e828b0/embedded_tools/jdk
java-runtime: OpenJDK Runtime Environment (build 24+36) by Azul Systems, Inc.
java-vm: OpenJDK 64-Bit Server VM (build 24+36, mixed mode) by Azul Systems, Inc.
local_resources: RAM=98304MB, CPU=12.0
max-heap-size: 25769MB
output_base: /private/var/tmp/_bazel_mgenov/8cac0968a0c17cc631135ceb621314f4
output_path: /private/var/tmp/_bazel_mgenov/8cac0968a0c17cc631135ceb621314f4/execroot/_main/bazel-out
package_path: %workspace%
release: release 8.3.1
repository_cache: /var/tmp/_bazel_mgenov/cache/repos/v1
server_log: /private/var/tmp/_bazel_mgenov/8cac0968a0c17cc631135ceb621314f4/java.log.miroslavs-macbook-pro.mgenov.log.java.20250830-093726.61645
server_pid: 61645
used-heap-size: 767MB
workspace: /Users/mgenov/workspaces/idea/monorepo

**gopls log**
[Info - 16:41:36] 2025/08/30 16:41:36 go/packages.Load #7
view_id="1"
snapshot=52
directory=/Users/mgenov/workspaces/idea/monorepo
query=[file=/Users/mgenov/workspaces/idea/monorepo/go/pkg/cqrs/repository_test.go]
packages=2
duration=9.233110291s

[Info - 16:41:37] 2025/08/30 16:41:37 go/packages.Load #9
view_id="1"
snapshot=52
directory=/Users/mgenov/workspaces/idea/monorepo
query=[file=/Users/mgenov/workspaces/idea/monorepo/go/pkg/cqrs/repository_test.go]
packages=2
duration=9.567346667s

[Info - 16:41:47] 2025/08/30 16:41:47 go/packages.Load #10
view_id="1"
snapshot=54
directory=/Users/mgenov/workspaces/idea/monorepo
query=[file=/Users/mgenov/workspaces/idea/monorepo/go/pkg/cqrs/repository_test.go]
packages=2
duration=10.461952667s

[Info - 16:41:48] 2025/08/30 16:41:48 go/packages.Load #12
view_id="1"
snapshot=54
directory=/Users/mgenov/workspaces/idea/monorepo
query=[file=/Users/mgenov/workspaces/idea/monorepo/go/pkg/cqrs/repository_test.go]
packages=2
duration=10.168450375s

[Info - 16:41:58] 2025/08/30 16:41:58 go/packages.Load #14
view_id="1"
snapshot=55
directory=/Users/mgenov/workspaces/idea/monorepo
query=[file=/Users/mgenov/workspaces/idea/monorepo/go/pkg/cqrs/repository_test.go]
packages=2
duration=10.173329041s

[Info - 16:42:08] 2025/08/30 16:42:08 go/packages.Load #15
view_id="1"
snapshot=60
directory=/Users/mgenov/workspaces/idea/monorepo
query=[file=/Users/mgenov/workspaces/idea/monorepo/go/pkg/cqrs/repository_test.go]
packages=2
duration=9.842274708s

Contributor guide

Open the contributing guide

Research direction

Start with the gopls log entries for go/pkg/cqrs/repository_test.go and the reported Bazel 8.3.1, bzlmod, proto rules, and gopackagesdriver setup. Reproduce the repeated 9–10 second go/packages.Load calls and determine whether the delay is in the Bazel configuration or build process; document the bottleneck and measurable performance guidance as done.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.