Skip to content

refs #13245/#14668 - use builddir consistently and verify usage of cached results in selfcheck - #8204

Draft
firewave wants to merge 2 commits into
cppcheck-opensource:mainfrom
firewave:selfcheck-builddir-x
Draft

refs #13245/#14668 - use builddir consistently and verify usage of cached results in selfcheck#8204
firewave wants to merge 2 commits into
cppcheck-opensource:mainfrom
firewave:selfcheck-builddir-x

Conversation

@firewave

Copy link
Copy Markdown
Collaborator

No description provided.

@firewave

This comment was marked as resolved.

@firewavefirewave changed the title CI-unixish.yml: use builddir consistently and verify usage of cached results in selfcheckuse builddir consistently and verify usage of cached results in selfcheckFeb 12, 2026
@firewavefirewave changed the title use builddir consistently and verify usage of cached results in selfcheckuse builddir consistently and verify usage of cached results in selfcheck / improved --debug-analyzerinfo outputFeb 12, 2026
@firewave

Copy link
Copy Markdown
CollaboratorAuthor
discarding cached result from 'b1/main.a1' for 'cli/main.cpp' - hash mismatch (16146913026568202460 / 18076949867239869788)
discarding cached result from 'b1/main.a1' for 'gui/main.cpp' - hash mismatch (18076949867239869788 / 16146913026568202460)

The problem is that we perform individual analysis(eses) on the same builddir leading to conflicts when a file with the same name exists in a different location.

I am not sure this can be resolved as the files.txt is written unconditionally essentially discarding.

A valid use case would be the usage of a cache in conjunction with an IDE integration which would only invoke the analysis for a single file. In that case though we could generate the files.txt for the whole project/inputs regardless of the selected subset. But that would only work with a fixed project configuration but not in the case of this PR when you extract configurations.

It could be achieved though by not writing the file unconditionally but use it as an index for lookups and append new entries. This would leave outdated and/or removed files behind but that is already an issue now (needs a separate ticket).

@firewave
firewaveforce-pushed the selfcheck-builddir-x branch 3 times, most recently from 8e1d6dc to 1e2278eCompareFebruary 14, 2026 20:05
@firewavefirewave changed the title use builddir consistently and verify usage of cached results in selfcheck / improved --debug-analyzerinfo outputrefs #13245 - use builddir consistently and verify usage of cached results in selfcheck / improved --debug-analyzerinfo outputFeb 14, 2026
@firewavefirewave changed the title refs #13245 - use builddir consistently and verify usage of cached results in selfcheck / improved --debug-analyzerinfo outputrefs #13245 - use builddir consistently and verify usage of cached results in selfcheckFeb 25, 2026
@firewavefirewave changed the title refs #13245 - use builddir consistently and verify usage of cached results in selfcheckrefs #13245/#14668 - use builddir consistently and verify usage of cached results in selfcheckApr 24, 2026
@firewave
firewaveforce-pushed the selfcheck-builddir-x branch from 4ad7334 to 4dbbbfaCompareApril 25, 2026 07:42
@firewave
firewaveforce-pushed the selfcheck-builddir-x branch from 4dbbbfa to 2849ff7CompareJune 5, 2026 07:24
@firewave

Copy link
Copy Markdown
CollaboratorAuthor
discarding cached result from 'b1/main.a1' for 'cli/main.cpp' - hash mismatch (16146913026568202460 / 18076949867239869788)
discarding cached result from 'b1/main.a1' for 'gui/main.cpp' - hash mismatch (18076949867239869788 / 16146913026568202460)

The problem is that we perform individual analysis(eses) on the same builddir leading to conflicts when a file with the same name exists in a different location.

Reducing the file generated in the build dir down to the basename only seems to go a bit too far especially if you might have a directory structure with the same filenames. Maybe the (relative) directory should also be encoded into it. That way the cache should be usable if you pass into a project but only filter for a subset after a full analysis.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@firewave