Switching back and forth from terminal to IDE requires rebuilds
See original GitHub issueWhenever I run a bazel build in the terminal and then switch to intellij and resync the project, it does a full rebuild. It says the options have changed so it’s discarding the cache.
Looking at the options it sets, --tool_tag
stands out as an obvious one that is in the affects_output
section of the Bazel CLI docs, so could that be causing it? There are others as well.
How necessary are these and are there any workarounds or improvements that could be made to make switching back and forth a little easier/faster?
If it sounds like I’m talking crazy talk because this isn’t happening for you, I can give more details about the project, if you point me in the right direction to start.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:37
Top Results From Across the Web
Shortcut to switch between editor and terminal?
Possible solution: disable "Override IDE Shortcuts" option in "Settings/Preferences | Tools | Terminal" (https://youtrack.jetbrains.com/issue/ ...
Read more >c# - Visual Studio 2017 - How to configure command terminal ...
You can make a "Visual Studio Command Prompt" window (a CMD instance) that is set to some version of "the current folder" by...
Read more >Switch Windows 10 from RAID/IDE to AHCI
There is in fact a way to switch operation from either IDE / RAID to AHCI within Windows 10 without having to reinstall....
Read more >Developing inside a Container - Visual Studio Code
Developing inside a Container. The Visual Studio Code Dev Containers extension lets you use a Docker container as a full-featured development environment.
Read more >Devenv command line switches - Visual Studio (Windows)
Learn about devenv command-line switches and how to use them to set IDE options, and also build, debug, and deploy projects, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah! Thanks for the pointer. I was able to resolve my original issue by adding this to my bazelrc.
The build is deterministic, given that the
PATH
and its contents stays the same. Do you mean hermetic build? I agree depending on thePATH
is really not hermetic.bazel calls out to some executables on your path for binaries that it doesn’t bundle (I think things like cp, mv for genrules). It’s just a possibility that it might affect build output, most of the time it doesn’t. bazel is just overly eager in assuming a rebuild is necessary. You can even add an empty directory to your
PATH
and it’ll trigger a rebuild (e.g.,PATH=$PATH:/bogus/bin bazel build
). It really should be something the bazel team should fix.