Describe the bug
The monolithic version of the rule only uses analyzers from /bin.
This is an issue, because when we think we control the analyzer binaries with micromamba (or other similar tools) in reality bazel still uses /bin/clang and /bin/clang-tidy
Versions
- CodeChecker 6.27.3
- bazel 7.7.1
- f043a72
To Reproduce
- Create an empty Dockerfile (like ubi9).
- Attach the repository (or clone it)
- Use
source .ci/micromamba/init.sh
- Run
bazel test //test/unit/legacy:codechecker_pass -- it fails, due to no analyzers found.
A Dockerfile for testing:
# Required by Bazel's hermetic Python toolchain (rules_python refuses root).
RUN useradd -m -s /bin/bash ci
# The project root is expected to be mounted here at runtime:
# docker run --rm -v "$(pwd):/workspace" ...
RUN mkdir -p /workspace \
&& chown ci:ci /workspace
WORKDIR /workspace
RUN mkdir -p /home/ci/.cache/bazel \
&& chown -R ci:ci /home/ci/.cache
USER ci
ENTRYPOINT ["/bin/bash"]
Build it with:
docker build -t bug-reproduce-001 -f /path/to/Dockerfile
Run it with (from the project root):
docker run --rm -v "$(pwd):/workspace" bug-reproduce-001
--
If you, for some reason, cannot use Docker, make sure that the clang version in micromamba and on your system are different.
Then build any monolithic rule target and check the analyzer version used with:
cat $(find -L bazel-bin -type f -name "metadata.json") | jq | grep "analyzer_statistics" -A8
Expected behaviour
Expected to use analyzer binaries from places other than /bin.
Describe the bug
The monolithic version of the rule only uses analyzers from
/bin.This is an issue, because when we think we control the analyzer binaries with micromamba (or other similar tools) in reality bazel still uses
/bin/clangand/bin/clang-tidyVersions
To Reproduce
source .ci/micromamba/init.shbazel test //test/unit/legacy:codechecker_pass-- it fails, due to no analyzers found.A Dockerfile for testing:
Build it with:
Run it with (from the project root):
--
If you, for some reason, cannot use Docker, make sure that the clang version in micromamba and on your system are different.
Then build any monolithic rule target and check the analyzer version used with:
Expected behaviour
Expected to use analyzer binaries from places other than
/bin.