Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #7267

Open
kekxv opened this issue Feb 2, 2025 · 3 comments

Comments

@kekxv
Copy link

kekxv commented Feb 2, 2025

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:
Image

debug:
Image

sync:
Image

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

@ujohnny
Copy link
Collaborator

ujohnny commented Feb 3, 2025

Looks similar to #4113

@kekxv
Copy link
Author

kekxv commented Feb 4, 2025

Image

It seems so, but when we enable it, debugging breakpoints stop working.

@ujohnny

Looks similar to #4113

@LeFrosch
Copy link
Collaborator

LeFrosch commented Feb 4, 2025

@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.

@ujohnny ujohnny removed the awaiting-maintainer Awaiting review from Bazel team on issues label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Untriaged
Development

No branches or pull requests

3 participants