Skip to content

Conversation

@furtib
Copy link
Contributor

@furtib furtib commented Sep 1, 2025

Why:
Bazel and ccache don't work well together. We should warn the user that their analyzers use ccache and fail the job to force the user to disable ccache (by changing package_layout.json or uninstalling ccache)

What:
Extended the repository rule that detects CodeChecker to also detect ccache

Addresses:
Fixes #36

@furtib furtib requested a review from Szelethus September 1, 2025 14:52
@furtib furtib added the enhancement New feature or request label Sep 1, 2025
@furtib furtib self-assigned this Sep 1, 2025
Copy link
Contributor

@Szelethus Szelethus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to give some credit, because this really is a novel and clever solution. I just happen not to prefer it to --ccache-skip, because we can't guarantee that ccache will be in the PATH, especially if its only used during build configuration (this is not made up, its a legitimate usecase). Can we not just do that, and keep it in tools.bzl?

@furtib furtib force-pushed the ccache-repository-rule branch 2 times, most recently from e963809 to 02e217b Compare September 3, 2025 08:01
@furtib
Copy link
Contributor Author

furtib commented Sep 3, 2025

I have tried my best to reproduce the behaviour you describe. Since we cannot use custom flags, I have resorted to using environment variables. I have decided to pass the CCACHE_DISABLE=1 flag to the jobs. Please test if it works on your machine!

@furtib furtib force-pushed the ccache-repository-rule branch from 02e217b to 56c9a9d Compare September 3, 2025 13:34
@furtib furtib force-pushed the ccache-repository-rule branch from 3eac5bc to c81d553 Compare September 24, 2025 11:16
@furtib furtib force-pushed the ccache-repository-rule branch from c81d553 to 581e572 Compare October 7, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect and disable ccache

2 participants