Is it possible to store the cache for the `sync`, `debug`, and `run` modes separately? Currently, after `sync`, I can only proceed to `debug`, but not to `run`, otherwise it will start the compilation from the beginning, which will take a lot of time.
Description of the feature request:
Is it possible to store the cache for the sync, debug, and run modes separately? Currently, after sync, I can only proceed to debug, but not to run, otherwise it will start the compilation from the beginning, which will take a lot of time.
run:
debug:
sync:
run log:
bazel run --tool_tag=ijwb:CLion --color=yes --progress_in_terminal_title=no "--inject_repository=intellij_aspect=/.../Library/Application Support/JetBrains/CLion2024.3/plugins/clwb/aspect" --inject_repository=intellij_aspect_template=/.../.clwb/.idea/aspect -- //third-party/cpp-httplib:test_cpp_httplib_utils
Computing main repo mapping:
Loading:
Loading: 0 packages loaded
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_android' found. This will result in a failure if there's a reference to those rules or symbols.
WARNING: Build options --copt and --linkopt have changed, discarding analysis cache (this can be expensive, see https://bazel.build/advanced/performance/iteration-speed).
Analyzing: target //third-party/cpp-httplib:test_cpp_httplib_utils (1 packages loaded, 0 targets configured)
Analyzing: target //third-party/cpp-httplib:test_cpp_httplib_utils (1 packages loaded, 0 targets configured)
....
debug log:
Building debug binary
Command: bazel build --tool_tag=ijwb:CLion --copt=-fdebug-compilation-dir=/path --linkopt=-Wl,-oso_prefix,. --compilation_mode=dbg --copt=-O0 --copt=-g --strip=never --dynamic_mode=off --fission=yes --color=yes --progress_in_terminal_title=no "--inject_repository=intellij_aspect=/.../Library/Application Support/JetBrains/CLion2024.3/plugins/clwb/aspect" --inject_repository=intellij_aspect_template=/.../.clwb/.idea/aspect --build_event_binary_file=/var/folders/jq/sc1c63nd67s5nf6mkhcjhs100000gn/T/intellij-bep-61faf2aa-2347-4b7c-9b0b-3a96578933d8 --nobuild_event_binary_file_path_conversion --build_event_publish_all_actions -- //third-party/cpp-httplib:test_cpp_httplib_utils
Computing main repo mapping:
Loading:
Loading: 0 packages loaded
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_android' found. This will result in a failure if there's a reference to those rules or symbols.
WARNING: Build options --copt and --linkopt have changed, discarding analysis cache (this can be expensive, see https://bazel.build/advanced/performance/iteration-speed).
Analyzing: target //third-party/cpp-httplib:test_cpp_httplib_utils (1 packages loaded, 0 targets configured)
Analyzing: target //third-party/cpp-httplib:test_cpp_httplib_utils (1 packages loaded, 0 targets configured)
...
sync log:
...
Plus 128 more targets
Running Bazel info...
Building 180 Bazel targets...
bazel build --tool_tag=ijwb:CLion --target_pattern_file /.../.clwb/targets/targets-2404064947116962543 --keep_going --color=yes --progress_in_terminal_title=no "--inject_repository=intellij_aspect=/.../Library/Application Support/JetBrains/CLion2024.3/plugins/clwb/aspect" --inject_repository=intellij_aspect_template=/.../.clwb/.idea/aspect "--inject_repository=intellij_aspect=/.../Library/Application Support/JetBrains/CLion2024.3/plugins/clwb/aspect" --inject_repository=intellij_aspect_template=/.../.clwb/.idea/aspect --define=_cpp_use_get_tool_for_action=true --noexperimental_run_validations --aspects=@intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect --output_groups=intellij-resolve-cpp,intellij-info-cpp,intellij-info-generic --build_event_binary_file=/var/folders/jq/sc1c63nd67s5nf6mkhcjhs100000gn/T/intellij-bep-558b94fd-40d7-4049-a38f-d163a91b1433 --nobuild_event_binary_file_path_conversion --build_event_publish_all_actions --curses=yes --
WARNING: Option 'experimental_run_validations' is deprecated: Use --run_validations instead
WARNING: Option 'experimental_run_validations' is deprecated: Use --run_validations instead
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_android' found. This will result in a failure if there's a reference to those rules or symbols.
WARNING: Build options --compilation_mode, --copt, --define, and 4 more have changed, discarding analysis cache (this can be expensive, see https://bazel.build/advanced/performance/iteration-speed).
WARNING: /.../toolchains/toolchains/BUILD.bazel:1:19: in cc_toolchain_suite rule //toolchains/toolchains:gcc_toolchain: Rule is a no-op.
INFO: Analyzed 178 targets (231 packages loaded, 56253 targets configured).
...
Which category does this issue belong to?
CLion
What underlying problem are you trying to solve with this feature?
repeated compilation.
What operating system, Intellij IDE and programming languages are you using? Please provide specific versions.
macos 15.2 ,clion 2024.3
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
Looks similar to #4113
It seems so, but when we enable it, debugging breakpoints stop working.
@ujohnny
Looks similar to #4113
@kekxv Hi, thanks for reaching out with this issue. You are right, the registry key is pretty useless as far I understand the situation here. However, we are aware of the underlying issue and I'll look into this as soon as I find some time.
The key issue here is that plugin implicitly adds bazel flags that requires recompilation of whole project when debug action is performed, see https://github.com/bazelbuild/intellij/blob/1cfaf569db0e3f044edc74c0469a3418908b9040/clwb/src/com/google/idea/blaze/clwb/run/BlazeCidrRunConfigurationRunner.java#L102. Technically this should be addressed on a level of project view file, ie user "enables" native debugging in project view file like nativeDebuggingEnabled: true and then sync & run is also performed with -c dbg.
Thank you for contributing to the IntelliJ repository! This issue has been marked as stale since it has not had any activity in the last 6 months. It will be closed in the next 14 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post @bazelbuild/triage in a comment here and we'll take a look. Thanks!