monogon-dev / monogon

The Monogon Monorepo. May contain traces of peanuts and a ✨pure Go Linux userland✨. Work in progress!
https://monogon.tech
Apache License 2.0
378 stars 9 forks source link

We lose the bazel server way too easily #312

Open leoluk opened 3 months ago

leoluk commented 3 months ago

Every time I run bazel run //metropolis:launch-cluster inside the Nix shell, Bazel appears to launch a brand-new server and recompute the entire graph, which is really expensive:

$ bazel run //metropolis:launch-cluster 
IntelliJ found at /home/leopold/.local/share/JetBrains/IntelliJIdea2024.1, aspect repository already patched.
Starting local Bazel server and connecting to it...
Computing main repo mapping: 
    Fetching repository @@crate_index; Restarting. 10s
    Fetching repository @@rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools; starting 10s
lorenz commented 3 months ago

I looked into this at one point, most likely a namespace-related issue (fhsenv uses that). I couldn't fix it in reasonable time so I just moved my devenv into the nix-shell (with remote extension host).